/usr/lib/python3/dist-packages/landscape/lib/apt/package/__pycache__
Edit: /usr/lib/python3/dist-packages/landscape/lib/apt/package/__pycache__/skeleton.cpython-310.pyc (5164B)
o
¶žâcô ã @ s² d dl mZmZ d dlmZ d dlZdZdZdZdZ dZ
d eB Zd
eB ZdeB Z
deB Zd
eB Zde B Zde
B ZG dd„ deƒZG dd„ deƒZdd„ Z ddd„Zddd„ZdS )é )ÚunicodeÚ_PY3)Úsha1Né é é é é i i i i i i i c @ s e Zd ZdZdS )ÚPackageTypeErrorzDRaised when an unsupported package type is passed to build_skeleton.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r r úD/usr/lib/python3/dist-packages/landscape/lib/apt/package/skeleton.pyr
s r
c @ sD e Zd ZdZdZdZdZdZdZdd„ Z dd„ Z
dd„ Zdd „ ZdS )
ÚPackageSkeletonNc C s || _ || _|| _g | _d S ©N)ÚtypeÚnameÚversionÚ relations)Úselfr r r r r r Ú__init__# s
zPackageSkeleton.__init__c C s | j ||f¡ d S r )r Úappend)r r Úinfor r r Úadd_relation) s zPackageSkeleton.add_relationc C sp | j dur| j S d| j| j| jf d¡}t|ƒ}| j ¡ | jD ]}| d|d |d f d¡¡ q!| ¡ S )zšCalculate the package hash.
If C{set_hash} has been used, that hash will be returned and the
hash won't be the calculated value.
Nz
[%d %s %s]Úasciiz[%d %s]r r )
Ú_hashr r r Úencoder r ÚsortÚupdateÚdigest)r Úpackage_infor! Úpairr r r Úget_hash, s
ÿ
ÿzPackageSkeleton.get_hashc C s
|| _ dS )aZ Set the hash to an explicit value.
This should be used when the hash is previously known and can't
be calculated from the relations anymore.
The only use case for this is package resurrection. We're
planning on getting rid of package resurrection, and this code
can be removed when that is done.
N)r )r Úpackage_hashr r r Úset_hash? s
zPackageSkeleton.set_hash)
r r r
ÚsectionÚsummaryÚdescriptionÚsizeÚinstalled_sizer r r r$ r&