Ñò
iNc           @   s7   d  d k  Z d  d k Z d   Z d   Z d   Z d S(   i˙˙˙˙Nc         C   sl   | d } | d } |  i  | |  i | d } |  i | d } | d j o d } | d 8} n | | f S(   s³   
    get the (year, month) tuple when the maintenance for the distribution
    ends. Needs the data of the release and the number of months that
    its is supported as input
    i   i    i   (   t   yeart   month(   t   release_datet   m_monthst   yearst   monthst   support_end_yeart   support_end_month(    (    s-   /usr/lib/python2.6/dist-packages/apt/utils.pyt   get_maintenance_end_date   s    


c         C   sk   |  p t  i i |   o d St i t |    } | i   } d | j o d S| d } t i |  S(   sF   
    return the release date as time_t for the given release file
    t   DateN(	   t   ost   patht   existst   Nonet   apt_pkgt   TagFilet   opent   nextt   str_to_time(   R   t   tagt   sectiont   date(    (    s-   /usr/lib/python2.6/dist-packages/apt/utils.pyt"   get_release_date_from_release_file,   s    
c         C   se  | |  j o d S|  | } d } x | i i D]~ } | d j p | i d j o q/ n xQ | i D]F \ } } | i | j o* | i | j o | i | j o
 | } qc qc Wq/ W| p d S|  i i | i d d  }	 x |  i i	 D]v }
 xm |
 i
 D]b } |	 oU |	 i | i j oB |	 i o8 t i i d  } t i |
 i  d |
 i } | | Sq÷ Wqç Wd S(   s-    get the release file that provides this pkg i    s   Dir::State::listss   dists_%s_ReleaseN(   R   t   _pkgt   version_listt	   file_listt   origint   labelt   archivet   _listt
   find_indext   listt   index_filest   describet
   is_trustedR   t   configt   find_dirt   uri_to_filenamet   urit   dist(   t   cachet   pkgnameR   t   releaset   pkgt   vert   avert   ver_filet   _indext	   indexfilet	   metaindext   mt   dirnamet   name(    (    s-   /usr/lib/python2.6/dist-packages/apt/utils.pyt   get_release_filename_for_pkg:   s:    
 
  
 
(   t   os.pathR
   R   R   R   R5   (    (    (    s-   /usr/lib/python2.6/dist-packages/apt/utils.pyt   <module>   s   		