ó
dÙÉ]c           @   s»   d  Z  d d l Z d d l Z d d l Z d d l Z d Z d „  Z e d k r· e j	 ƒ  Z
 e
 j ƒ  e
 j ƒ  d e
 d <e e
 d ƒ x, e
 j ƒ  D] \ Z Z d e e f GHq• Wn  d S(	   sü  Apport package hook for the Linux kernel.

(c) 2008 Canonical Ltd.
Contributors:
Matt Zimmerman <mdz@canonical.com>
Martin Pitt <martin.pitt@canonical.com>
Brian Murray <brian@canonical.com>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
the full text of the license.
iÿÿÿÿNs   /usr/bin/kerneloops-submitc         C   sÀ  t  j d |  d ƒ } | rg | j d ƒ d k sL t  j d | j d ƒ ƒ rg | j d ƒ d |  d <d  S|  j d	 d
 ƒ } | j d ƒ r£ d |  k r£ d |  d <d  SxG d d g D]9 } |  d j | ƒ r° |  d j | d d ƒ |  d <q° q° W|  j d d
 ƒ |  d j d ƒ r#|  d c d 7<n  t j	 j
 |  ƒ t j	 j |  ƒ t j	 j |  ƒ t j	 j |  d d ƒ t  j d |  d ƒ } | ræt t | ƒ ƒ } d j | ƒ |  d <|  d c d 7<|  j d ƒ ræd |  j d ƒ |  d <qæn  t j	 j |  d d d ƒt j ƒ  d  } d! | } d" | } t j	 j |  | | d# g ƒ d$ |  k r@|  d$ d% k r@d& |  k r@t j j t ƒ r@t j	 j |  d' g ƒ |  d& }	 d  }
 d  } xŒ |	 j ƒ  D]~ } | j d( ƒ rët  j d) ƒ } | j d* | ƒ }
 n  t  j d+ ƒ } t  j | | ƒ r²t  j d, ƒ } | j d- | ƒ } q²q²W|
 rW| rWd. |
 | f |  d/ <n  | rŽt  j d0 d
 |	 ƒ }	 t  j d1 |	 ƒ } t  j d2 |	 ƒ } t  j d3 |	 ƒ } t  j d4 |	 ƒ } d
 } | rÜ| | j d5 ƒ 7} n  | rø| | j d5 ƒ 7} n  | r| | j d5 ƒ 7} n  | r=|  d c d6 | j d7 ƒ 7<q=qŽnN d$ |  k rŽd8 |  d$ k sld9 |  d$ k rŽ|  j ƒ  } | rŽ| |  d/ <qŽn  |  j d: ƒ d; k r¼t j	 j |  d< g ƒ n  d  S(=   Ns   -(.*?)-t   Unamei   t   999s   ^0\ds;  It appears you are currently running a mainline kernel.  It would be better to report this bug upstream at http://bugzilla.kernel.org/ so that the upstream kernel developers are aware of the issue.  If you'd still like to file a bug against the Ubuntu kernel, please boot with an official Ubuntu kernel and re-file.s*   The running kernel is not an Ubuntu kernelt   UnreportableReasont   ProcVersionSignaturet    s   Ubuntu t   CrashDBs
   linux-metas   linux-signedt   SourcePackaget   linuxt   Tagss
   linux-lts-s    qa-kernel-lts-testings   /proc/fbt   ProcFBs+   (\w+): module is from the staging directoryt   CurrentDmesgt    t   StagingDriverss    stagingt   Titles
   [STAGING] s"   /etc/initramfs-tools/conf.d/resumet   keyt   HibernationDevicei   s   linux-restricted-modules-%ss   linux-backports-modules-%ss   linux-firmwaret   Failuret   oopst   OopsTexts   kerneloops-daemons   BUG:s   at [0-9a-f]+$s   at locations	   ^[RE]?IP:s   \[<[0-9a-f]+>\]t   locations   %s %st   DuplicateSignatures   ---.*
s   .*
s   (R|E)?IP\:.*
s   (R|E)?IP(:| is at) .*\[(.*)\]
s   Call Trace(.*
){,10}i    s    kernel-driver-%si   t   resumet   suspendt   ProblemTypet   Packages   grub-pc(   t   ret   searcht   groupt   informationt   gett
   startswitht   replacet
   setdefaultt   apportt	   hookutilst   attach_hardwaret   attach_alsat   attach_wifit   attach_filet   findallt   listt   sett   joint   attach_file_if_existst   ost   unamet   attach_related_packagest   patht   existst   SUBMIT_SCRIPTt   Nonet
   splitlinest   compilet   subt   matcht   crash_signature(   t   reportt   uit   abit   version_signaturet   src_pkgt   staging_driverst   uname_releaset   lrm_package_namet   lbm_package_namet   oopstextt	   dupe_sig1t	   dupe_sig2t   linet   bugt   ript   loct
   first_linet   ipt   kernel_drivert
   call_traceR   R7   (    (    s:   /usr/share/apport/package-hooks/source_linux-signed-oem.pyt   add_info   sŒ    6

$	


&t   __main__s   Ubuntu 3.4.0R   s   %s: %s(   t   __doc__t   os.pathR,   R   R!   t   apport.hookutilsR1   RL   t   __name__t   Reportt   rt   add_proc_infot   add_os_infoR2   t   itemst   kt   v(    (    (    s:   /usr/share/apport/package-hooks/source_linux-signed-oem.pyt   <module>   s   	j


