ó
ýGpNc           @   s‡   d  Z  d d l Z d d l Z d d l Z d d l Z d „  Z e d k rƒ i  Z e e d ƒ x" e D] Z
 e
 Gd Ge e
 GHqe Wn  d S(   sA   Attach generally useful information, not specific to any package.iÿÿÿÿNc         C   s¾  t  j j ƒ  } | r+ d j | ƒ |  d <n  i d d 6d d 6} t j d ƒ } | ra d | | <n  d } xX | D]P } t j | ƒ } | j | j d	 } | | k  rn d
 | | | f |  d <qn qn Wd |  k r<|  d }	 t  j j	 |	 d ƒ st  j j	 |	 d ƒ r<t
 j d ƒ }
 t  j j |
 ƒ } | r9| |  d <q9q<n  d |  k rt ƒ  } xX t
 j d |  d t
 j ƒ D]: } t  j j | j d ƒ ƒ sn| j | j d ƒ ƒ qnqnW| r| j d d j | ƒ ƒ s×t ‚ n  d j | ƒ |  d <|  j d d ƒ d j ƒ  |  d <qn  t j j t j j d ƒ ƒ r;d |  d <n  d |  j d ƒ pPd j ƒ  d k r…d  t  j j d! ƒ k r…d" |  d <n  d# |  j d$ d ƒ k rº|  d% d& k rºd' |  d <n  d  S((   Nt    t   NonfreeKernelModulest   systemt   /s   /vart   HOMEt   homei
   i@B s™   Your %s partition has less than %s MB of free space available, which leads to problems using applications and installing updates. Please free some space.t   UnreportableReasont   ExecutablePatht   libgtkt   libX11sG   ^(\(.*:\d+\): \w+-(WARNING|CRITICAL|ERROR))|(Error: .*No Symbols named)t   XsessionErrorst   ProcMapss   \s(/[^ ]+\.so[.0-9]*)$i   sÉ   The crashed program seems to use third-party or local libraries:

%s

It is highly recommended to check if the problem persists without those first.

Do you want to continue the report process anyway?
s   
t   LocalLibrariest   Tagst    s    local-libss   ~/.ecryptfs/wrapped-passphraset   Yest   EcryptfsInUses   /usr/lib/libGL.sot   StacktraceTopi    s   Loading extension GLXs   /var/log/Xorg.0.logs_   The X.org server does not support the GLX extension, which the crashed program expected to use.s   Segmentation faultt   ErrorMessaget   ProblemTypet   Packages‹   The package installation resulted in a segmentation fault which is better reported as a crash report rather than a package install failure.(   t   apportt	   hookutilst   nonfree_kernel_modulest   joint   ost   getenvt   statvfst   f_bavailt   f_frsizet   links_with_shared_libraryt   ret   compilet   xsession_errorst   sett   finditert   Mt	   fileutilst   likely_packagedt   groupt   addt   yesnot   StopIterationt   gett   stript   patht   existst
   expandusert
   splitlinest	   read_file(   t   reportt   uit   nmt   mountsR   t   tresholdt   mountt   stt   free_mbR-   t   patternR!   t
   local_libst   lib(    (    s*   /usr/share/apport/general-hooks/generic.pyt   add_info   sR    


	#	&%t   __main__t   :(   t   __doc__R   R   t   apport.hookutilsR   t   apport.fileutilsR=   t   __name__t   rt   Nonet   k(    (    (    s*   /usr/share/apport/general-hooks/generic.pyt   <module>   s   	D