ó
qxPXc           @   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 6d d 6} t j d ƒ } | rh d | | <n  d	 } xX | D]P } t j | ƒ } | j | j d
 } | | k  ru d | | | f |  d <qu qu Wd |  k rX|  d }	 t  j j	 |	 d ƒ st  j j	 |	 d ƒ st  j j	 |	 d ƒ rXt  j j
 |  ƒ rXt  j j ƒ  }
 |
 rU|
 |  d <qUqXn  d |  k r,t ƒ  } xX t j d |  d t j ƒ D]: } t  j j | j d ƒ ƒ sŠ| j | j d ƒ ƒ qŠqŠW| r,| j d d j | ƒ ƒ sót ‚ n  d j | ƒ |  d <|  j d d ƒ d j ƒ  |  d <q,n  d |  j d d ƒ k s\d |  j d d ƒ k r|  j d d ƒ d j ƒ  |  d <n  t j j t j j d ƒ ƒ rªd  |  d! <n  d" |  j d# ƒ p¿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   /vars   /tmpt   HOMEt   homei2   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   libgtks   libgtk-3t   libX11t   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   [origin:t   Packaget   Dependenciess    third-party-packagess   ~/.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   ProblemTypes‹   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   in_session_of_problemt   xsession_errorst   sett   ret   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.   R!   t
   local_libst   lib(    (    s*   /usr/share/apport/general-hooks/generic.pyt   add_info   sZ    


	#	&0#%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   	I