ok
Direktori : /lib/python3.6/site-packages/dnf/__pycache__/ |
Current File : //lib/python3.6/site-packages/dnf/__pycache__/package.cpython-36.pyc |
3 �ft`�+ � @ s� d Z ddlmZ ddlmZ ddlmZ ddlZddlZddl Zddl ZddlZddlZ ddlZ ddlZddlZddlZejd�ZG dd� dej�ZdS ) z! Contains the dnf.Package class. � )�absolute_import)�unicode_literals)�_N�dnfc s� e Zd ZdZdZdZ� fdd�Ze� fdd��Zej dd� �Zed d � �Z edd� �Zed d� �Zedd� �Z edd� �Ze� fdd��Zej dd� �Zedd� �Zedd� �Zedd� �Zedd� �Zdd� Zed d!� �Zed"d#� �Zed$d%� �Zed&d'� �Zed(d)� �Zej d*d)� �Zed+d,� �Zed-d.� �Zed/d0� �Zed1d2� �Zed3d4� �Zed5d6� �Zed7d8� �Z d9d:� Z!d;d<� Z"d=d>� Z#d?d@� Z$dAdB� Z%dRdGdH�Z&dIdJ� Z'edKdL� �Z(dMdN� Z)dOdP� Z*� Z+S )S�Packagez Represents a package. #:api z -debuginfoz-debugsourcec s, t t| �j|� || _d | _d | _d | _d S )N)�superr �__init__�base�_priv_chksum�_repo� _priv_size)�selfZ initobjectr )� __class__� �/usr/lib/python3.6/package.pyr 0 s zPackage.__init__c s� | j r| j S | jr~tjjj� }ytjj|| j �}W n6 tj jk rh } ztjj t|���W Y d d }~X nX tj|�tj|�fS tt| �jS )N)r � _from_cmdliner ZyumZmiscZget_default_chksum_type�libdnf�utilsZchecksum_value�location�error�Error� exceptions� MiscError�str�hawkey�chksum_type�binasciiZ unhexlifyr r �chksum)r r Z chksum_val�e)r r r �_chksum7 s "zPackage._chksumc C s || _ d S )N)r )r �valr r r r E s c C s | j tjkS )N)�reponamer ZCMDLINE_REPO_NAME)r r r r r I s zPackage._from_cmdlinec C s | j tjkS )N)r! r �SYSTEM_REPO_NAME)r r r r �_from_systemM s zPackage._from_systemc C s* d}| j r| jjj| �}|r$d| S | jS )a9 For installed packages returns id of repository from which the package was installed prefixed with '@' (if such information is available in the history database). Otherwise returns id of repository the package belongs to (@System for installed packages of unknown origin) N�@)r# r �history�repor! )r Zpkgrepor r r � _from_repoQ s zPackage._from_repoc C s | j r| jjj| �S dS )N� )r# r r% r&