ó
¨M‘Nc           @   s;   d  Z  d d l Z d d l Z d d l Td Z d „  Z 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ÿÿÿÿN(   t   *s   /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 ƒ s– d |  d <d  S|  d d k r³ d |  d <n  |  j d d
 ƒ t |  ƒ t |  ƒ t	 |  ƒ t
 d g ƒ |  d <t  j d |  d ƒ } | j t  j d |  d ƒ ƒ | rŽt t | ƒ ƒ } d j | ƒ |  d <|  d c d 7<|  j d ƒ rŽd |  j d ƒ |  d <qŽn  t |  d d d ƒt j ƒ  d } d | } d | } t |  | | d  g ƒ d! |  k rc|  d! d" k rcd# |  k rct j j t ƒ rct |  d$ g ƒ | d  k	 rc|  d# } t  j d% d
 | ƒ } t  j d& | ƒ }	 t  j d' | ƒ }
 t  j d( | ƒ } t  j d) | ƒ } d
 } |	 rº| |	 j d* ƒ 7} n  |
 rÖ| |
 j d* ƒ 7} n  | rò| | j d* ƒ 7} n  | r|  d c d+ | j d, ƒ 7<n  | j d- | ƒ r`|  d# } t j t d. t j ƒ} | j | ƒ q`qcn  |  j d/ ƒ d0 k r‹t |  d1 g ƒ n  d  S(2   Ns   -(.*?)-t   Unamei   t   999s   ^0s;  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   SourcePackages
   linux-metat   linuxt   Tagss%   /usr/share/apport/dump_acpi_tables.pyt
   AcpiTabless+   (\w+): module is from the staging directoryt	   BootDmesgt   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   ---.*
s   .*
s   (R|E)?IP\:.*
s   (R|E)?IP(:| is at) .*\[(.*)\]
s   Call Trace(.*
){,10}i    s    kernel-driver-%si   sB  This report may also be submitted to http://kerneloops.org/ in order to help collect aggregate information about kernel problems. This aids in identifying widespread issues and problematic areas. A condensed summary of the Oops is shown below.  Would you like to submit information about this crash to kerneloops.org ?

%st   stdint   ProblemTypet   Packages   grub-pc(   t   ret   searcht   groupt   informationt   gett
   startswitht
   setdefaultt   attach_hardwaret   attach_alsat   attach_wifit   root_command_outputt   findallt   extendt   listt   sett   joint   attach_file_if_existst   ost   unamet   attach_related_packagest   patht   existst   SUBMIT_SCRIPTt   Nonet   subt   matcht   yesnot
   subprocesst   Popent   PIPEt   communicate(   t   reportt   uit   abit   version_signaturet   staging_driverst   uname_releaset   lrm_package_namet   lbm_package_namet   summaryt
   first_linet   ipt   kernel_drivert
   call_traceR   t   textt   proc(    (    s4   /usr/share/apport/package-hooks/source_linux-meta.pyt   add_info   sn    6







 	

(   t   __doc__t   os.pathR(   R2   t   apport.hookutilsR-   RE   (    (    (    s4   /usr/share/apport/package-hooks/source_linux-meta.pyt   <module>   s
   
