HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/apt/__pycache__/utils.cpython-39.pyc
a

?��`�
�@sXddlmZddlZddlZddlmZmZddlZddlZdd�Z	dd�Z
dd	�ZdS)
�)�print_functionN)�Optional�TuplecCsR|d}|d}|j||j|d}|j|d}|dkrJd}|d8}||fS)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�)ZyearZmonth)Zrelease_dateZm_monthsZyearsZmonthsZsupport_end_yearZsupport_end_month�r�+/usr/lib/python3/dist-packages/apt/utils.py�get_maintenance_end_dates�r	cCs�|rtj�|�sdSt�t�|���L}t�|�}t|�}d|vrPWd�dS|d}t�|�Wd�S1sv0YdS)zF
    return the release date as time_t for the given release file
    NZDate)	�os�path�exists�fdopen�apt_pkgZopen_maybe_clear_signed_fileZTagFile�nextZstr_to_time)r�data�tagZsection�daterrr�"get_release_date_from_release_file2s
rcCs||vrdS||}d}|jjD]J}|dus |jdur8q |jD]*\}}|j|kr>|j|kr>|j|kr>|}q>q |stdS|j�|jdd�}	|jjD]z}
|
j	D]n}|	r�|	j
|j
kr�|	jr�tj
�d�}dD]B}
t�|
j�d|
j|
f}tj�||�r�||Sq�q�q�dS)z- get the release file that provides this pkg NrzDir::State::lists)Z	InReleaseZReleasezdists_%s_%s)Z_pkgZversion_listZ	file_list�origin�label�archiveZ_listZ
find_index�listZindex_filesZdescribeZ
is_trustedrZconfigZfind_dirZuri_to_filenameZuriZdistr
rr)�cacheZpkgnamer�release�pkgZverZaverZver_fileZ_indexZ	indexfileZ	metaindex�m�dirnameZrelfile�namerrr�get_release_filename_for_pkgCs@
��

��
�r)Z
__future__rZdatetimer
�typingrrZaptrr	rrrrrr�<module>s