HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/thread-self/root/lib/python3/dist-packages/apt/__pycache__/utils.cpython-38.pyc
U

&��cl�@s�ddlmZddlZddlZzddlmZmZeeWnek
rLYnXddlZddl	Z	eeedd�Z
dd�Zdd	�ZdS)
�)�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_date's�r	c
Csv|rtj�|�sdSt�t�|���H}t�|�}t|�}d|krNW5QR�dS|d}t�|�W5QR�SQRXdS)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_file;s
rcCs||krdS||}d}|jjD]J}|dks |jdkr8q |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_pkgLs@
��

��
�r)
Z
__future__rZdatetimer
�typingrr�ImportErrorZaptrr	rrrrrr�<module>s