³ò
à ŠHc           @   sÀ   d  d k  Z  d  d k Z d  d k  l Z d  d k l Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ e	 d j oK d  d k
 Z
 e e
 i d	 ƒ Z e d
 GHe d GHd GHd i e i ƒ GHn d S(   iÿÿÿÿN(   t   arCheckMember(   t   gettextt   NoDebArchiveExceptionc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s/   /usr/lib/python2.5/site-packages/apt/debfile.pyR      s   t
   DebPackagec           B   sA   e  Z d Z d d „ Z d „  Z d „  Z d „  Z e e ƒ Z RS(	   s   data.tar.gzs   data.tar.bz2s   data.tar.lzmac         C   s%   h  |  _  | o |  i | ƒ n d  S(   N(   t   _sectiont   open(   t   selft   filename(    (    s/   /usr/lib/python2.5/site-packages/apt/debfile.pyt   __init__   s    	c         C   sw   | |  _  t t |  i  ƒ d ƒ p t t d d ƒ ‚ n t i t |  i  ƒ ƒ } t i | ƒ |  _	 |  i	 d |  _
 d S(   s    open given debfile s   debian-binarys4   This is not a valid DEB archive, missing '%s' membert   PackageN(   R	   R    R   R   t   _t   apt_instt   debExtractControlt   apt_pkgt   ParseSectiont	   _sectionst   pkgname(   R   R	   t   control(    (    s/   /usr/lib/python2.5/site-packages/apt/debfile.pyR      s    	c         C   s   |  i  | S(   N(   R   (   R   t   key(    (    s/   /usr/lib/python2.5/site-packages/apt/debfile.pyt   __getitem__   s    c      	      s—   g  ‰  ‡  f d †  } x{ |  i  D]p } t t |  i ƒ | ƒ oQ y! t i t |  i ƒ | | ƒ PWq t j
 o } t d |  i ƒ g Sq Xq q Wˆ  S(   s%    return the list of files in the deb c
   
         s   ˆ  i  | ƒ d  S(   N(   t   append(
   t   Whatt   Namet   Linkt   Modet   UIDt   GIDt   Sizet   MTimet   Majort   Minor(   t   files(    s/   /usr/lib/python2.5/site-packages/apt/debfile.pyt
   extract_cb"   s    s'   List of files for '%s'could not be read(   t   _supported_data_membersR    R   R	   R   t
   debExtractt   SystemErrorR   (   R   R"   t   membert   e(    (   R!   s/   /usr/lib/python2.5/site-packages/apt/debfile.pyt   filelist   s    
 !(   s   data.tar.gzs   data.tar.bz2s   data.tar.lzmaN(	   R   R   R#   t   NoneR
   R   R   R(   t   property(    (    (    s/   /usr/lib/python2.5/site-packages/apt/debfile.pyR   
   s   				t   __main__i   t   Sectiont
   Maintainers   Files:s   
(   R   R   R    R   R   t   IOErrorR   t   objectR   R   t   syst   argvt   dt   joinR(   (    (    (    s/   /usr/lib/python2.5/site-packages/apt/debfile.pys   <module>   s   (		