ó
dÙÉ]c           @   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
 d e
 e e
 f 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 r^|  d }	 t  j	 j
 |	 d ƒ pt  j	 j
 |	 d ƒ pt  j	 j
 |	 d ƒ }
 |
 r^t  j j |  ƒ r^t  j j ƒ  } | r[| |  d <q[q^n  d |  k r8t ƒ  } xX t j d |  d t j ƒ D]: } t  j	 j | j d ƒ ƒ s| j | j d ƒ ƒ qqW| r8| r8| j d d j | ƒ ƒ sÿt ‚ n  d j | ƒ |  d <|  j d d ƒ d j ƒ  |  d <q8n  d |  j d d ƒ k sh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* d, k r…t j j d- ƒ r…t  j j d. d/ d0 d1 g ƒ |  d2 <q…n  d  S(3   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   Crashs   /run/systemd/systemt
   journalctls   -bs   --priority=warnings   --lines=1000t   JournalErrors(   t   apportt	   hookutilst   nonfree_kernel_modulest   joint   ost   getenvt   statvfst   f_bavailt   f_frsizet	   fileutilst   links_with_shared_libraryt   in_session_of_problemt   xsession_errorst   sett   ret   finditert   Mt   likely_packagedt   groupt   addt   yesnot   StopIterationt   gett   stript   patht   existst
   expandusert
   splitlinest	   read_filet   command_output(   t   reportt   uit   nmt   mountsR   t   tresholdt   mountt   stt   free_mbR1   t   gtk_likeR%   t
   local_libst   libt   in_gl(    (    s*   /usr/share/apport/general-hooks/generic.pyt   add_info   sb    


	#	&0#%	t   __main__s   %s: %s(   t   __doc__R   R'   t   apport.hookutilsR   t   apport.fileutilsRC   t   __name__t   rt   Nonet   k(    (    (    s*   /usr/share/apport/general-hooks/generic.pyt   <module>   s   	N