403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/debian/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/debian/__pycache__/_arch_table.cpython-314.pyc
+
�
4i�G���Rt^RIt^RIHt^RIHtHtHtHtHtH	t	^RI
tRt]P!R.R
O4t!RR]4t!RR	4tR#)a�architecture matching

This leverages code from dpkg's Dpkg::Arch as well as python rewrites from
other people.  Copyright years imported from the sources.

@copyright: 2006-2015 Guillem Jover <guillem@debian.org>
@copyright: 2014, Ansgar Burchardt <ansgar@debian.org>
@copyright: 2014-2017, Johannes Schauer Marin Rodrigues <josch@debian.org>
@copyright: 2022, Niels Thykier <niels@thykier.net>
@license: GPL-2+
N)�PathLike)�Iterable�Optional�IO�List�Dict�Unionc#�"�VFFpVP4pV'dVPR4'dK4VP4x�KH	R#5i)�#N)�rstrip�
startswith�split)�fd�lines& �4/usr/lib/python3/dist-packages/debian/_arch_table.py�_parse_table_filer!s:������{�{�}���t���s�+�+���j�j�l��	�s
�4A�A�
_QuadTuplec�Raa�]tRt^-toRtV3Rlt]V3RlRl4tRtVt	V;t
#)�QuadTupleDpkgArchitecturez"Implementation detail of ArchTablec�V<�\V\4'd�VPRVP39;'dbVPRVP39;'d?VPRVP39;'dVP
RVP
39#\SV`V4#��any)�
isinstancer�api_name�	libc_name�os_name�cpu_name�super�__contains__)�self�item�	__class__s&&�rr�&QuadTupleDpkgArchitecture.__contains__0s�����d�5�6�6��=�=�U�D�M�M�$:�:�?�?��~�~�%����)@�@�?�?��|�|��t�|�|�'<�<�?�?��}�}���
�
�(>�>�
?��w�#�D�)�)�c� <�V^8�dQhRS[/#)��return)�bool)�format�
__classdict__s"�r�__annotate__�&QuadTupleDpkgArchitecture.__annotate__;s���-�-�T�-r#c�j�\;QJdRV4F'gKR#	R#!RV44#)c3�*"�TF	qR8Hx�K	R#5i�rN�)�.0�xs& r�	<genexpr>�8QuadTupleDpkgArchitecture.is_wildcard.<locals>.<genexpr><s���,�t�!��:�t�s�TFr)rs&r�is_wildcard�%QuadTupleDpkgArchitecture.is_wildcard:s+���s�,�t�,�s�s�,�s�,�s�,�t�,�,�,r#r/)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r�propertyr4�__static_attributes__�__classdictcell__�
__classcell__)r!r)s@@rrr-s&����,�*��-��-�-r#rc�va�]tRt^?toRt]RRl4t]R
Rl4tRtRt	Rt
RtR
RltR	t
R
tVtR#)�
DpkgArchTablec�<�WnR\RRRR4/VnR#r.)�_arch2tabler�_wildcard_cache)r�
arch2tuples&&r�__init__�DpkgArchTable.__init__As#��%���,�U�E�5�%�H� 
��r#c
�l�\PPVR4p\PPVR4pRp\PPV4'gJ\PPVR4p\PPV4'dRpTp\	VRR7;_uu_4p\	VRR7;_uu_4pVPWgVR7uuR	R	R	4uuR	R	R	4# +'giM;iR	R	R	4R	# +'giR	#;i)
a�Load the Dpkg Architecture Table

This class method loads the architecture table from dpkg, so it can be used.

>>> arch_table = DpkgArchTable.load_arch_table()
>>> arch_table.matches_architecture("amd64", "any")
True

The method assumes the dpkg "tuple arch" format version 1.0 or the older triplet format.

:param path: Choose a different directory for loading the architecture data.  The provided
  directory must contain the architecture data files from dpkg (such as "tupletable" and
  "cputable")
�
tupletable�cputableF�triplettableTzutf-8)�encoding)�triplet_compatN)�os�path�join�exists�open�
_from_file)�clsrN�tupletable_path�
cputable_pathrL�triplettable_path�tuple_fd�cpu_fds&&      r�load_arch_table�DpkgArchTable.load_arch_tableHs���&�'�'�,�,�t�\�:�������T�:�6�
����w�w�~�~�o�.�.� "�����T�>� B���w�w�|�|�-�.�.�!%��"3��
�/�G�
4�
4���]�W�5�5���>�>�(�>�>�R�6�5�5�
4�5�5��5�5�
4�
4�
4�s$�D"�D	�/
D"�D
�D"�"D3	c��/p\V4Uu.uFqU^,NK
	pp\V4F�pV^,pV^,p	V'd
RV,pRV9dKVFBp
VPRV
4pV	PRV
4p\VPR^4!WL&KD	Kw\VPR^4!WI&K�	\	V4#uupi)�zbase-z<cpu>�-)r�replacerr
r@)
rS�tuple_table_fd�cpu_table_fdrLrDr1�cpu_list�row�
dpkg_tuple�	dpkg_archr�debtuple_cpu�
dpkg_arch_cpus
&&&&         rrR�DpkgArchTable._from_filehs����
�"3�L�"A�B�"A�Q�a�D�D�"A��B�$�^�4�C��Q��J��A��I��$�z�1�
��*�$� (�H�#-�#5�#5�g�x�#H�L�$-�$5�$5�g�x�$H�M�0I�%�+�+�C��3�1�J�-�!)�)B�:�CS�CS�TW�YZ�C[�(\�
�%�!5�"�Z�(�(��%Cs�Cc��VPV,# \dMi;iTPR^4pRT9d/\T4^8dTP	^R4K$\T!pMTP
T4pY0PT&T#)r]r)rC�KeyErrorr
�len�insertr�_dpkg_arch_to_tuple)r�arch�
arch_tuple�results&&  r�_dpkg_wildcard_to_tuple�%DpkgArchTable._dpkg_wildcard_to_tuple�s���	��'�'��-�-���	��	���Z�Z��Q�'�
��J���j�/�A�%��!�!�!�U�+�.�
�;�F��-�-�d�3�F�%+���T�"��
s��#�#c�h�VPR4'd
VR,pVPV,#)zlinux-:�NN)rrB)rrds&&rrl�!DpkgArchTable._dpkg_arch_to_tuple�s-������)�)�!�"�
�I����	�*�*r#c��VRV39dR#VPV4pVPV4pW49# \dR#i;i)a
Determine if a dpkg architecture matches another architecture or a wildcard [debarch_is]

This method is the closest match to dpkg's Dpkg::Arch::debarch_is function.

>>> arch_table = DpkgArchTable.load_arch_table()
>>> arch_table.matches_architecture("amd64", "linux-any")
True
>>> arch_table.matches_architecture("i386", "linux-any")
True
>>> arch_table.matches_architecture("amd64", "amd64")
True
>>> arch_table.matches_architecture("i386", "amd64")
False
>>> arch_table.matches_architecture("all", "amd64")
False
>>> arch_table.matches_architecture("all", "all")
True
>>> # i386 is the short form of linux-i386. Therefore, it does not match kfreebsd-i386
>>> arch_table.matches_architecture("i386", "kfreebsd-i386")
False
>>> # Note that "armel" and "armhf" are "arm" CPUs, so it is matched by "any-arm"
>>> # (similar holds for some other architecture <-> CPU name combinations)
>>> all(arch_table.matches_architecture(n, 'any-arm') for n in ['armel', 'armhf'])
True
>>> # Since "armel" is not a valid CPU name, this returns False (the correct would be
>>> # any-arm as noted above)
>>> arch_table.matches_architecture("armel", "any-armel")
False
>>> # Wildcards used as architecture always fail (except for special cases noted in the
>>> # compatibility notes below)
>>> arch_table.matches_architecture("any-i386", "i386")
False
>>> # any-i386 is not a subset of linux-any (they only have i386/linux-i386 as overlap)
>>> arch_table.matches_architecture("any-i386", "linux-any")
False
>>> # Compatibility with dpkg - if alias is `any` then it always returns True
>>> # even if the input otherwise would not make sense.
>>> arch_table.matches_architecture("any-unknown", "any")
True
>>> # Another side effect of the dpkg compatibility
>>> arch_table.matches_architecture("all", "any")
True

Compatibility note: The method emulates Dpkg::Arch::debarch_is function and therefore
returns True if both parameters are the same even though they are wildcards or not known
to be architectures. Additionally, if `alias` is `any`, then this method always returns
True as `any` is the "match-everything-wildcard".

:param architecture: A string representing a dpkg architecture.
:param alias: A string representing a dpkg architecture or wildcard
       to match with.
:returns: True if the `architecture` parameter is (logically) the same as the `alias`
          parameter OR, if `alias` is a wildcard, the `architecture` parameter is a
          subset of the wildcard.
          The method returns False if `architecture` is not a known dpkg architecture,
          or it is a wildcard.
rTF)rlrpri)r�architecture�aliasrd�
dpkg_wildcards&&&  r�matches_architecture�"DpkgArchTable.matches_architecture�s[��v�U�L�)�)��	��0�0��>�I� �8�8��?�M��)�)���	��	�s�"3�A�Ac��W8XdR#VPV4pVPV4pW48H# \dR#i;i)a�Determine whether two dpkg architecture are exactly the same [debarch_eq]

Unlike Python's `==` operator, this method also accounts for things like `linux-amd64` is
a valid spelling of the dpkg architecture `amd64` (i.e.,
`architecture_equals("linux-amd64", "amd64")` is True).

This method is the closest match to dpkg's Dpkg::Arch::debarch_eq function.

>>> arch_table = DpkgArchTable.load_arch_table()
>>> arch_table.architecture_equals("linux-amd64", "amd64")
True
>>> arch_table.architecture_equals("amd64", "linux-i386")
False
>>> arch_table.architecture_equals("i386", "linux-amd64")
False
>>> arch_table.architecture_equals("amd64", "amd64")
True
>>> arch_table.architecture_equals("i386", "amd64")
False
>>> # Compatibility with dpkg: if the parameters are equal, then it always return True
>>> arch_table.architecture_equals("unknown", "unknown")
True

Compatibility note: The method emulates Dpkg::Arch::debarch_eq function and therefore
returns True if both parameters are the same even though they are wildcards or not known
to be architectures.

:param arch1: A string representing a dpkg architecture.
:param arch2: A string representing a dpkg architecture.
:returns: True if the dpkg architecture parameters are (logically) the exact same.
TF)rlri)r�arch1�arch2�
dpkg_arch1�
dpkg_arch2s&&&  r�architecture_equals�!DpkgArchTable.architecture_equals�sS��B�>��	��1�1�%�8�J��1�1�%�8�J��'�'���	��	�s�"0�?�?c��RpRpRp\V4pVPV4pTFyp	T	R8XdKT	^,R8XdRpMRpTeK%T	P4p	Rp
T	pT	^,R8XdRp
T	R,pTP	T4pY�9gKkT
pT'gKwTu#	T'gT'dT'd\R4hTfTpT# \dR#i;i)a�Determine if a dpkg architecture is part of a list of restrictions [debarch_is_concerned]

This method is the closest match to dpkg's Dpkg::Arch::debarch_is_concerned function.

Compatibility notes:
  * The Dpkg::Arch::debarch_is_concerned function allow matching of negative and positive
    restrictions by default.  Often, this behaviour is not allowed nor recommended and the
    Debian Policy does not allow this practice in e.g., Build-Depends.  Therefore, this
    implementation defaults to raising ValueError when this occurs.  If the original
    behaviour is needed, set `allow_mixing_positive_and_negative` to True.
  * The Dpkg::Arch::debarch_is_concerned function is lazy and exits as soon as it finds a
    match. This means that if negative and positive restrictions are mixed, then order of
    the matches are important. This adaption matches that behaviour (provided that
    `allow_mixing_positive_and_negative` is set to True)

>>> arch_table = DpkgArchTable.load_arch_table()
>>> arch_table.architecture_is_concerned("linux-amd64", ["amd64", "i386"])
True
>>> arch_table.architecture_is_concerned("amd64", ["!amd64", "!i386"])
False
>>> # This is False because the "!amd64" is matched first.
>>> arch_table.architecture_is_concerned("linux-amd64", ["!linux-amd64", "linux-any"],
...                                      allow_mixing_positive_and_negative=True)
False
>>> # This is True because the "linux-any" is matched first.
>>> arch_table.architecture_is_concerned("linux-amd64", ["linux-any", "!linux-amd64"],
...                                      allow_mixing_positive_and_negative=True)
True

:param architecture: A string representing a dpkg architecture/wildcard.
:param architecture_restrictions: A list of positive (amd64) or negative (!amd64) dpkg
                                  architectures or/and wildcards.
:param allow_mixing_positive_and_negative: If True, the `architecture_restrictions` list
                               can mix positive and negative (e.g., ["!any-amd64", "any"])
                               restrictions. If False, mixing will trigger a ValueError.
:returns: True if `architecture` is accepted by the `architecture_restrictions`.
NF��!T:�NNz�architecture_restrictions contained mixed positive and negativerestrictions (and allow_mixing_positive_and_negative was not True))�iterrlri�lowerrp�
ValueError)
rrv�architecture_restrictions�"allow_mixing_positive_and_negative�verdict�positive_match_seen�negative_match_seen�arch_restriction_iterrd�arch_restriction�verdict_if_matched�arch_restriction_positiverxs
&&&&         r�architecture_is_concerned�'DpkgArchTable.architecture_is_concerneds#��\��#��#�� $�%>� ?��	��0�0��>�I�!6�� �2�%����"�c�)�&*�#�&*�#��"�� 0�5�5�7��!%��(8�%���"�c�)�%*�"�,<�R�,@�)� �8�8�9R�S�M��)�,��5�5�#�N�C!6�F2�6I�Na��b�c�
c��?�)�G����_�	��	�s�C�C�Cc�b�VPV4pVP# \dR#i;i)aPDetermine if a given string is a dpkg wildcard [debarch_is_wildcard]

This method is the closest match to dpkg's Dpkg::Arch::debarch_is_wildcard function.

>>> arch_table = DpkgArchTable.load_arch_table()
>>> arch_table.is_wildcard("linux-any")
True
>>> arch_table.is_wildcard("amd64")
False
>>> arch_table.is_wildcard("unknown")
False
>>> # Compatibility with the dpkg version of the function.
>>> arch_table.is_wildcard("unknown-any")
True

Compatibility note: The original dpkg function does not ensure that the wildcard matches
  any supported architecture and this re-implementation matches that behaviour.  Therefore,
  this method can return True for a wildcard that can never match anything in practice.

:param wildcard: A string that might represent a dpkg architecture or wildcard.
:returns: True the parameter is a known dpkg wildcard.
F)rprir4)r�wildcardrds&& rr4�DpkgArchTable.is_wildcardrs9��0	��4�4�X�>�I�
�$�$�$��	�	��	�s��.�.)rBrCN)z/usr/share/dpkg)F)r6r7r8r9rE�classmethodrYrRrprlryr�r�r4r<r=)r)s@rr@r@?s\����
��S��S�>�)��)�.�&+�D*�L*(�Xd�L%�%r#r@)rrrr)r:rMr�typingrrrrrr�collections.abc�collectionsr�
namedtuplerrr@r/r#r�<module>r�sM��
�2
��<�<����
#�
#�L�2b�
c�
�-�
�-�$Q%�Q%r#

Youez - 2016 - github.com/yon3zu
LinuXploit