| 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 : /proc/thread-self/root/lib/python3/dist-packages/debian/__pycache__/ |
Upload File : |
a
|P�_VB � @ sr d Z ddlmZmZ ddlZddlZddlZddlZzDddl m
Z
mZmZm
Z
mZmZmZmZmZmZmZ ddlmZ W n ey� dd� ZY n0 ddlmZmZmZ dd lmZ dd
lmZ dZ dZ!g d
�Z"dZ#g d�Z$dZ%dZ&dZ'dZ(G dd� de�Z)G dd� de*�Z+G dd� de+�Z,G dd� de+�Z-G dd� de�Z.e/dk�rne.ej0d d �Z1e1j2�3� Z3e4e3�5d�� dS )!zX Representation of Debian binary package (.deb) files
Debfile Classes
===============
� )�absolute_import�print_functionN)�Any�BinaryIO�Dict�IO�Iterator�List�Optional�Text�TypeVar�Union�overload)�Literalc C s d S �N� )�fr r �0/usr/lib/python3/dist-packages/debian/debfile.py�<lambda>3 � r )�ArFile�ArError�ArMember)� Changelog)�Deb822zdata.tarzcontrol.tar)�gz�bz2�xzZlzmaz
debian-binary)ZpreinstZpostinstZprermZpostrmZconfig�controlzusr/share/doc/%s/changelog.gzz$usr/share/doc/%s/changelog.Debian.gz�md5sumsc @ s e Zd ZdS )�DebErrorN��__name__�
__module__�__qualname__r r r r r G s r c @ s� e Zd ZdZdd� Zdd� Zedd� �Zdd � Ze ddd��Z
e d d
d��Z
d!dd�Z
e d"dd��Ze d#dd��Zd$dd�Zdd� Zdd� Z
ejd dk r�dd� Zdd� Zdd� Zd
S )%�DebParta� 'Part' of a .deb binary package.
A .deb package is considered as made of 2 parts: a 'data' part
(corresponding to the possibly compressed 'data.tar' archive embedded
in a .deb) and a 'control' part (the 'control.tar.gz' archive). Each of
them is represented by an instance of this class. Each archive should
be a compressed tar archive although an uncompressed data.tar is permitted;
supported compression formats are: .tar.gz, .tar.bz2, .tar.xz .
When referring to file members of the underlying .tar.gz archive, file
names can be specified in one of 3 formats "file", "./file", "/file". In
all cases the file is considered relative to the root of the archive. For
the control part the preferred mechanism is the first one (as in
deb.control.get_content('control') ); for the data part the preferred
mechanism is the third one (as in deb.data.get_file('/etc/vim/vimrc') ).
c C s || _ d | _d S r )�_DebPart__member�
_DebPart__tgz)�self�memberr r r �__init__] s zDebPart.__init__c
st | j du �rn| jj}tj�|�d dd� }|tv sF|tksF|tk�rbt j
dk �r
|dk�r
z@ddl}ddl� ddl
}|jddg|j|jd� fd d
�d�}W n4 ttfy� } ztd| ��W Y d}~n
d}~0 0 |�| j�� �d }|jdkr�td
|j ��|�|�}n| j}ztj|dd�| _ W n: tjtjf�y^ } ztd| ��W Y d}~n
d}~0 0 ntd| ��| j S )z�Return a TarFile object corresponding to this part of a .deb
package.
Despite the name, this method gives access to various kind of
compressed tar archives, not only gzipped ones.
N� )� r, r r Zunxzz--stdoutFc s � � � j� j�S r )�signal�SIGPIPE�SIG_DFLr �r- r r r | s zDebPart.tgz.<locals>.<lambda>)�stdin�stdoutZuniversal_newlinesZ
preexec_fnz%sz!command has failed with code '%s'zr:*)�fileobj�modez#tarfile has returned an error: '%s'z"part '%s' has unexpected extension)r'