
    xkd                     T    d dl mZ d dlZd dlZd dlmZmZ d dlZd dlZd Z	d Z
d ZdS )    )print_functionN)OptionalTuplec                     |dz  }|dz  }| j         |z   | j        |z   dz  z   }| j        |z   dz  }|dk    rd}|dz  }||fS )z
    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
       r      )yearmonth)release_datem_monthsyearsmonthssupport_end_yearsupport_end_months         +/usr/lib/python3/dist-packages/apt/utils.pyget_maintenance_end_dater      sr     NE]F#(50L4F4OTV3VV%+f4:AA/00    c                 j   | rt           j                            |           sdS t          j        t	          j        |                     5 }t	          j        |          }t          |          }d|vr	 ddd           dS |d         }t	          j        |          cddd           S # 1 swxY w Y   dS )zF
    return the release date as time_t for the given release file
    NDate)	ospathexistsfdopenapt_pkgopen_maybe_clear_signed_fileTagFilenextstr_to_time)r   datatagsectiondates        r   "get_release_date_from_release_filer#   1   s   
  rw~~d++ t	77==	>	> )$od##s))  	) ) ) ) ) ) ) )
 v"4(() ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )s   
)B( B((B,/B,c                 j   || vrdS | |         }d}|j         j        D ]<}||j        |j        D ](\  }}|j        |k    r|j        |k    r|j        |k    r|})=|sdS | j                            |j        d         d                   }	| j        j        D ]}
|
j	        D ]}|	r|	j
        |j
        k    r|	j        rxt          j                            d          }dD ]V}t          j        |
j                  d|
j        d|z   }t$          j                            ||z             r||z   c c c S WdS )z+get the release file that provides this pkgNr   zDir::State::lists)	InReleaseReleasedists__)_pkgversion_list	file_listoriginlabelarchive_list
find_indexlistindex_filesdescribe
is_trustedr   configfind_diruri_to_filenameuridistr   r   r   )cachepkgnamer-   releasepkgveraverver_file_index	indexfile	metaindexmdirnamerelfilenames                  r   get_release_filename_for_pkgrH   B   s    et
.C
C % 
 
<4>1 $ 	 	Hf 5((Ne++$//	  t&&s}Q'7':;;I[% 
. 
.	& 		. 		.A .Y/1:==)BV=!.112EFF7 . .G"29=AAA!E D w~~gn55 .&~-------.		. 4r   )
__future__r   datetimer   typingr   r   aptr   r   r#   rH    r   r   <module>rN      s   & & % % % % %  				 " " " " " " " " 



 1 1 1&) ) )"" " " " "r   