ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ U hf^@sRdZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZejjdkrddlmZedZnddlmZdZdZd d Z ej!"d d Z#d Z$ddZ%ddZ&ddZ'dddZ(GdddZ)GdddZ*dS)zAbstract Apport user interface. This encapsulates the workflow and common code for any user interface implementation (like GTK, Qt, or CLI). N)unicode_gettext) ConfigParserFTz2.20.11cCs(tjjdkr t|tdSt|S)z$Return exception message as unicode.rreplace)sys version_infomajorstrdecodelocalegetpreferredencoding)Z exceptionr +/usr/lib/python3/dist-packages/apport/ui.pyexcstr's rZAPPORT_SYMPTOMS_DIRz/usr/share/apport/symptomsi c CsDz$td|ddd}t|WSttfk r>YdSXdS)Nz Pid: (.*) Z ProcStatus)researchgetgroupint IndexErrorAttributeError)reportpidr r rget_pid4s  rc CsRztt|dWn8tk rL}z|jtjkr|}|dWSWntk rVYdSXdS)Nrz-http+unix://%2Frun%2Fsnapd.socket/v2/snaps/{}result)requests_unixsocketZSessionrformatZ status_codeZjson Exception)packager%Zsessionrjr r r find_snapEs r+c Cs&z |Wntk r YnX||ri}znt|}tt||d|W5QRX|d||}|std|WdSt j t j |d|d<WnNt k rtdYn2tk rtd|ttdYnX|sd|krtj|d}ntd z||WnLtk rF|sBYn0tk rt}zt||d <W5d}~XYnXd |kr8||rtdzd |krd t jkrd |krtd|d <nPtj|d dstj |d dstd|dd|d <Wntk r6|s2YnXd|krX|!} | rX| |d<|"ddkrdt jkr|#} | rtdd$| |d <|r"z4t|d }t %|d|j&|ddW5QRXWn6t'k r}ztd||fW5d}~XYnXtj(|t %|ddS)ayCollect information about report. Encapsulate calls to add_*_info() and update given report, so that this function is suitable for threading. ui must be a HookUI instance, it gets passed to add_hooks_info(). If reportfile is not None, the file is written back with the new data. If symptom_script is given, it will be run first (for run_symptom()). execrunz8symptom script %s did not determine the affected packageNrZSymptomzsymptom script %s crashed:ExecutablePathzAcalled without a package, and report does not have ExecutablePathUnreportableReasonCrashDBZAPPORT_DISABLE_DISTRO_CHECKPackagez4This package does not seem to be installed correctlyzXThis is not an official %s package. Please remove any third party package and try again.Z DistroReleaseZTitle ProblemTypeCrashZAPPORT_IGNORE_OBSOLETE_PACKAGESzYou have some obsolete package versions installed. Please upgrade the following packages and check if the problem still occurs: %sz, ZabT)Zonly_newzCannot update %s: %si))Z add_gdb_infor add_os_infoopenr,compilereadapporterrorrpathsplitextbasename StopIterationrexitr' traceback print_exc fileutilsfind_file_packageKeyErroradd_package_info ValueError SystemErrorrZadd_hooks_infoenviron_ packagingZis_distro_packagesplitZis_native_origin_packageZstandard_titlerZobsolete_packagesjoinchmodwriteIOErrormark_report_seen) rZ reportfiler(uisymptom_scriptignore_uninstalledsymbfr!titleZold_pkgsr r rthread_collect_infoRs                $ rVc@seZdZdZddZddZd_ddZd d Zd d Zd dZ ddZ d`ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zdad1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Zd=d>Z d?d@Z!dbdAdBZ"dCdDZ#dEdFZ$dGdHZ%dIdJZ&dKdLZ'dMdNZ(dOdPZ)dQdRZ*dSdTZ+dUdVZ,dWdXZ-dYdZZ.d[d\Z/d]d^Z0dS)c UserInterfaceaApport user interface API. This provides an abstract base class for encapsulating the workflow and common code for any user interface implementation (like GTK, Qt, or CLI). A concrete subclass must implement all the abstract ui_* methods. c Csd|_d|_d|_d|_d|_d|_ztjd|_WnNt k rh}zt dt |W5d}~XYnt k rt dYnXt |j|dS)z8Initialize program state and parse command line options.r8NFzDCould not import module, is a package upgrade in progress? Error: %sz8/etc/apport/crashdb.conf is damaged: No default database)Zgettext_domainr report_file cur_package offer_restartspecified_a_pkgr8crashdb get_crashdb ImportErrorfatalr rCgettext textdomain parse_argv)selfr!r r r__init__s  zUserInterface.__init__cCsd}d|_tdkr&tj}d}nPtj}tsFtj t }n0t dt tj tj BtjB}tjj |d}|D]}||sqz|rd|jkrd|jkr|jsqz|d|jdksz|d |jkrqz|jd d kr||n ||d}qz|S) aPresent all currently pending crash reports. Ask the user what to do about them, and offer to file bugs for them. Crashes that occurred in a different desktop (logind) session than the one that is currently running are not processed. This skips crashes that happened during logout, which are uninteresting and confusing to see at the next login. Return True if at least one crash report was processed, False otherwise. FTrN/proc/%s) proc_pid_fdZ_LogindSessionDaterr2Hang)rZrgeteuidr8rAZget_new_system_reportsZget_new_reportsPY3ReportZget_logind_sessiongetpidr5O_RDONLYO_PATH O_DIRECTORY load_reportrZ get_timestamp finish_hang run_crash)rcr$ZreportsZlogind_sessionrfrTr r r run_crashess6    "    zUserInterface.run_crashesTc Cs||_zztj|Wntk r.YnX|jsF||sFWdSd|jkrVWdS|jddkrd|jkrd|jkrd|jkrtj |jdt d }t d |}| t d |d |t d fWdStj }||}|ds|dr d|jkr ||jdkrWdS|dr4|WdS|drF||drZ|jz|drt||dWntk rYnX|dsWdSd|jkr|jddkrtj||j|jr|rWdS|rWdS|Wntk r}z|jtjtjfkrH| t dt dt dnJ|jtj!krv| t dt dt dn| t d|j"t dW5d}~XYn@tk r}z |jtj#krt$dnW5d}~XYnXdS)zPresent and report a particular crash. If confirm is True, ask the user what to do about it, and offer to file a bug for it. If confirm is False, the user will not be asked, and the crash is reported right away. NIgnorer2r3ZSignalCoreDump Stacktracer.zunknown programz+Sorry, the program "%s" closed unexpectedly Problem in %s%s %szxYour computer does not have enough free memory to automatically analyze the problem and send a report to the developers.rexamine DependenciesrestartZ blacklistZremember_MarkForUploadFalseInvalid problem reportz2You are not allowed to access this problem report.rErrorz@There is not enough disk space available to process this report.zOut of memory, aborting)%rXr8rArOrrrprrr:r<rHui_error_messageallowed_to_reportui_present_report_details collect_inforyr{Z mark_ignoreremember_send_reportrCmark_report_uploadr\acceptshandle_duplicatecheck_unreportable file_reportrNrZEPERMEACCESrr>ZENOSPCstrerrorZENOMEMr_)rcrXZconfirmZsubjectZheadingrresponser!r r rrrs  .                       zUserInterface.run_crashcCstj|tj|dS)zFinish processing a hanging application after the core pipe handler has handed the report back. This will signal to whoopsie that the report needs to be uploaded. N)r8rArrO)rcrTr r rrq{s zUserInterface.finish_hangc Cs>td|_z|j|Wnxtk r}zZt|dkrZ|tdtdt dn*t|dkr|tdtdt dW5d }~XYnX|j |j d d }tj ||_|jtj }|j||d }|d r tj |j|tt|tjntt|tj|dr:|||d S)aReport an application hanging. This will first present a dialog containing the information it can collect from the running application (everything but the trace) with the option of terminating or restarting the application, optionally reporting that this error occurred. A SIGABRT will then be sent to the process and a series of noninteractive processes will collect the remaining information and mark the report for uploading. rhzinvalid process Invalid PIDz(The specified process ID does not exist.rznot accessiblez Not your PIDz0The specified process ID does not belong to you.Nr.r) modal_forrr{)r8rkr add_proc_inforEr rrHrr>rDrrArBrYr4rrZmark_hanging_processrrrsignalSIGABRTSIGKILL wait_for_pidr{)rcrr!r:rrr r rrun_hangs:            zUserInterface.run_hangc Cs`ztt|dWn:tk rN}z|jtjkr-p --packagezSpecify package name.help--tagr@Add an extra tag to the report. Can be specified multiple times.actiondefaultrrrz-You need to specify a report number to updateNF)optparse OptionParserrH add_option parse_argsrargsrisdigitr9rr>rrrrrr)rc optparserr r rparse_argv_updates"   zUserInterface.parse_argv_updatecCs6ttjdkrrdtjkrHtjtjtjdtjtjdtjd<tjd}| dsf| drr| dSt t d}|jddd d d t d d |jddd d t dd|jddddt dd|jdddt dd|jddt dd |jd!d"dt d#d$|jd%d d t d&d|jd'd(d)t d*tjjd|jd+d)t d,d|jd-d.gt d/d|jd0d1d t d2d3ttjdkr| d4rd5D]}t j||_q|\|_|_|jjr|jjs |jjs |jjs |jjs |jjs |jjr|d6ttjdkr(dSttjd7krP| d4rPd8|j_dSt|jd7krddStj tjt!|jdd9rd8|j_|jd|j_g|_n|jd d:s|jd d;r|jd|j_g|_nP|jd"rd8|j_|jd|j_g|_n d<|jdkr|jd#d=rt$|jd%d<d>}|sh|d?|jdnN|&d@dAr|dB|jd|dC|d@fn|dD|jd|dCft'd7n6tj()|jd}|s|dE|jdt'd7g|_d8|j_||j_*n"d8|j_d8|_+|jd|j_*g|_dS)FzParse command line options. If a single argument is given without any options, this tries to "do what I mean". rZAPPORT_INVOKED_ASz -update-bugz-collectNzF%prog [options] [symptom|pid|package|program path|.apport/.crash file]-fz --file-bug store_truerFzStart in bug filing mode. Requires --package and an optional --pid, or just a --pid. If neither is given, display a list of known symptoms. (Implied if a single argument is given.))rdestrrz-wz--windowz7Click a window as a target for filing a problem report.r-uz --update-bugrrz;Start in bug updating mode. Can take an optional --package.)typerr-sz --symptomZSYMPTOMzWFile a bug report about a symptom. (Implied if symptom name is given as only argument.))metavarrrrzSpecify package name in --file-bug mode. This is optional if a --pid is specified. (Implied if package name is given as only argument.)r-Pz--pidzSpecify a running program in --file-bug mode. If this is specified, the bug report will contain more information. (Implied if pid is given as only argument.))rrz --hangingz*The provided pid is a hanging application.-cz --crash-filePATHzReport the crash from given .apport or .crash file instead of the pending ones in %s. (Implied if file is given as only argument.)z--savezIn bug filing mode, save the collected information into a file instead of reporting it. This file can then be reported later on from a different machine.rrrz-vz --versionz Print the Apport version number.)rrz-bug)rrrrrrzL-u/--update-bug option cannot be used together with options for a new reportrTrz.crashz.apport/z /snap/binrzx%s is provided by a snap. No contact address has been provided; visit the forum at https://forum.snapcraft.io/ for help.contactrzG%s is provided by a snap published by %s. Contact them via %s for help. developerz%s is provided by a snap published by %s. No contact address has been provided; visit the forum at https://forum.snapcraft.io/ for help.z %s does not belong to a package.),rrargvrrGr:rKdirnamer<rrrrrHrr8rAZ report_dirZ SUPPRESS_HELPZ get_optionrrrrrrrrrrrr9rrrrr+rJrr>rIZget_file_packager(r[)rccmdrosnappkgr r rrbs              " $  $   zUserInterface.parse_argvcCsP|dkrtd|ddS|dkr8td|ddStd|tddS) zCFormat the given integer as humanly readable and i18n'ed file size.i@Bz%.1fg@@z KBiʚ;g.Az MBz GB)r r&float)rcsizer r rformat_filesizeus zUserInterface.format_filesizec Csfd}|jD]V}|j|r z |t|j|jdd7}Wq tk r^|t|j|7}Yq Xq |S)z'Return the size of the complete report.rrrrZ gzipvaluerrcrkr r rget_complete_size~s   zUserInterface.get_complete_sizec Csnd}|jD]^}|dkr |j|r z |t|j|jdd7}Wq tk rf|t|j|7}Yq Xq |S)z&Return the size of the reduced report.rrurrrrr r rget_reduced_sizes   zUserInterface.get_reduced_sizecCsz|jrd|jkrdSz&tjddgtjtjddkr8WdSWntk rPYdSXz |dWStk rtYdSXdS)zCheck whether to offer the "Examine locally" button. This will be true if the report has a core dump, apport-retrace is installed and a terminal is available (see ui_run_terminal()). ruFZwhichzapport-retracerrN)rrcallrZSTDOUTrui_run_terminalNotImplementedErrorrcr r rcan_examine_locallys    z!UserInterface.can_examine_locallyc CsPd|jksttdkrLttddd|jd|jdtddS)zReopen the crashed application.rrZshrZRespawnCommandrN) rAssertionErrorrforksetsidexeclprrr>r r r rr{s   zUserInterface.restartcCs|tdtdtdtd|jgd}|dkr6dSdtjd}d }d |jd d d }|d ||d ||d |d|d}|||ddS)zLocally examine crash report.zJThis will launch apport-retrace in a terminal window to examine the crash.zRun gdb sessionz1Run gdb session without downloading debug symbolsz)Update %s with fully symbolic stack traceFNz"apport-retrace -S system -C %s -v z~/.cache/apport/retracezapport-retrace 'z'\''z--gdb z --output  )rrrr)rrHrXrr:rrr)rcrZretrace_with_downloadZretrace_no_downloadZfileargZcmdsr r rrys(    zUserInterface.examinec Cs|r d}nd}z@tddddddd d d |g tddddddd d d dg WnHttjfk r}z$|td dtdt|fW5d}~XYnXdS)z"Put whoopsie in auto or never modetrueZfalsez/usr/bin/gdbusrz-yz-dzcom.ubuntu.WhoopsiePreferencesz-oz/com/ubuntu/WhoopsiePreferencesz-mz/com.ubuntu.WhoopsiePreferences.SetReportCrashesz|jddkrLd|jkrL|rH|dS|jddkr|jdd }tj|std }|rd ||jdf}||jd <|r|dSd |jkrtj|jd std }d ||jd f|jd <|r|dSd|jkrjd|jkrjt|jd}|jd=tt|jdj}||krjd|jd<td|jd|jd <dS|j sd|jkr|s|j nf| |j |jrt|}nd}d|jkrtj} tjjtd|j|j|j |||fd} | | rD||rz |Wn tk r>tdYnXq| tjtj| z| WnFt t!t"j#fk r} z(dtdt$| f|jd <d|jd<W5d} ~ XYnt%k rbt&|j } | snX| dd rtd| d| df|jd <d|jd<n td| d|jd <d|jd<d |jkr^td|jd <d|jd<YnVt'k r} z6t#t$| tddt(| |jd <d|jd<W5d} ~ XYnXt&|j } | r6d |jkr6|j)r6| dd rtd| d| df}ntd| d}|*|s6|+tddSd |jksL|,sd|+|r`|dS|jdd ks|jdd!ksd"|jkrjtjj|jj-|j .fd#} | | r|z| d$Wn tk rtdYnXqz | WnFt t!t"j#fk rP} zdtdt$| f|jd <W5d} ~ XYnX| /rj| /|jd%<|jdd&krtjj|j j0|jfd#}||r|z|d$Wn tk rtdYnXq||/}|dk r|d'krd(|jd%<n ||jd%<tjj|jj1d)}||r||z|d$Wn tk rvtdYnXq6||+d |jkrd*|jkrd|jks|jdd 2d+sd"|jkr|3td,td-|4td|r|dS).aHCollect additional information. Call all the add_*_info() methods and display a progress dialog during this. In particular, this adds OS, package and gdb information and checks bug patterns. If a symptom script is given, this will be run first (used by run_symptom()). Truer|r2r3rvrzNr.rzIThis problem report applies to a program which is not installed any more.z%s (%s)r/ZInterpreterPathExecutableTimestampr}zPThe problem happened with the program %s which changed since the crash occurred.rV)targetnamerrrx7This problem report is damaged and cannot be processed.rzJThis report is about a snap published by %s. Contact them via %s for help.rzThis report is about a snap published by %s. No contact address has been provided; visit the forum at https://forum.snapcraft.io/ for help.z5This report is about a package that is not installed.zBAn error occurred while attempting to process this problem report:rzYou are about to report a bug against the deb package, but you also a have snap published by %s installed. You can contact them via %s for help. Do you want to continue with the bug report against the deb?aYou are about to report a bug against the deb package, but you also a have snap published by %s installed. For the snap, no contact address has been provided; visit the forum at https://forum.snapcraft.io/ for help. Do you want to continue with the bug report against the deb?rZ KernelCrashZ KernelOopsr1rr皙? _KnownReportrT1)rrZKernelr~z7Could not determine the package or source package name.)5rrrr:rrHrrst_mtimerYr4!ui_start_info_collection_progressr\rHookUIrGcopyr8REThreadrVrXstartis_alive!ui_pulse_info_collection_progress process_eventKeyboardInterruptrr>rKclearr exc_raiserNEOFErrorzlibr9reprrEr+r'r r[r ui_stop_info_collection_progressrZsearch_bug_patternsZget_bugpattern_baseurl return_valueZknownZ anonymizerr ui_shutdown)rcrQrRZ on_finishedZexe_pathmsgZ orig_timeZcur_timeZhookuiZorig_envZicthreadr!rZbpthreadZ known_threadvalZanonymize_threadr r rr sH 4                      0               zUserInterface.collect_infoc CsHt\}}tdkrt|t\}}|rptd}td|}t|}|rd|d|7}|||zt|Wnt k rYnXdSt t|zt t dt d} dd d d t | g} ztd d dd t | dgd} | dd}td|d} | d} W5QRX| D]6}|dr8| d|dddqpq8Wntjtfk rYnXWntk rg} YnXzLzt| d|gWn0t k rtj|dddtdYnXWn>tk r8}zt|t |tdW5d}~XYnXt ddS)zjOpen the given URL in a new browser window. Display an error dialog if everything fails. rzUnable to start web browserz'Unable to start web browser to open %s. NZ PKEXEC_UIDZSUDO_UIDZsudoz-Hr#Zpgrepz-az-xZgvfsdUTF-8z/proc/%s/environrbsDBUS_SESSION_BUS_ADDRESS=zDBUS_SESSION_BUS_ADDRESS==rzxdg-openT)newZ autoraise)!rpiper closewaitrHfdopenreadlinerrr rgetenvr rrr splitlinesrJr5r7rrrrN TypeErrorr webbrowserrr>r'rM_exit)rcurlr)wrZstatusrUr9messageZuidZ sudo_prefixrrTenvr!r r ropen_urls`           zUserInterface.open_urlc Cs6|j|jsdS|jd|jdkrLz |jd=Wntk rJYnXz |jd=Wntk rlYnXdadd}t|jD]}|dr|j|=q|t j j |jj |j|fd}| | r|tz|d |Wqtk rtd Yqt jjk r}z`td }||t|}|dk r|\}}|j||t j j |jj |j|fd}| W5d}~XYqtttfk rYqtk r}z*|td d tdt|fWYdSd}~XYqXq||} ||j |j| } | r2|!| dS)zGUpload the current report and guide the user to the reporting web page.NZPackageArchitectureZ ArchitectureZStacktraceAddressSignaturecSst||adSr)r_UserInterface__upload_progress)ZsentZtotalr r rprogress_callback4sz4UserInterface.file_report..progress_callbackrHr!r"rzDPlease enter your account information for the %s bug tracking systemzNetwork problemrxzHCannot connect to crash database, please check your Internet connection.)"r\rrrrCrOrrui_start_upload_progressr8r)Zuploadr*r+ui_set_upload_progressrKr0r.rr>ZNeedsCredentialsrHui_question_userpassrZset_credentialsrG SyntaxErrorrEr'rr5ui_stop_upload_progressZget_comment_urlrN) rcrPrZupthreadr!rLdatauserZpasswordZticketrJr r rrsl            zUserInterface.file_reportc CsLzFt|_t|d}|jj|ddW5QRXd|jkrDtdWntk rvd|_|tdtdYd St k r}z"d|_|td |j WYd Sd}~XYnZt tt t jfk r }z0d|_|td d td t|fWYd Sd}~XYnXd |jkr0|jd d|_ntj|jdd|_dS)zLoad report from given path and do some consistency checks. This might issue an error message and return False if the report cannot be processed, otherwise self.report is initialized and True is returned. r<Z compressed)binaryr2z+Report does not contain "ProblemType" fieldNzMemory exhaustionzEYour system does not have enough memory to process this crash report.Fr~rxr r1rr.rT)r8rkrr5loadrE MemoryErrorrrHrNrrGr r2r9r3rJrYrArBr)rcr:rTr!r r rrpcs:       zUserInterface.load_reportcCs|j|jsdSd|jkrt|jdtkrD|jdd|jd<d|jkrjtd|jdd}nd}||td|jdd SdS) znCheck if the current report is unreportable. If so, display an info message and return True. Fr/r;r1rwrrz#The problem cannot be reported: %sT) r\rrrbytesr rHrJr)rcrUr r rrs   z UserInterface.check_unreportablec Cs$d|jkr(tj|jdr(|jd}n*ztj|j}Wntk rPYdSX|sZdSt rtt ddd}ddi}n t }i}z|j |f|Wnbt k r}zDdt |jkrdt |jkrtjd |t |fWY dSW5d}~XYnX|d sdSt|d }d |kr dS|S) zReturn a .desktop info dictionary for the current report. Return None if report cannot be associated to a .desktop file. Z DesktopFileNF) interpolationstrictencodingr;ZonfigZarserzWarning! %s is broken: %s z Desktop Entryr)rrr:rr8rAZfind_package_desktopfilerYrErjrr7r'r __class__rrrMZ has_sectionritems)rcZ desktop_filecpkwargsr!r$r r rget_desktop_entrys4      zUserInterface.get_desktop_entrycCsn|j|jsdSd|jkr dS|jddrV|tdtd||jdn|tdtddS)zCheck if current report matches a bug pattern. If so, tell the user about it, open the existing bug in a browser, and return True. Fr#ZhttpzProblem already knownzThis problem was already reported in the bug report displayed in the web browser. Please check if you can add any further information that might be helpful for the developers.z;This problem was already reported to developers. Thank you!T)r\rrrrrHrNr r r rrs   zUserInterface.handle_duplicatecCsH|js t|jjrD|jdd}|r,|d7}|d|jj|jd<dS)z6Add extra tags to report specified with --tags on CLI.ZTagsrrN)rr rtagrrK)rcZtagsr r rrs  zUserInterface.add_extra_tagscCs tddS)aShow details of the bug report. Return the action and options as a dictionary: - Valid keys are: report the crash ('report'), restart the crashed application ('restart'), or blacklist further crashes ('blacklist'). .this function must be overridden by subclassesNr)rcrrr r rrs z'UserInterface.ui_present_report_detailscCs tddS)z:Show an information message box with given title and text.reNrfrcrUtextr r rrszUserInterface.ui_info_messagecCs tddS)z4Show an error message box with given title and text.reNrfrgr r rrszUserInterface.ui_error_messagecCs tddS)zOpen a indefinite progress bar for data collection. This tells the user to wait while debug information is being collected. reNrfr r r rr&sz/UserInterface.ui_start_info_collection_progresscCs tddS)zaAdvance the data collection progress bar. This function is called every 100 ms. reNrfr r r rr,sz/UserInterface.ui_pulse_info_collection_progresscCs tddS)z,Close debug data collection progress window.reNrfr r r rr4 sz.UserInterface.ui_stop_info_collection_progresscCs tddS)z{Open progress bar for data upload. This tells the user to wait while debug information is being uploaded. reNrfr r r rrQsz&UserInterface.ui_start_upload_progresscCs tddS)zUpdate data upload progress bar. Set the progress bar in the debug data upload progress window to the given ratio (between 0 and 1, or None for indefinite progress). This function is called every 100 ms. reNrf)rcZprogressr r rrRsz$UserInterface.ui_set_upload_progresscCs tddS)z(Close debug data upload progress window.reNrfr r r rrU"sz%UserInterface.ui_stop_upload_progresscCsdS)zdCalled right before terminating the program. This can be used for for cleaning up. Nr r r r rr6'szUserInterface.ui_shutdowncCs tddS)aRun command in, or check for a terminal window. If command is given, run command in a terminal window; raise an exception if terminal cannot be opened. If command is None, merely check if a terminal application is available and can be launched. reNrf)rcZcommandr r rr.s zUserInterface.ui_run_terminalcCs tddS)Show a yes/no question. Return True if the user selected "Yes", False if selected "No" or "None" on cancel/dialog closing. reNrfrcrhr r rr>szUserInterface.ui_question_yesnocCs tddS)mShow an question with predefined choices. options is a list of strings to present. If multiple is True, they should be check boxes, if multiple is False they should be radio buttons. Return list of selected option indexes, or None if the user cancelled. If multiple == False, the list will always have one element. reNrfrcrhrZmultipler r rrFs z UserInterface.ui_question_choicecCs tddS)mShow a file selector dialog. Return path if the user selected a file, or None if cancelled. reNrfrjr r rui_question_fileRszUserInterface.ui_question_filecCs tddS)zRequest username and password from user. message is the text to be presented to the user when requesting for username and password information. Return a tuple (username, password), or None if cancelled. reNrf)rcrLr r rrSYsz"UserInterface.ui_question_userpass)T)N)NFN)TN)1__name__ __module__ __qualname____doc__rdrsrrrqrrrrrrrrrrbrrrr r{ryrrrrNrrprrcrrrrrr&r,r4rQrRrUr6rrrrnrSr r r rrWsb6 f ) nR1 2r   P@I%%   rWc@sJeZdZdZddZddZddZdd d Zd d Zd dZ ddZ dS)r'agInteractive functions which can be used in package hooks. This provides an interface for package hooks which need to ask interactive questions. Directly passing the UserInterface instance to the hooks needs to be avoided, since we need to call the UI methods in a different thread, and also don't want hooks to be able to poke in the UI. cCs0||_t|_t|_d|_d|_d|_dS)zSCreate a HookUI object. ui is the UserInterface instance to wrap. N)rP threadingZEvent_request_event_response_event _request_fn _request_args _response)rcrPr r rrdls   zHookUI.__init__cCs|dd|S)zShow an information with OK/Cancel buttons. This can be used for asking the user to perform a particular action, such as plugging in a device which does not work. rr_trigger_ui_requestrjr r r information~szHookUI.informationcCs |d|S)rirryrjr r ryesnosz HookUI.yesnoFcCs|d|||S)rkrryrlr r rchoices z HookUI.choicecCs |d|S)rmrnryrjr r rfilesz HookUI.filecGsf|jrt|jrt|jdks*td|_||_||_|j|jd|_|j |jS)z5Called by HookUi functions in info collection thread.N) rtis_setr rurvrxrwsetrBr/)rcfnrr r rrzs   zHookUI._trigger_ui_requestcCsV|jd|jsdS|jr(t|jt|j|j|j |_ |j dS)z;Called by GUI thread to check and process hook UI requests.r"N) rtrBrrur r/getattrrPrvrwrxrr r r rr-s   zHookUI.process_eventN)F) rorprqrrrdr{r|r}r~rzr-r r r rr'ds  r')NF)+rrrros.pathrrr?r r`rrrr2rrrsrHrrrr8apport.fileutilsZapport.REThreadZapport.crashdbrrHrrrrj configparserrrrGrrrrr"r+rVrWr'r r r rsPH       l1