관리-도구
편집 파일: up2dateUtils.cpython-36.pyc
3 ػ$g< � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddl m Z ddlmZ ej ddd �Zeed �s|eje_ejZe � dkr�ddlZdd � ZnddlmZ dd � Zdd� Zdd� Zdd� Zdd� Zdd� Zejdd� �ZdS )zutility functions for up2date� N)� up2dateErrors)�config)�getPlatform)�sstrzrhn-client-toolsT)Zfallback�ugettext�debc C s6 t j� } | d }d}d| kr$| d }| d }|||fS )NZIDzn/aZCODENAMEZRELEASE)�lsb_releaseZget_distro_information)Z dist_infoZos_nameZ os_version� os_release� r �"/usr/lib/python3.6/up2dateUtils.py�_getOSVersionAndRelease s r )�transactionc C s~ t j� } �xn| jdd�D ]~}d}t|d �}t|d �}|dd� |d D �kr�td d� t|d |d �D ��}d||f }|| }t|d �||f}|S W x�| jdd �D ]�}d}t|d �}t|d �}|dd� |d D �k�rtdd� t|d |d �D ��}d||f }|| }t|d �||f}|S W xL| jdd�D ]2}t|d �t|d �t|d �f}| jj� |S W tj d��d S )NZProvidenamezoraclelinux-releasezsystem-release(releasever)�version�releasec s s | ]}t |�V qd S )N)r )�.0�provider r r � <genexpr>, s z*_getOSVersionAndRelease.<locals>.<genexpr>Zprovidenamec s s"