Prv8 Shell
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4
System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64
User : jackjohn ( 502)
PHP Version : 5.3.17
Disable Function : NONE
Directory :  /usr/share/yum-cli/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/yum-cli/cli.pyo
U'Qc@sdZddkZddkZddkZddkZddkZddkZddklZl	Z	ddk
Z
ddklZddk
Z
ddkZddkZddkZddkZddkZddkZddklZddklZddklZddkZddkZddklZlZd	Zd
eii fdYZ!dei"e
i#fd
YZ$defdYZ%dZ&dS(s/
Command line interface yum class and related.
iN(tOptionParsertOptionGroup(tproxy(tisMultiLibArch(t_(tRPMTransaction(t
to_unicodetto_utf8cCstidIJtiddS(s" SIGQUIT handler for the yum cli. s&Quit signal sent - exiting immediatelyiN(tsyststderrtexit(tsignumtframe((s/usr/share/yum-cli/cli.pytsigquit0s
tCliErrorcBseZdZddZRS(s3
    Command line interface related Exception.
    tcCs tiii|||_dS(N(tyumtErrorstYumBaseErrort__init__targs(tselfR((s/usr/share/yum-cli/cli.pyR;s(t__name__t
__module__t__doc__R(((s/usr/share/yum-cli/cli.pyR5st
YumBaseClicBsjeZdZdZdZd'ddZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZedZdZdedZdZdZdZdZddZedZdZdZdZdZ dZ!dZ"d Z#d!Z$d"Z%d#Z&d$Z'd%Z(ed&Z)RS((sZThis is the base class for yum cli.
       Inherits from yum.YumBase and output.YumOutput cCstitittii|tii|ti	ti
d|_ti
d|_h|_
|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti|iti |iti!|iti"|iti#|iti$|iti%|iti&|iti'|iti(|iti)|iti*|iti+|iti,dS(Nsyum.clisyum.verbose.cli(-tsignaltSIGQUITR
RtYumBaseRtoutputt	YumOutputtloggingtbasicConfigt	getLoggertloggertverbose_loggertyum_cli_commandstregisterCommandtyumcommandstInstallCommandt
UpdateCommandtInfoCommandtListCommandtEraseCommandtGroupCommandtGroupListCommandtGroupInstallCommandtGroupRemoveCommandtGroupInfoCommandtMakeCacheCommandtCleanCommandtProvidesCommandtCheckUpdateCommandt
SearchCommandtUpgradeCommandtLocalInstallCommandtResolveDepCommandtShellCommandtDepListCommandtRepoListCommandtHelpCommandtReInstallCommandtDowngradeCommandtVersionCommandtHistoryCommandtCheckRpmdbCommandtDistroSyncCommandtLoadTransactionCommand(R((s/usr/share/yum-cli/cli.pyRCsH
	cCsXxQ|iD]C}||ijo tiitd|n||i|<q
WdS(NsCommand "%s" already defined(tgetNamesR$RRtConfigErrorR(Rtcommandtname((s/usr/share/yum-cli/cli.pyR%js

 icCs|io|djo|iS|p#|iitiitdn|o tii	|d|dt
ntii	|d||o3|iitiitd|id|n|iS(segrabs the repomd.xml for each enabled repository 
           and sets up the basics of the repositorysSetting up repositoriestthisrepotdoSetups/Reading repository metadata in from local filesN(t_repostNoneR#tlogRt
logginglevelstINFO_2RRt	_getRepostTruet	_getSacks(RRHtdosack((s/usr/share/yum-cli/cli.pytdoRepoSetupps 
c
Csd}tiig}|iiD]+}t|do|ip||q#q#~}|iddxp|D]h}y.|i}|d|i	d|f7}Wqtt
tfj
o|d|i	d7}qtXqtW|S(sq
        Format an attractive usage string for yum, listing subcommand
        names and summary usages.
        s*yum [options] COMMAND

List of Commands:

thiddentkeycSs|idS(i(RD(tx((s/usr/share/yum-cli/cli.pyt<lambda>ss	%-14s %s
is%s
(RtmisctuniqueR$tvaluesthasattrRTtsortt
getSummaryRDtAttributeErrortNotImplementedError(Rtusaget_[1]RVtcommandsRFtsummary((s/usr/share/yum-cli/cli.pyt
_makeUsages#1"!c	Csh}tii}g|_x|D]}|id\}}|id}|djou|| }||d}||jo$tii||<g||_nt||||||ii|q%t||||ii|q%W||_||_	dS(s{parse the setopts list handed to us and saves the results as
           repo_setopts and main_setopts in the yumbase objectt=t.iiN(
RRXt
GenericHoldertitemstsplittfindtsetattrtappendtmain_setoptstrepo_setopts(	Rtsetoptstrepooptstmainoptstitemtktvtperiodtrepo((s/usr/share/yum-cli/cli.pyt
_parseSetOptss&	


	cCstd|d|i|_|ii|}|iotiGHt|_t	|_
n|i|i|i
o7x4|i
iD]"}t||t|i
|qWn|ii|}|io
d|_n|i
od|_|_ny&|i}|i|_||_|i|_tiitiif|_|i|_|i|_|i|_|ii|i|_ |ii|i!|_"|i#|_#|i$|i
okxh|i
iD]V}t%|i$|pd}|i&i'||nt|i$|t|i
|qWnWn{ti(i)j
o/}|i&i*t+d|t,i-dn<t.j
o/}|i&i*t+d|t,i-dnX|ii/|i|ii0d	d	||ii1d	|\}|_2|iot|_t	|_
n|io
d|_n|i
od|_|_n|i|ijp|i|ijo|i&i'd
n|djo'|i|ijo|i&i'dn|ioYd|i$_3|i4}t	}	d
}
d}xt5|i6i7d|D]}|	o	dGHnt}	|i8djo d|i|i9|i:f}
n#d|i8|i|i9|i:f}
d|i;i<d|i=|i;i<df}t+d||
|
|i>fGHt+d|i?|
|i@fGHt+d|iA||iBfGHqWt,i-dn|iCdj	otEiF|iCd}nd}||_Gd|_Hx$|iGD]}|iHd|7_HqPWy|iIWn tJj
ot,i-dnXtKiL|dS(sparses command line arguments, takes cli args:
        sets up self.conf and self.cmds as well as logger objects 
        in base instancetbaseR`iis1Main config did not have a %s attr. before setoptsConfig Error: %sisOptions Error: %sRsGIgnored option -q, -v, -d or -e (probably due to merging: -yq != -y -q)t/s8Ignored option -c (probably due to merging -yc != -y -c)cSstidti|S(Ns%Y-%m-%d %H:%M(ttimetstrftimetgmtime(RV((s/usr/share/yum-cli/cli.pyt
sm_ui_timescSstidti|S(Ns%Y-%m-%d(RzR{R|(RV((s/usr/share/yum-cli/cli.pyt
sm_ui_datestpatternsRt0s%s-%s.%ss%s:%s-%s.%ss%s%s%stboldtnormals  Installed: %s-%s at %ss  Built    : %s at %ss  Committed: %s at %si<syum s%s N(MtYumOptionParserRdt	optparsert
firstParsetversionRt__version__RPtquiettFalsetverboseRwRoRmRhRktgetattrtgetRoott
debuglevelt
errorleveltpreconftconffiletfntroott	nopluginstinit_pluginstpluginst	TYPE_COREtTYPE_INTERACTIVEtplugin_typest	_splitArgtdisablepluginstdisabled_pluginst
enablepluginstenabled_pluginst
releasevertconfR[R"twarningRREtcriticalRRR
t
ValueErrort	set_usagetruntsetupYumConfigtcmdstcachetrun_with_package_namestsortedtrpmdbtreturnPackagestepochtreleasetarchttermtMODERGtinstalltimetpackagert	buildtimet	committert
committimet	sleeptimeRKtrandomt	randrangeRt	cmdstringt
parseCommandsRRztsleep(RRtoptstoptRtpctmsgtet	yum_progstdoneR}R~tpkgtverRGRtarg((s/usr/share/yum-cli/cli.pytgetOptionsConfigs
	


$


		
	

+
	



& 
				 			
cCs|iidti|iitiid|i|iitiid|ii	t
|iidjo)t
|idjo|ii|_n|i|i_t
|idjo*|i
itd|itn|id|_|id|_t
|idjoM|iitiidx1|iD]"}|iitiid|qAWn|i|ijo0|i
itd	|itidtn|i|ii||i|id
S(s{reads self.cmds and parses them out to make sure that the requested 
        base command + argument makes any sense at allsYum Version: %ssCOMMAND: %ssInstallroot: %siisYou need to give some commandsExt Commands:
s   %ss)No such command: %s. Please use %s --helpN(R#tdebugRRRLRMtDEBUG_4RRtinstallroottlenRbRR"RRR`RtbasecmdtextcmdsR$RtargvtdoCheck(RR((s/usr/share/yum-cli/cli.pyR>s2
/


$
cCst|dpdS|ipdS|i}g}|D]}|di|q8~}|iddi|}|iid|dS(Nt_shell_history_cmdst Rs
s
shell-cmds(R[RtjoinRlthistorytwrite_addon_data(RtdataRaR((s/usr/share/yum-cli/cli.pyt_shell_history_write`s
	*
cCsbtid|}|i|_t|idjo|in|i|`|i|ifS(s*do a shell-like interface for yum commandsRxi(	tshelltYumShellRRRtcmdlooptscripttresultt
resultmsgs(Rtyumshell((s/usr/share/yum-cli/cli.pytdoShellms
cCsd}tid}h}x|i|D]}|id|jo&t|id||id<n||idt|idjo&t|id||id<q+q+W|oC|td7}x0|D]$}|td|||f7}qWntd|}|S(sm parse the error string for 'interesting' errors which can
            be grouped, such as disk space issues Rs%needs (\d+)MB on the (\S+) filesystemiisDisk Requirements:
s8  At least %dMB more space needed on the %s filesystem.
sError Summary
-------------
(tretcompiletfinditertgrouptintR(Rt	errstringRctptdisktmRs((s/usr/share/yum-cli/cli.pyterrorSummary~s &)*&cCst}t}|i|i}t|do|i||i|i}n|o/t|do|i||i|i}n|p|oCy|i|Wqt	i
ij
o}dt|gfSXn|i|ii
||i|iS(s_
        Calls the base command passes the extended commands/args out to be
        parsed (most notably package globs).
        
        Returns a numeric result code and an optional string
           - 0 = we're done, exit
           - 1 = we've errored, exit with error string
           - 2 = we've got work yet to do, onto the next stage
        tneedTstneedTsRemovei(RPRR$RR[RRRt_getTsRRRtstrt	doCommand(RRRtcmdR((s/usr/share/yum-cli/cli.pyt
doCommandsscCst|idjo|iitddS|i}|iitii	o|ii
tii	|n"|iip|i
i|ng}g}t}t}t}x|iiD]n}|id jo+t}|i}|o|i|q0qt}t}|i}|o|i|qqW|ii|p|i|n|i|||io,|ip|iitddSn|ii
tiitd|i|d|i}	t|	djoud	}
|
td
7}
xI|	D]A}tii|	|}x"|D]}
|
d||
f7}
q,Wq	Wti i!|
n|i"|djodS|ii#ot$i$}|ii
tiitd|i%}|ot}x+|D]#}|i&d
oqnt}qW|otdGHntdGHx|D]}t'|GHq#W|odtdgfSdgfS|ii(dt$i$|nt$i$}|ii
tiitd|ii)p|ii*it+i,nt-|dt}|i.|i/}d!|_/|i1dd|ii2|}~t|djoUtd}
x"|D]}|
dt3|7}
qKWti i!|
d|i4|
n|ii
tiitd|`|ii(dt$i$|t5i5t5i6t5i7t$i$}|i.|i1dd|ii8|ii9||_/t-|dt:i;t<|}|ii=djot|i>_:n|ii
tiitd|i?d|}|ii(dt$i$||ii
tii	|i@t5i5t5i6tA|iBS("sntakes care of package downloading, checking, user confirmation and actually
           RUNNING the transactionis9Trying to run the transaction but nothing to do. Exiting.ititusExiting on user CommandsDownloading Packages:tcallback_totalRsError Downloading Packages:
s	  %s: %s
sRunning rpm_check_debugsrpmlib(s'ERROR You need to update rpm to handle:s'ERROR with rpm_check_debug vs depsolve:isRPM needs to be updatedsrpm_check_debug time: %0.3fsRunning Transaction TestttesttkeepoldsTransaction Check Error:
s  %s
s
sTransaction Test SucceededsTransaction Test time: %0.3ftdisplayisRunning TransactiontcbsTransaction time: %0.3f(RRN(CRttsInfoR#tinfoRtlistTransactiontisEnabledForRRMtINFO_1RLRt	assumeyesR"twarnRRPt
getMemberstts_statetpoRlttstclosetreportRemoveSizetreportDownloadSizet
_promptWantedtuserconfirmRNtdownloadPkgstdownload_callback_total_cbRXRYRRtgpgsigchecktrpm_check_debugRzt_run_rpm_check_debugt
startswithRRtdiskspacechecktprobFilterFlagstrpmtRPMPROB_FILTER_DISKSPACERtinitActionTst
dsCallbackRKt
populateTsRRRRRtSIG_DFLtchecktorderRtYumCliRPMCallBacktweakrefRRtrunTransactiontpostTransactionOutputR
treturn_code(Rtlststdownloadpkgstrmpkgststuff_to_downloadtinstall_onlytremove_onlyttxmbrRtproblemsRRUterrorsterrortrcd_sttmsgstrpmlib_onlyRttt_stttestcbtdscbttserrorstdescrtts_stRtresultobject((s/usr/share/yum-cli/cli.pyt
doTransactions
		


	



"


		



		
csx|D]}i|\}}|djoqq|djoUtiio'iiotiit	dni
|fdqtii|qWdS(sPerform GPG signature verification on the given packages, installing
        keys if possible

        Returns non-zero if execution should stop (user abort).
        Will raise YumBaseError if there's a problem
        iisTRefusing to automatically import keys when running unattended.
Use "-y" to override.cs
iS((R(RVtytz(R(s/usr/share/yum-cli/cli.pyRWls(tsigCheckPkgRtstdintisattyRRRRRRtgetKeyForPackage(RtpkgsRRterrmsg((Rs/usr/share/yum-cli/cli.pyRVs

	cCs|id|gdt}|i|i}ttd|}|oD|itddi|}|i	i
tii
t|ndS(s= If install argument doesn't match with case, tell the user. Rtignore_casecSs|iS((RG(RV((s/usr/share/yum-cli/cli.pyRWxss  * Maybe you meant: s, N(tdoPackageListsRPt	installedt	availabletsettmapt
fmtKeyValFillRRR#RLRRMRNR(RRtmatchesR((s/usr/share/yum-cli/cli.pyt_maybeYouMeanttscCs|p|ddjodS|id|gdt}|ip|io|i|odS|iid}|iid}|io-|iit	i
itd|||dS|id|gdt
}|io7|io-|iit	i
itd|||dSttd	|i}|p|o,|iit	i
itd
|||n|o>|itddi|}|iit	i
i|ndS(
sr If the update/remove argument doesn't match with case, or due
            to not being installed, tell the user. it@NRR8RRs/Package(s) %s%s%s available, but not installed.cSs|iS((RG(RV((s/usr/share/yum-cli/cli.pyRWssNo package %s%s%s available.s  * Maybe you meant: s, (R9RR:R;treturnInstalledPackagesByDepRRR#RLRRMRNRRPR<R=R>R(RRt
always_outputR?thibegthiendR((s/usr/share/yum-cli/cli.pyt_checkMaybeYouMeant~s8
	
	
	cCsMt|i}t}x|D]}|ido@tii|ptii	|o|i
d|gqny|id|Wnbtii
j
oP|iitiitd|iid||iid|i|qXt}qWt|i|jodtdgfS|pd	td
gfSdtd
gfS(s<Attempts to take the user specified list of packages/wildcards
           and install them, or if they are installed, update them to a newer
           version. If a complete version number if specified, attempt to 
           upgrade (or downgrade if they have been removed) them to the
           specified versions.rpmtfilelisttpatternsNo package %s%s%s available.RRisPackage(s) to installis
Nothing to doi(RRRtendswithRRXt
re_remote_urltostpathtexiststlocalInstalltinstallRtInstallErrorR#RLRMRNRRRR@RP(RtuserlisttoldcountRR((s/usr/share/yum-cli/cli.pytinstallPkgss,
#	
ic

Csrt|i}t|djo|ing}xU|D]M}|ido7tii|ptii	|o|i
|q=q=Wt|djo8|id|ddx|D]}|i|qWnx8|D]0}|id|d|p|i
|qqWt|i|jo1t|i|}td|}	d	|	gfSdtd
gfSdS(s[take user commands and populate transaction wrapper with 
           packages to be updatedis.rpmRGt
updateonlyiRHt	update_tos%d packages marked for UpdateisNo Packages marked for UpdateN(RRtupdateRIRRXRJRKRLRMRlRNtremoveRFR(
RRQRRURRtlocalupdatesRrRtchangeR((s/usr/share/yum-cli/cli.pyt
updatePkgss.#cCsd}|o@|ddjo/|d}|d}|djo
d}qMng}h}x0t|iid|D]}|||i<quWg}|iio|iidd}nxE|D]=\}}|d|joqn|i|i	d|qWx7|D]/\}}|d|joqn||d=qWh}	g}
|oEy|i
id|i}
Wqt
iij
o
g}
qXnx2|
D]*}|i|joqn||	|i<qWx|D]}||	joqn||}|	|}
|i|
o|djoqnx|ii|gD]}|i|
o1|i|o |i|id	|q6n|i}xh|i
i|iD]Q}
d
|jo>d|jo1|i|
ijo|i|
ijot}PqqW|oq6n|i|id|iq6Wqn|i|
ot}xg|ii|
igD]M}|i|
o
t}qV|i|
o|i|id	|qVqVW|oqn|i|id|
iq|i|
oG|
i\}}}}}|i|i	d
|d|d|d|q|
i\}}}}}|i|i d
|d|d|d|qW|o$t!dt"|}d|gfSdt!dgfSdS(s This does either upgrade/downgrade, depending on if the latest
            installed version is older or newer. We allow "selection" but not
            local packages (use tmprepo, or something). tdiffitfullt	differentiRtnewesttpkgtupRt
checksum_typet
checksum_dataRHRGRRtrels3%d packages marked for Distribution Synchronizationis3No Packages marked for Distribution SynchronizationN(R\R[R](#RRRRGRt	obsoletestuptgetObsoletesTuplestextendRVtpkgSacktreturnNewestByNametkeysRRtPackageSackErrortverEQtsearchNamestallowedMultipleInstallsRWt
yumdb_infotsearchPkgTupleR_R`RatpkgIdRPt	reinstallRtverGTROtverLTt	downgradeRR(RRQtleveltdupdatestipkgsRRct
obsoletingR:tapkgsR6tipkgnametipkgtapkgtnapkgtnayitfoundtntaRRttrR((s/usr/share/yum-cli/cli.pytdistroSyncPkgss







	

	 
! //cCst|i}g}xK|D]C}|id|}|p|i|dtn|i|qW|o$tdt|}d|gfSdtdgfSdS(sctake user commands and populate a transaction wrapper with packages
           to be erased/removedRHRCs%d packages marked for removaliisNo Packages marked for removalN(RRRWRFRRfR(RRQRRtall_rmsRtrmsR((s/usr/share/yum-cli/cli.pyt	erasePkgsSscCs t|i}x|D]}|ido:tii|ptii|o|i	|qny|i
d|Wqtiij
oP|i
itiitd|iid||iid|i|qXqWt|i|jodtdgfSdtd	gfS(
sAttempts to take the user specified list of packages/wildcards
           and downgrade them. If a complete version number if specified,
           attempt to downgrade them to the specified versions.rpmRHsNo package %s%s%s available.RRisPackage(s) to downgradeis
Nothing to do(RRRIRRXRJRKRLRMtdowngradeLocalRtRtDowngradeErrorR#RLRMRNRRRR@(RRQRRR((s/usr/share/yum-cli/cli.pyt
downgradePkgsfs$#
	c		Cst|i}t}x}|D]u}|ido:tii|ptii	|o|i
|qny|id|t}Wqti
ij
o|i|dtqti
ij
o}x|iD]}d}d|ijo |ii}td|}ntd}|iitii||iid||iid	|qWqti
ij
o"}|iitii|qXqWt|i|jod
tdgfS|pdtd
gfSdtd
gfS(s^Attempts to take the user specified list of packages/wildcards
           and reinstall them. s.rpmRHRCRt	from_repos
 (from %s)s)Installed package %s%s%s%s not available.RRisPackage(s) to reinstallis
Nothing to doi(RRRRIRRXRJRKRLRMtreinstallLocalRqRPRtReinstallRemoveErrorRFtReinstallInstallErrortfailed_pkgsRnRRR#RLRMRNRRtReinstallError(	RRQRRRRRR{txmsgR((s/usr/share/yum-cli/cli.pyt
reinstallPkgss>#


"cCst|djodtdgfSt}xg|D]_}|idp#|iitiid|q4n|i	|d|}|o
t
}q4q4W|odtdgfSdtdgfS(	slhandles installs/updates of rpms provided on the filesystem in a 
           local dir (ie: not from a repo)isNo Packages Provideds.rpms,Skipping: %s, filename does not end in .rpm.RTisPackage(s) to installs
Nothing to do(RRRRIR#RLRRMRNtinstallLocalRP(RRGRTt
installingRttxmbrs((s/usr/share/yum-cli/cli.pyRNs	
cCsVdddddddg}d}t}t}t|djo|o(|ddjot}|idq|o(|ddjot}|idq|d|jo|id}qn|id	|d
|dt}|iio|i|i7_n|o|i|_	|i
|_n|o
g|_n|o
g|_
n|S(sReturns packages lists based on arguments on the cli.returns a 
           GenericHolder instance with the following lists defined:
           available = list of packageObjects
           installed = list of packageObjects
           updates = tuples of packageObjects (updating, installed)
           extras = list of packageObjects
           obsoletes = tuples of packageObjects (obsoleting, installed)
           recent = list of packageObjects

           installed_available = that the available package list is present
                                 as .hidden_available when doing any of:
                                 all/available/installed
           R;R:talltextrastupdatestrecentRcit	pkgnarrowRR8(RRRPtpopR9RtshowdupesfromreposR;treinstall_availablethidden_availableR:thidden_installed(RRtinstalled_availabletspecialRtdone_hidden_availabletdone_hidden_installedtypl((s/usr/share/yum-cli/cli.pytreturnPkgListss4		


c
srddddg}ii}ttt}t}t}t}fd}tdjo"ddjoidniddgd	|d
t}	x|	D]\}
}|joT|o't|tjoPndGHn
t}|t	d}n|i
|
|ii|
|qWi|d	|d
t}	t}t|tjoadGHtdjot	d
}n
t	d}|i
idi
idfGHg}	nx|	D]\}
}tt|joqn|o tt|joqn|jo7|o	dGHn|t	d}|ini|
|qW|oKt|tjo2dGHt	di
idi
idfGHnx8D]0}
|
|joiit	d|
qqW|pdt	dgfSd|	fS(sgcli wrapper method for module search function, searches simple
           text tags in a package objectRGRctdescriptionturlcsQg}D]}|jo||qq~}i|di|GHdS(Ns, (t
fmtSectionR(ttextRaRt	used_keys(RiRR(s/usr/share/yum-cli/cli.pyt_print_match_sections2iiRtshowdupsRiRsN/S Matched: %ssE  Name and summary matches %sonly%s, use "search all" for everything.sJ  Full name and summary matches %sonly%s, use "search all" for everything.RRsMatched: %ssG  Name and summary matches %smostly%s, use "search all" for everything.s!Warning: No matches found for: %ssNo Matches found(RRR=RR<RRtsearchGeneratorRPRtaddRVt
matchcallbackRRR"R(RRt
searchlisttdupstokeystakeystmkeystposRtmatchingRt
matched_valueRR((RiRRs/usr/share/yum-cli/cli.pytsearchst				$
	


	#
 
	 -
!c
Csg}x|D]}|idoRtii|ptii|o,tii||i	|}|i
|nA|ii|g\}}}x||D]}|i
|qW|i
|}	|i|	q
WdgfS(s}cli wrapper method for findDeps method takes a list of packages and 
            returns a formatted deplist for that packages.rpmi(RIRRXRJRKRLRMtpackagest
YumUrlPackageRRlRgtmatchPackageNamestfindDepst
depListOutput(
RRR6RtthispkgtematchtmatchtunmatchRtresults((s/usr/share/yum-cli/cli.pytdeplistHs#c
Cs|ii}t|i_|i}|i|d|dt}||i_t|djox|D]}d|jp|o|ddjoqbn|iitd|i	i
d||i	i
d|i	i
d||i	i
dqbWdd	gfSdgfS(
suse the provides methods in the rpmdb and pkgsack to produce a list 
           of items matching the provides strings. This is a cli wrapper to the 
           moduletcallbacktcallback_has_matchforit*RysWarning: 3.0.x versions of yum would erroneously match against filenames.
 You can use "%s*/%s%s" and/or "%s*bin/%s%s" to get that behaviourRRsNo Matches found(RRRPtmatchcallback_verbosetsearchPackageProvidesRR"RRRR(RRtold_sdupRRR((s/usr/share/yum-cli/cli.pytprovides\s$		%
c
Csx|D]}y|i|}Wn2tiij
o |iitd|qXd|i|i|i	|i
|if}|ii
|qWdgfS(sBreturns a package (one per user arg) that provide the supplied argsNo Package Found for %ss%s:%s-%s-%s.%si(treturnPackageByDepRRRR"RRRRGRRRR#R(RRRRR((s/usr/share/yum-cli/cli.pyt
resolveDepClivs(cCsd}}}}}g}}}	}
}|itddig}|iiD]}
||
iqU~}|iiti	i
|d|jo|iiti	i
td|i\}}|i\}}|i
\}}	|i\}}
|i\}}|iid|||||}|||	|
|}x|D]}|ii|qVW|gfSd|jo,|iitd|i\}}nd	|jo,|iitd
|i\}}nd|jo,|iitd|i
\}}	nd
|jp
d|jo,|iitd|i\}}
nd|jp
d|jo,|iitd|i\}}nd|jo,|iitd|i\}}nd|jo*|iitd|iidn|||||}|||	|
|}x'|D]}|iiti	i
|qUW|gfS(NisCleaning repos: RRsCleaning up EverythingtcleantheaderssCleaning up HeadersRsCleaning up PackagestmetadatasCleaning up xml metadatatdbcachesCleaning up database cachesexpire-caches!Cleaning up expire-cache metadataRsCleaning up cached rpmdb dataRsCleaning up plugins(R>RRtrepostlistEnabledtidR#RLRRMRNt
cleanPackagestcleanHeaderst
cleanMetadatatcleanSqlitet
cleanRpmDBRRR"RtcleanExpireCache(RRQthdrcodetpkgcodetxmlcodetdbcodetexpccodet
pkgresultst
hdrresultst
xmlresultst	dbresultstexpcresultsRaRVRtrpmcodet
rpmresultstcodeR((s/usr/share/yum-cli/cli.pytcleanClis`9






csd}t|djo,|ddjod}|idqEn|p
d}nid|d|\}}fd}tx8|D]0}|ioqn|td|tqWtx8|D]0}|ipqn|td|tqWtx8|D]0}|ioqn|td	|tqWtx8|D]0}|ipqVn|td
|tqVWdtdgfS(NiiRTtuservisibleRcspiitii|nd|i}iitiio|d|i7}n|i	o|d|i	7}niitiid|dS(Ns   %ss (%s)s [%s]s%s(
R#RLRRMRNtui_nameRtDEBUG_3tgroupidtlangonly(tsectRR(RR(s/usr/share/yum-cli/cli.pyt_out_grps

sInstalled Groups:sInstalled Language Groups:sAvailable Groups:sAvailable Language Groups:tDone(RRRKtdoGroupListsRRRRP(RRQRR:R;RR((RRs/usr/share/yum-cli/cli.pytreturnGroupListssN









cCsuxh|D]`}t}x-|ii|D]}|i|t}q&W|p|iitd|qqWdgfS(s0returns complete information on a list of groupss!Warning: Group %s does not exist.i(Rtcompst
return_groupstdisplayPkgsInGroupsRPR"R$R(RRQtstrngt
group_matchedR((s/usr/share/yum-cli/cli.pytreturnGroupInfos

!cCsg}x|D]}t}x{|ii|D]g}t}y|i|i}Wn5tiij
o#|i	i
td|q,q,X|i|q,W|p |i	i
td|q
q
q
W|pdtdgfSdtdt|gfSdS(s2for each group requested do 'selectGroup' on them.s!Warning: Group %s does not exist.isANo packages in any requested group available to install or updateis%d Package(s) to InstallN(RRRRPtselectGroupRRRtGroupsErrorR"RRRfR$R(Rt	grouplistt	pkgs_usedtgroup_stringRRR((s/usr/share/yum-cli/cli.pyt
installGroupss&cCsg}xf|D]^}y|i|}Wn5tiij
o#|iitd|q
q
X|i|q
W|pdtdgfSdtdt|gfSdS(s;Remove only packages of the named group(s). Do not recurse.sNo group named %s existsis!No packages to remove from groupsis%d Package(s) to removeN(	tgroupRemoveRRRR"RRRfR(RRRRR((s/usr/share/yum-cli/cli.pytremoveGroupsscCst|iiotS|iiotSxI|iiD]8}|ip#|idjp|i	|i
jotSq4WtS(NR(RRRtalwayspromptRPRRtisDepRRGR(RR!((s/usr/share/yum-cli/cli.pyR&s


	cCstii|iidS(s Print out command line usage N(RtstdouttwriteRtformat_help(R((s/usr/share/yum-cli/cli.pyR`:scCstii|iidS(s Print out the shell usage N(RRRRt	get_usage(R((s/usr/share/yum-cli/cli.pyt
shellUsage>scCs|ii}|iid|o'|iitiit	d|t
S|iid|i}g}xl|D]d}t
|it
|ijo|i|qn|iitiit	d|i|iqnqnWt|djox|D]}|i|o4|i|jo|i|ijotSqtSq|i|ot
S|i|o |o|i|otSqqWn*|iitiit	d|itSt
S(s:check if the package is reasonably installable, true/falseRs)Package %s is already installed, skippingRGs#Discarding non-comparable pkg %s.%sis;No other %s installed, adding to list for potential install(Rt
exactarchlistRtcontainsR#RLRRMRRRtsearchNevraRGRRRlRRrRPRkRsRmtDEBUG_1(RRRRtinstalledByKeyt
comparabletinstpo((s/usr/share/yum-cli/cli.pyt_installableBs<	%N(*RRRRR%RKRSRdRwRRRRRRR/RR@RPRFRSRRZRRRRRNRRRRRRRRRRRR`RR
(((s/usr/share/yum-cli/cli.pyR?sJ	'					"	
			 			
&	''	a			&-	[				3	2	
					RcBsheZdZdZdZdZedZd
dZ	dZ
dZdZd	Z
RS(s\Subclass that makes some minor tweaks to make OptionParser do things the
    "yum way".
    cKsd|jo|d|_|d=n
t|_ti||tid|_||_t|t	d|_
|i|i
|idS(Ntutilssyum.clisPlugin Options(
t_utilsRRRRR!R"RxRRtplugin_option_grouptadd_option_groupt_addYumBasicOptions(RRxtkwargs((s/usr/share/yum-cli/cli.pyR{s

		cCs4|i|iitd|tiddS(s?This method is overridden so that error output goes to logger. sCommand line error: %siN(tprint_usageR"RRRR
(RR((s/usr/share/yum-cli/cli.pyR$s
cCsyytdd|}WnLtj
o@}|iititdd|fIJtidnX|id|dS(Ns--nopluginss	--versions-qs-vs--quiets	--verboses-cs--configs-ds--debuglevels-es--errorlevels
--installroots--disableplugins--enableplugins--releasevers--setopts$

%s: %s option requires an argumentsCommand line erroriRi(s--nopluginss	--versions-qs-vs--quiets	--verbose(s-cs--configs-ds--debuglevels-es--errorlevels
--installroots--disableplugins--enableplugins--releasevers--setopt(	t_filtercmdlineRRxR`RR	RR
t
parse_args(RRR((s/usr/share/yum-cli/cli.pyRs


cCs:g}x-|D]%}|i|iddiq
W|S(sR Split all strings in seq, at "," and whitespace.
            Returns a new list. t,R(RftreplaceRi(tseqtretR((s/usr/share/yum-cli/cli.pyRs
#cCs|p|i\}}n|id|\}}|iii||y|iod|ii_n|iod|ii_n$|iipd|ii_n|i	od|ii_	n|i
o#|i||i
|ii_
n|iot
|ii_n|iot
|ii_n|idjottdn|idjo=|iiidjo#|iiid
|iiiq3nh
dd6dd6dd6dd6dd6dd
6dd6dd6dd	6dd6}|i|i|i|_|idjo|iiid
|in|io|i|i}ng}||ii_x|i|iD]}}y/|iii}|i|||ii_Wq{tiij
o3}|ii ||ii!t"i#dq{Xq{W|i$dj	o|i$|ii_$n|ii%|ii&x|i'D]\}	}
yL|	djo|ii'i(|
n%|	djo|ii'i)|
nWqFtiij
o3}|ii ||ii!t"i#dqFXqFW|i*o6t
|i_+x'|ii'i,D]}t
|_+qWnWnHtj
o<}|ii td||ii!t"i#dnX||fS(NRitautotalwaystnevertttysif-ttytyestnotontoffs)--color takes one of: auto, always, nevertcolort1ttrueRtfalses--enablerepos
--disablereposOptions Error: %s(
NRsalwaysRRsif-ttyRR R!R"(-RRxRt
setCmdLineRRt	cacheonlyRtsetCacheDirRcRt_checkAbsInstallRoott
skipbrokenRPtskip_brokenRR#RKRRRtreinittgettdisableexcludesRtdisable_excludestexcludeRlRRRER"RR`RR
trpmverbositytsetupProgressCallbackstsetupKeyImportCallbacksRt
enableRepotdisableRepot
nogpgcheckt_override_sigchecksR(RRRRt_remapR0R1texcludelistRRtrepoexpRv((s/usr/share/yum-cli/cli.pyRs







'










cCsU|ipdS|iddjodS|iitd|itiddS(NiRys*--installroot must be an absolute path: %si(RR"RRRR
(RR((s/usr/share/yum-cli/cli.pyR*s

cCs|i||ioti|id|itio|id|i|_nF|idjo5ti|idtio|id|_qn|i}nd}|S(NRys/etc/yum/yum.confs
/etc/yum.conf(R*RRKtaccessRtR_OK(RRR((s/usr/share/yum-cli/cli.pyRs

$
cOs|ii|idS(N(RxR`R
(RRtvaluetparserRR((s/usr/share/yum-cli/cli.pyt_wrapOptParseUsage.s
cCsd}|io t|d}|i|n|}d|_|iddddd|idtd	d
|_|idddd
dtd|idddddd
dtd|idddddddtddd|idddddd dddtd!dd"|id#d$dd%dddtd&dd dd'|id(dd)dd
dtd*|id+d,dd-dddtd.dd dd/|id0d1dddtd2dd3|id4d5dd6dd
dtd7|id8d9dd:dd
dtd;|id<d=dd>dd
dtd?|id@dd
dtdA|idBdtdCddD|idEddddFd|ddGdgdtdHddI|idJddddFd|ddGdgdtdKddI|idLdMdgddNdtdOddP|id0dQdgddNdtdRddI|idSdd
dtdT|idUdd
dtdV|idWdd
dtdX|id0dYddZdgddNdtd[dd\|id0d]dd^dgddNdtd_dd\|id`dd
ddadtdb|id0dcddddddtde|id0dfddgdddtdh|id0diddjdgddNdtdkdS(lNcSs*td|i}|i||fdS(sCallback for the enablerepo and disablerepo option. 
            
            Combines the values given for these options while preserving order
            from command line.
            sparser.values.%sN(tevaltdestRl(toptobjRR>R?RB((s/usr/share/yum-cli/cli.pyt
repo_optcb3ssYum Base Optionstresolves-hs--helptactionRthelpsshow this help message and exitR$s-ts
--tolerantt
store_truesbe tolerant of errorss-Cs--cacheonlyRBR(s2run entirely from system cache, don't update caches-cs--configRtdefaults/etc/yum/yum.confsconfig file locationtmetavars
[config file]s-Rs--randomwaitRttypeRsmaximum command wait times	[minutes]s-ds--debuglevelRsdebugging output levels
[debug level]s--showduplicatesRs2show duplicates, in repos, in list/search commandss-es--errorlevelRserror output levels
[error level]Rs--rpmverbositysdebugging output level for rpms[debug level name]s-qs--quietRsquiet operations-vs	--verboseRsverbose operations-ys--assumeyesRsanswer yes for all questionss	--versionsshow Yum version and exits
--installrootsset install roots[path]s--enablerepotstringRs3enable one or more repositories (wildcards allowed)s[repo]s
--disablerepos4disable one or more repositories (wildcards allowed)s-xs	--excludeRls"exclude package(s) by name or globs	[package]s--disableexcludess7disable exclude from main, for a repo or for everythings--obsoletess*enable obsoletes processing during updatess--nopluginssdisable Yum pluginss--nogpgchecksdisable gpg signature checkings--disablepluginRsdisable plugins by names[plugin]s--enablepluginRsenable plugins by names
--skip-brokenR+s&skip packages with depsolving problemss--colorR#scontrol whether color is useds--releaseverRs5set value of $releasever in yum config and repo filess--setoptRos%set arbitrary config and repo options(RRRtconflict_handlert
add_optionR@RRK(RRDR((s/usr/share/yum-cli/cli.pyR2s		
		
	











N(RRRRR$RtstaticmethodRRKRR*RR@R(((s/usr/share/yum-cli/cli.pyRvs				i	
		cCsyg}t|}x`t|djoL|id}d|jo:|idd\}}||jo|i|qpq|djo|i|q||jo|i|q||jodt|djo
t|n|id}|ddjo
t|n|i||gqxB|D]:}t|djo!|i|o|i|q2q2WqW|S(sKeep only specific options from the command line argument list

    This function allows us to peek at specific command line options when using
    the optparse module. This is useful when some options affect what other
    options should be available.

    @param novalopts: A sequence of options to keep that don't take an argument.
    @param valopts: A sequence of options to keep that take a single argument.
    @param args: The command line arguments to parse (as per sys.argv[:1]
    @return: A list of strings containing the filtered version of args.

    Will raise ValueError if there was a problem parsing the command line.
    iReis--t-i(tlistRRRiRlRRfR(t	novaloptstvaloptsRtoutRRRtnext((s/usr/share/yum-cli/cli.pyRs2






#('RRKRRRzRRtoptparseRRRRRRRRt
yum.Errorstyum.logginglevelstyum.misctyum.pluginst
rpmUtils.archRRtyum.rpmtransRRR&tyum.i18nRRR
RRRRRRRR(((s/usr/share/yum-cli/cli.pyt<module>sB	
<

haha - 2025