ó
qxPXc           @   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 j d ƒ rÉ |  d j d d d ƒ |  d <n  |  j d d
 ƒ |  d j d ƒ rÿ |  d c d 7<n  t |  ƒ t	 |  ƒ t
 |  ƒ t |  d d ƒ 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 rj|  d% d& k rjd' |  k rjt j j t ƒ rjt |  d( g ƒ | d  k	 rj|  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  | rg|  d c d/ | j d0 ƒ 7<qgqjn  |  j d1 ƒ d2 k r’t |  d3 g ƒ n  d  S(4   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
   linux-lts-s    qa-kernel-lts-testings   /proc/fbt   ProcFBs%   /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   t   ProblemTypet   Packages   grub-pc(   t   ret   searcht   groupt   informationt   gett
   startswitht   replacet
   setdefaultt   attach_hardwaret   attach_alsat   attach_wifit   attach_filet   root_command_outputt   findallt   extendt   listt   sett   joint   attach_file_if_existst   ost   unamet   attach_related_packagest   patht   existst   SUBMIT_SCRIPTt   Nonet   subt   match(   t   reportt   uit   abit   version_signaturet   staging_driverst   uname_releaset   lrm_package_namet   lbm_package_namet   summaryt
   first_linet   ipt   kernel_drivert
   call_traceR   (    (    s9   /usr/share/apport/package-hooks/source_linux-lts-saucy.pyt   add_info   sj    6

 





&(   t   __doc__t   os.pathR*   t
   subprocesst   apport.hookutilsR/   R@   (    (    (    s9   /usr/share/apport/package-hooks/source_linux-lts-saucy.pyt   <module>   s
   
