| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/apt/__pycache__/ |
Upload File : |
a
�?i�
� @ sX d dl mZ d dlZd dlZd dlmZmZ d dlZd dlZdd� Z dd� Z
dd � ZdS )
� )�print_functionN)�Optional�Tuplec C sR |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)Zrelease_dateZm_monthsZyearsZmonthsZsupport_end_yearZsupport_end_month� r �+/usr/lib/python3/dist-packages/apt/utils.py�get_maintenance_end_date s �r c C s� | rt j�| �sdS t �t�| ���L}t�|�}t|�}d|vrPW d � dS |d }t�|�W d � S 1 sv0 Y dS )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�dater r r �"get_release_date_from_release_file2 s
r c C s || vrdS | | }d}|j jD ]J}|du s |jdu r8q |jD ]*\}}|j|kr>|j|kr>|j|kr>|}q>q |stdS | j�|jd d �} | jjD ]z}
|
j D ]n}| r�| j
|j
kr�| jr�tj
�d�}dD ]B}
t�|
j�d|
j|
f }tj�|| �r�|| S q�q�q�dS )z- get the release file that provides this pkg Nr zDir::State::lists)Z InReleaseZReleasezdists_%s_%s)Z_pkgZversion_listZ file_list�origin�label�archiveZ_listZ
find_index�listZindex_filesZdescribeZ
is_trustedr ZconfigZfind_dirZuri_to_filenameZuriZdistr
r r )�cacheZpkgnamer �release�pkgZverZaverZver_fileZ_indexZ indexfileZ metaindex�m�dirnameZrelfile�namer r r �get_release_filename_for_pkgC s@
��
��
�r )Z
__future__r Zdatetimer
�typingr r Zaptr r r r r r r r �<module> s