관리-도구
편집 파일: debUtils.cpython-36.opt-1.pyc
3 e�$g� � @ sl d dl Z d dlZd dlZejddd�Zeed�s8eje_ejZdd� Zdd � Z d d� Z ddd �Zdd� ZdS )� Nzrhn-client-toolsT)Zfallback�ugettextc C sH t j� }g }x2| D ]*}||d }|d ks2|j r|j|� qW g |fS )Nr )�apt�CacheZis_installed�append)Zpackages�cacheZmissing_packages�package�pkg� r �/usr/lib/python3.6/debUtils.py�verifyPackages s r c C s` d}d}| j d�dkr$| jd�\}} | j d�dkrV| jd�}dj|d d� �} |d }| ||fS ) N� �X�:� �-���r r r )�find�split�join)�version�epoch�releaseZtmpr r r �parseVRE s r c C st d}d| d| |f g}d| kr<|j d| d | jd�� � x2|D ]*}tjj||�}tjj|�rBtjj|�S qBW dS )Nz/var/lib/dpkg/infoz%s.listz %s:%s.listr r )r �index�os�pathr �isfile�getmtime)Zpkg_nameZpkg_arch�dir�files�fr r r r �installTime( s r! c C s� | dkr| t d�� tj� }d}x|D ]}|jdkr&|d7 }q&W d}g }xv|D ]n}|jdkr^qNt|jj�\} } }|j|| | |jjd t|j|jj�d�}|j |� |dkr�|||� |d }qNW |j � |S )z} Return list of packages. Package is dict with following keys: name, epoch, version, release and optionaly arch. Nz0Getting list of packages installed on the systemr r z-deb)�namer r r ZarchZinstalltime)�_r r Z installedr r r"