3
y=j @ s~ d Z ddlZddlZddlZddlmZ ddlmZ ejdddZ e
e dsTe je _e jZd d
Z
dd Zd
d Zdd ZdS )zutility functions for up2date N)config)getPlatformzrhn-client-toolsT)Zfallbackugettextc C s6 t j } | d rt| d S t dkr.tj S tj S )z3
Returns the version of redhat-release rpm
ZversionOverridedeb)r ZinitUp2dateConfigstrr distroZcodenameZ
major_version)Zcfg r "/usr/lib/python3.6/up2dateUtils.py
getVersion s
r
c C s t dkrdS dS )z(
Returns the name of the system
r ZUbuntuZ
CloudLinux)r r r r r getOSRelease# s
r c C sz t jdt jr@tdd} | j j }ddi}||kr<|| }|S t j d }t dkrv|dkrbd
}|dkrnd}|d
7 }|S )Nz/etc/rpm/platformrzia32e-redhat-linuxzx86_64-redhat-linux r i486i586i686Zi386Zx86_64amd64z
-debian-linux)r r r )osaccessR_OKopenreadstripunamer )fdplatformreplaceZarchr r r getArch, s
r c C s dS )Nz03.0.5-1.module_el8.10.0+7087+bd4dfabe.cloudlinuxr r r r r versionA s r )__doc__r gettextr Zup2date_clientr Zup2date_client.pkgplatformr Ztranslationthasattrr _r
r r r r r r r