HEX
Server: Apache
System: Linux linweb06.linvh1.fasthosts.co.uk 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: user_1036302171 (1036307171)
PHP: 8.2.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //usr/lib/yum-plugins/subscription-manager.pyc
�
L��ec@`s^ddlmZmZmZddlZddlmZddlmZ	ddl
mZddlm
Z
ddlmZddlmZdd	lmZdd
lmZmZddlmZddlmZdd
lmZdZefZdZdZdZ dZ!defd��YZ"d�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)dS(i(tprint_functiontdivisiontabsolute_importN(t	TYPE_CORE(t	injection(tProfileActionClient(tRepoActionInvoker(tEntCertActionInvoker(tClassicCheck(tLocker(tchroottis_simple_content_access(tinit_dep_injection(tlogutil(tconfigs2.5se
*** WARNING ***
The subscription for following product(s) has expired:
%s
You no longer have access to the repositories that provide these products.  It is important that you apply an active subscription in order to resume access to security and other critical updates. If you don't have other active subscriptions, you can renew the expired subscription.
si
This system is not registered with an entitlement server. You can use subscription-manager to register.
s�
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
sz
This system is not receiving updates. You can use subscription-manager on the host to register and assign subscriptions.
t
YumRepoLockercB`seZd�Zd�ZRS(cC`s tt|�j�||_dS(N(tsuperRt__init__tconduit(tselfR((s,/usr/lib/yum-plugins/subscription-manager.pyRFscC`sX|jjdt�}|tkr8|jjdd�dSz|�SWd|jj�XdS(NtblockingisPAnother process has the cert lock. We will not attempt to update certs or repos.i(tlocktacquiretFalseRtinfotrelease(Rtactiontnon_blocking((s,/usr/lib/yum-plugins/subscription-manager.pytrunJs(t__name__t
__module__RR(((s,/usr/lib/yum-plugins/subscription-manager.pyREs	cC`s�tj�dkr&|jdd�dS|jdd�tjtj�}|j�sg|jdd�ntj�r�|jdd�n|r�tj�r�t	dt
d	|��}|j�ntd
|dt
d	|��}|j�dS(s)
    Update entitlement certificates
    iis:Not root, Subscription Management repositories not updatedNs.Updating Subscription Management repositories.s Unable to read consumer identitys4Subscription Manager is operating in container mode.tlockerRt
cache_only(
tostgetuidRtinjtrequiretIDENTITYtis_validRtin_containerRRtupdateR(RR tidentitytcert_action_invokertrepo_action_invoker((s,/usr/lib/yum-plugins/subscription-manager.pyR(Ys
cC`s�tjtj�}t�}xB|j�D]4}x+|jD] }d|j}|j|�q8Wq(W|r�tdj	t
|��}|jd|�ndS(sQ
    When some entitlement is expired, then display warning message about it
    s  - %ss
iN(R#R$tENT_DIRtsettlist_expiredtproductstnametaddtexpired_warningtjointsortedR(Rtent_dirR/tcerttproducttmtmsg((s,/usr/lib/yum-plugins/subscription-manager.pytwarn_expired_entitlementsts	
cC`stj�dkrdSt�j�r)dSd}z�tjtj�}tjtj�}|j�r�t	|j
��dkr�t}n1t	|j
��dkr�td|�r�t
}ntj�r�t	|j
��dkr�t}nWd|r�|jd|�nXdS(sv
    Display warning message, when the system is not registered (no consumer cert) or then is no entitlement cert
    iNtR)i(R!R"Rtis_registered_with_classicR#R$R%R,R&tlent
list_validtnot_registered_warningRtno_subs_warningRR'tno_subs_container_warningR(RR9R)R5((s,/usr/lib/yum-plugins/subscription-manager.pytwarn_or_usage_message�s %	(	$
cC`s�|jdddt�}|r�d}|j�}x~|jj�D]m}tjj|j�dkr@|j	t
kr@|jdd|j|jf�|j
|j�|d7}q@q@W|jdd	|�nd
S(s�
    Hook for disabling system repositories (repositories which are
    not mangaged by subscription-manager will NOT be used)
    tmaintdisable_system_repostdefaultisredhat.repois-Disabling system repository "%s" in file "%s"is�subscription-manager plugin disabled "%d" system repositories with respect of configuration in /etc/yum/pluginconf.d/subscription-manager.confN(tconfBoolRtgetRepostrepostvaluesR!tpathtbasenametrepofiletenabledtTrueRtidtdisableRepo(RRDt
disable_counttrepo_storagetrepo((s,/usr/lib/yum-plugins/subscription-manager.pyt	init_hook�s* cC`s4tj�t�t|d�r0|jd�ndS(s�
    This is the first hook of this yum plugin that is triggered by yum. So we do initialization
    of all stuff that is necessary by other hooks
    :param conduit: Reference on conduit object used by yum plugin API
    :return: None
    tregisterPackageNamessubscription-managerN(R
tinit_logger_for_yumRthasattrRU(R((s,/usr/lib/yum-plugins/subscription-manager.pytconfig_hook�s
cC`s�t|j�j�tj�}t|jdd��}t|d�rW|jd�ny%t	||�t
|�t|�Wn)tk
r�}|j
dt|��nXdS(s�
    Try to display some warning messages, when it is necessary.
    :param conduit: Reference on conduit object used by yum plugin API
    :return: None
    trhsmtfull_refresh_on_yumRUssubscription-manageriN(R
tgetConftinstallrootRt
initConfigtbooltget_intRWRUR(RBR:t	Exceptionterrortstr(RtcfgR te((s,/usr/lib/yum-plugins/subscription-manager.pytpostconfig_hook�s


cC`sRtj�}d|jdd�krJ|jdd�t�}|j�ndSdS(s}
    Upload package profile after transactions if run as a yum plugin (BZ 1742208)
    :param conduit:
    :return: None
    t1RYtpackage_profile_on_transisUpdating package profileN(RR]tgetRRR((RRctpackage_profile_client((s,/usr/lib/yum-plugins/subscription-manager.pytposttrans_hook�s	
(*t
__future__RRRR!tyum.pluginsRtsubscription_managerRR#t"subscription_manager.action_clientRtsubscription_manager.repolibRtsubscription_manager.entcertlibRtrhsmlib.facts.hwprobeRtsubscription_manager.certlibR	tsubscription_manager.utilsR
Rt"subscription_manager.injectioninitRR
RYRtrequires_api_versiontplugin_typeR2R?R@RARR(R:RBRTRXReRj(((s,/usr/lib/yum-plugins/subscription-manager.pyt<module>s4