AlkantarClanX12

Your IP : 18.119.142.210


Current Path : /proc/self/root/usr/lib64/python3.6/site-packages/rpm/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib64/python3.6/site-packages/rpm/__pycache__/transaction.cpython-36.pyc

3

�JfS�@sXddlmZddlZddlZddlmZejddkr>efZ	ne
fZ	Gdd�de�ZdS)�)�with_statementN)�ts�c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd.dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-S)/�TransactionSetrcCst||�}t|||�|S)N)�getattr�setattr)�self�attr�valZoval�r�#/usr/lib64/python3.6/transaction.py�_wrapSetGets
zTransactionSet._wrapSetGetcCs|jd|�S)N�_vsflags)r
)r�flagsrrr�
setVSFlagsszTransactionSet.setVSFlagscCs|jS)N)r)rrrr�
getVSFlagsszTransactionSet.getVSFlagscCs|jd|�S)N�	_vfyflags)r
)rrrrr�setVfyFlagsszTransactionSet.setVfyFlagscCs|jS)N)r)rrrr�getVfyFlagsszTransactionSet.getVfyFlagscCs|jS)N)�	_vfylevel)rrrr�getVfyLevel"szTransactionSet.getVfyLevelcCs|jd|�S)Nr)r
)rrrrr�setVfyLevel%szTransactionSet.setVfyLevelcCs|jd|�S)NZ_color)r
)r�colorrrr�setColor(szTransactionSet.setColorcCs|jd|�S)NZ
_prefcolor)r
)rrrrr�setPrefColor+szTransactionSet.setPrefColorcCs|jd|�S)NZ_flags)r
)rrrrr�setFlags.szTransactionSet.setFlagscCs|jd|�S)N�_probFilter)r
)rZ	ignoreSetrrr�
setProbFilter1szTransactionSet.setProbFiltercCsddl}|jj|�S)Nr)Z	rpm._rpmbZ_rpmb�spec)rZspecfile�rpmrrr�	parseSpec4szTransactionSet.parseSpeccCs4g}x|D]}|j|j��q
W|s(dSt|�SdS)N)�appendZKey�tuple)r�keysZterrr�getKeys8s
zTransactionSet.getKeysc	CsJt|t�r*t|��}|j|�}WdQRXnt|tj�r<|}n
|j|�}|S)N)�
isinstance�
_string_types�open�hdrFromFdnor�hdr)r�item�f�headerrrr�_f2hdrBs


zTransactionSet._f2hdr�ucCs@|j|�}|dkrtd��|dk}tj||||�s<tjd��dS)Nr.�izhow argument must be "u" or "i"z$adding package to transaction failed)r.r/)r-�
ValueError�TransactionSetCore�
addInstallr�error)rr*�keyZhowr,Zupgraderrrr2Ls
zTransactionSet.addInstallcCs&|j|�}tj|||�s"tjd��dS)Nz$adding package to transaction failed)r-r1�addReinstallrr3)rr*r4r,rrrr5Vs
zTransactionSet.addReinstallcCs�g}t|tj�r|}n~t|tj�r.|j|�nft|ttf�r�t|t�rNtj}ntj}x|j	||�D]}|j|�qbW|s�tj
d��ntdt|���x"|D]}t
j||�s�tj
d��q�WdS)Nzpackage not installedzinvalid type %s)r%rZmir)r!�intr&ZRPMDBI_PACKAGESZRPMDBI_LABELZdbMatchr3�	TypeError�typer1�addErase)rr*ZhdrsZdbi�hrrrr9\s"

zTransactionSet.addErasecCsbtj||||j�}|dkrdSg}|dkr^x2|j�D]&}d||j|j|jff}|j|�q4W|S)Nrz%s)r1�runr�problemsr8�_strZ_numr!)r�callback�dataZrc�resZprobr*rrrr;uszTransactionSet.runcOs
tj|f|�|�g}x�|j�D]�}|jtjkr8tj}n|jtjkr tj}nq |j	j
dd�d}|j
dd�\}}}	|jj�}
|
d}tj
}t|
�dkr�|
d}
d|
kr�|tjO}d|
kr�|tjO}d	|
kr�|tjO}|
d}nd
}|j|||	f||f|||jf�q W|S)N�.�r�-�r�<�=�>�)r1�checkr<r8rZRPMPROB_CONFLICTZRPMDEP_SENSE_CONFLICTSZRPMPROB_REQUIRESZRPMDEP_SENSE_REQUIRESZaltNEVR�rsplitr=�splitZRPMSENSE_ANY�lenZ
RPMSENSE_LESSZRPMSENSE_EQUALZRPMSENSE_GREATERr!r4)r�args�kwdsr@�pZsenseZnevr�n�v�rZneedsZneednameZ	needflagsZneedopZneedverrrrrI�s4




zTransactionSet.checkcCsTtj||�\}}|tjkr&tjd��n*|tjkr<tjd��n|tjkrPtj|��dS)Nzpublic key not availablezpublic key not trusted)r1�hdrCheckr�RPMRC_NOKEYr3�RPMRC_NOTTRUSTED�RPMRC_OK)rZblobr@�msgrrrrS�s


zTransactionSet.hdrCheckcCsTtj||�\}}|tjkr&tjd��n*|tjkr<tjd��n|tjkrPtjd��|S)Nzpublic key not availablezpublic key not trustedzerror reading package header)r1r(rrTr3rUrV)r�fdr@r:rrrr(�s



zTransactionSet.hdrFromFdnoN)r.)�__name__�
__module__�__qualname__rr
rrrrrrrrrrr r$r-r2r5r9r;rIrSr(rrrrrs,



'
r)Z
__future__r�sysrZrpm._rpmrr1�version_info�strr&Z
basestringrrrrr�<module>s