HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //usr/share/yum-cli/cli.pyc

v_c@sdZddlZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZddlZddl
Z
ddlZddlmZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZmZddlmZddlZddlZddl m!Z!m"Z"m#Z#dd	l$m%Z%d
Z&dej'j(fdYZ)d
ej*ej+fdYZ,de	fdYZ-dZ.dS(s/
Command line interface yum class and related.
iN(tOptionParsertOptionGroupt
SUPPRESS_HELP(tproxy(tisMultiLibArch(t_tP_(tRPMTransaction(t
to_unicodetto_utf8t
exception2msg(t
parsePackagescCstjdIJtjddS(sSIGQUIT handler for the yum cli.  This function will print an
    error message and exit the program.
    
    :param signum: unused
    :param frame: unused
    s&Quit signal sent - exiting immediatelyiN(tsyststderrtexit(tsignumtframe((s/usr/share/yum-cli/cli.pytsigquit:s
tCliErrorcBseZdZddZRS(s)Command line interface related Exception.tcCs tjjj|||_dS(N(tyumtErrorstYumBaseErrort__init__targs(tselfR((s/usr/share/yum-cli/cli.pyRGs(t__name__t
__module__t__doc__R(((s/usr/share/yum-cli/cli.pyRDst
YumBaseClicBseZdZdZdZd.ddZdZdZdZ	dZ
ed	Zd
Z
dZdZd
ZdZdZdZdZeedZdZdd.dZdedZdZeddZdZdZddZed.dZdZ d Z!d!Z"d"Z#d#Z$d$Z%ed%Z&d&Z'd'Z(ed(Z)d)Z*d*Z+d+Z,d,Z-ed-Z.RS(/s#This is the base class for yum cli.cCstjtjttjj|tjj|tj	tj
d|_tj
d|_i|_
t|_|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj |jtj!|jtj"|jtj#|jtj$|jtj%|jtj&|jtj'|jtj(|jtj)|jtj*|jtj+|jtj,|jtj-|jtj.|jtj/|jtj0dS(Nsyum.clisyum.verbose.cli(1tsignaltSIGQUITRRtYumBaseRtoutputt	YumOutputtloggingtbasicConfigt	getLoggertloggertverbose_loggertyum_cli_commandstTruetuse_txmbr_in_callbacktregisterCommandtyumcommandstInstallCommandt
UpdateCommandtInfoCommandtListCommandtEraseCommandt
GroupsCommandtMakeCacheCommandtCleanCommandtProvidesCommandtCheckUpdateCommandt
SearchCommandtUpgradeCommandtLocalInstallCommandtResolveDepCommandtShellCommandtDepListCommandtRepoListCommandtHelpCommandtReInstallCommandtDowngradeCommandtVersionCommandtHistoryCommandtCheckRpmdbCommandtDistroSyncCommandtLoadTransactionCommandtSwapCommandtRepoPkgsCommandtUpdateinfoCommandtUpdateMinimalCommandtFSSnapshotCommandt	FSCommand(R((s/usr/share/yum-cli/cli.pyRNsN
		cCsVxO|jD]A}||jkrAtjjtd|n||j|<q
WdS(sRegister a :class:`yumcommands.YumCommand` so that it can be called by
        any of the names returned by its
        :func:`yumcommands.YumCommand.getNames` method.
        
        :param command: the :class:`yumcommands.YumCommand` to register
        sCommand "%s" already definedN(tgetNamesR(RRtConfigErrorR(Rtcommandtname((s/usr/share/yum-cli/cli.pyR+xsicCs|jr|dkr|jS|sD|jjtjjtdn|ritjj	|d|dt
ntjj	|d||r|jjtjjtd|jd|n|jS(sGrab the repomd.xml for each enabled and set up the basics
        of the repository.

        :param thisrepo: the repository to set up
        :param dosack: whether to get the repo sack
        sSetting up repositoriestthisrepotdoSetups/Reading repository metadata in from local filesN(t_repostNoneR'tlogRt
logginglevelstINFO_2RR t	_getReposR)t	_getSacks(RRPtdosack((s/usr/share/yum-cli/cli.pytdoRepoSetups
cCsd}tjjg|jjD]$}t|do:|js|^q}|jddxn|D]f}y.|j}|d|j	d|f7}Wqft
tfk
r|d|j	d7}qfXqfW|S(sq
        Format an attractive usage string for yum, listing subcommand
        names and summary usages.
        s*yum [options] COMMAND

List of Commands:

thiddentkeycSs|jdS(Ni(RL(tx((s/usr/share/yum-cli/cli.pyt<lambda>ss	%-14s %s
is%s
(RtmisctuniqueR(tvaluesthasattrR[tsortt
getSummaryRLtAttributeErrortNotImplementedError(RtusageR]tcommandsRNtsummary((s/usr/share/yum-cli/cli.pyt
_makeUsages'
" c
Csi}tjj}g|_g}g}x9|D]1}|jd}t|dkrk|j|q1nt|dkr|j|q1ng|D]}|j^q\}	}
|	jd}|dkrB|	| }|	|d}	||krtjj||<g||_nt	|||	|
||jj|	q1t	||	|
|jj|	q1W||_
||_||fS(s{parse the setopts list handed to us and saves the results as
           repo_setopts and main_setopts in the yumbase objectt=it.ii(RR_t
GenericHoldertitemstsplittlentappendtstriptrfindtsetattrtmain_setoptstrepo_setopts(
Rtsetoptstrepooptstmainoptst
bad_setopt_tmt
bad_setopt_netitemtvalstitktvtperiodtrepo((s/usr/share/yum-cli/cli.pyt
_parseSetOptss8	


%
		cCs]td|d|j|_|jj|}|jrVtjGHt|_t	|_
n|j|j\}}|j
rx3|j
jD]"}t||t|j
|qWn|jj|}|jrd|_n|j
rd|_|_nyx|j}|j|_||_|j|_tjjtjjf|_|j|_|j|_|j|_|jj|j|_ |jj|j!|_"|j#|_#|j$x(|D] }d}	|j%j&|	|qWx(|D] }d}	|j%j&|	|qW|j
rgxe|j
jD]T}t'|j$|sAd}	|j%j&|	|nt|j$|t|j
|qWnWntj(j)k
r}
|j%j*t+d|
t,j-d	nt.k
r}
d
t/|
j0d	t1|
j2f}
|j%j*t+d|
t,j-d	n9t3k
r?}
|j%j*t+d|
t,j-d	nX|jj4|j|jj5dd||jj6d|\}|_7|jrt|_t	|_
n|jrd|_n|j
rd|_|_n|j|jks|j|jkr|j%j&t+d
n|dkrM|j|jkrM|j%j&t+dn|jrd	|j$_8|j9}t	}d}
d}x t:|j;j<d|D]}|rdGHnt}|j=dkrd|j|j>|j?f}n"d|j=|j|j>|j?f}d|j@jAd|jB|j@jAdf}t+d|||
|jCfGHt+dt/|jD|
|jEfGHt+dt/|jF||jGfGHqWt,j-dn|jHd k	rtJjK|jHd}nd}||_0d|_Lx$|j0D]}|jLd|7_LqWy|jMWntNk
rKt,j-d	nXtOjP|d S(!sParse command line arguments, and set up :attr:`self.conf` and
        :attr:`self.cmds`, as well as logger objects in base instance.

        :param args: a list of command line arguments
        tbaseRgiis'Setopt argument has multiple values: %ss Setopt argument has no value: %ss1Main config did not have a %s attr. before setoptsConfig error: %sis%s: %ssOptions 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)cSstjdtj|S(Ns%Y-%m-%d %H:%M(ttimetstrftimetgmtime(R]((s/usr/share/yum-cli/cli.pyt
sm_ui_time?scSstjdtj|S(Ns%Y-%m-%d(RRR(R]((s/usr/share/yum-cli/cli.pyt
sm_ui_dateAstpatternsRt0s%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(QtYumOptionParserRjt	optparsert
firstParsetversionRt__version__R)tquiettFalsetverboseRRwRuRnRttgetattrtgetRoott
debuglevelt
errorleveltpreconftconffiletfntroott	nopluginstinit_pluginstpluginst	TYPE_COREtTYPE_INTERACTIVEtplugin_typest	_splitArgtdisablepluginstdisabled_pluginst
enablepluginstenabled_pluginst
releasevertconfR&twarningRbRRMtcriticalRRRtIOErrorRRtreprtfilenamet
ValueErrort	set_usagetruntsetupYumConfigtcmdstcachetrun_with_package_namestsortedtrpmdbtreturnPackagestepochtreleasetarchttermtMODEROtinstalltimetpackagert	buildtimet	committert
committimet	sleeptimeRStrandomt	randranget	cmdstringt
parseCommandsRRtsleep(RRtoptsRzR{toptRtpcR|tmsgtet	yum_progstdoneRRtpkgtverRORtarg((s/usr/share/yum-cli/cli.pytgetOptionsConfigs			#				
	

	*&				$				"			
cCs|jjdtj|jjtjjd|j|jjtjjd|jj	t
|jjdkrt
|jdkr|jj|_n|j|j_t
|jdkr|j
jtd|jtn|jd|_|jd|_t
|jdkrd|jjtjjdx0|jD]"}|jjtjjd|q;Wn|j|jkr|j
jtd	|jtjdtn|j|j|jj||j|jd
S(sRead :attr:`self.cmds` and parse them out to make sure that
        the requested base command and argument makes any sense at
        all.  This function will also set :attr:`self.basecmd` and
        :attr:`self.extcmds`.
        sYum version: %ssCOMMAND: %ssInstallroot: %siisYou need to give some commandsExt Commands:
s   %ss)No such command: %s. Please use %s --helpN(R'tdebugRRRTRUtDEBUG_4RRtinstallrootRpRhRR&RRRgRtbasecmdtextcmdsR(Rtargvt_set_repos_cache_reqtdoCheck(RR((s/usr/share/yum-cli/cli.pyRks2
-
	#	
c	Cs|j|j}d}t|drC|j||j|j}nd}d}x|jjD]y}tj	j
|jsd}Pntj|jj
}|s|}|}q_||kr|}q_||kr_|}q_q_W|r||dkrd}q|tjkrd}qn|s(d}nt}x5|jjD]$}||_|jr>t}q>q>W|r|rtj|dkr|rdS|jjtdndS(s< Set the cacheReq attribute from the commands to the repos. twritetcacheRequirementi<iiiNsJRepodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fastiiQiiiQiu(R(RRbRRRStrepostlistEnabledtostpathtexiststmetadata_cookietstattst_mtimeRR)Rct_metadata_cache_reqt_matchExpireFilterRR&RR(	RRtcmdtcacheReqtts_mintts_maxRtrtstall_obey((s/usr/share/yum-cli/cli.pyRsD			
			
"cCs~t|dsdS|js dS|j}g|D]}dj|^q0}|jddj|}|jjd|dS(Nt_shell_history_cmdst Rs
s
shell-cmds(RbRtjoinRqthistorytwrite_addon_data(RtdataR((s/usr/share/yum-cli/cli.pyt_shell_history_writes		"
cCs`tjd|}|j|_t|jdkr@|jn
|j|`|j|jfS(sRun a shell-like interface for yum commands.

        :return: a tuple containing the shell result number, and the
           shell result messages
        Ri(	tshelltYumShellRRpRtcmdlooptscripttresultt
resultmsgs(Rtyumshell((s/usr/share/yum-cli/cli.pytdoShells

cCsAd}tjd}i}x|j|D]}|jddkr[t|jdntjt|jdd}|jd|kr|||jd<n||jd|kr+|||jd<q+q+W|r-|td7}x9|D].}|td	d	|||||f7}qWntd
|}|S(sParse the error string for 'interesting' errors which can
        be grouped, such as disk space issues.

        :param errstring: the error string
        :return: a string containing a summary of the errors
        Rs)needs (\d+)(K|M)B on the (\S+) filesystemitMig@isDisk Requirements:
s8  At least %dMB more space needed on the %s filesystem.
sError Summary
-------------
(	tretcompiletfinditertgrouptinttmathtceilRR(Rt	errstringRitptdisktmt
size_in_mbR((s/usr/share/yum-cli/cli.pyterrorSummarysL
/cCsd}xtry|jWntjjk
r}t||krft|}|jj|n|jrtjj	t
dn|jjs|jjdddl
}|j|j|jtjdqtjj	t
dq	XPq	WdS(s5Establish the yum lock.  If another process is already
        holding the yum lock, by default this method will keep trying
        to establish the lock until it is successful.  However, if
        :attr:`self.conf.exit_on_lock` is set to True, it will
        raise a :class:`Errors.YumBaseError`.
        RsCan't create lock file; exitingsHAnother app is currently holding the yum lock; waiting for it to exit...iNisTAnother app is currently holding the yum lock; exiting as configured by exit_on_lock(R)tdoLockRRt	LockErrorR
R&RterrnoRRRtexit_on_locktutilstshow_lock_ownertpidRR(RtlockerrRR((s/usr/share/yum-cli/cli.pytwaitForLocks"		cCst}t}|j|j}t|drI|j||j|j}n|r}t|dr}|j||j|j}n|s|ry|j|Wqt	j
jk
r}dt|gfSXn|j
dt|j|jj||j|jS(s2Call the base command, and pass it the extended commands or
           arguments.

        :return: (exit_code, [ errors ])

        exit_code is::

            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needTsRemoveiR(R)RR(RRbRRRt_getTsRRRR
Rt	doCommand(RRRRR((s/usr/share/yum-cli/cli.pyt
doCommands&sc!
sfd}t|jdkr>|jjtddS|j}|jjtjj	r~|jj
tjj	|n,|jjs|jj
r|jj|ng}g}tt}xs|jjD]b}|jd,krt}|j}|r4|j|q4qt|j}|r|j|qqW|jjs[|j|n|j|||jj}|d-k	r|jj|dkrtd}	|d	r|	td
7}	|jjt|	q|	td7}	tjj|	n|j rkd-}
|jjs-||}
n|
sM|jjtddS|
d
krkt|j_!qkn|jj!r|jj
tjj"tdn|jj
tjj"td|j#|d|j$}t|dkrVd}|td7}xI|D]A}
tj%j&||
}x"|D]}|d|
|f7}q"WqWtjj|n|j'|dkrodS|j(|j)}d-|_)|j*ddt+j+}|jj
tjj"td|j,}t}|rt}x)|D]!}	|	j-drqnt}qW|r$tdGHntdGHt}x|D]}	t.|	GHq<W|rjdtdgfS|rzdgfSdtd|jj/gfSn|jj0dt+j+|t+j+}|jj
tjj"td|jj1|jj2t3|dt}|jj4|}~t|dkrtd}x"|D]}|dt5|7}qIWtjj|d |j6|n|jj
tjj"td!|jj0d"t+j+|t7j7t7j8t7j9t+j+}t}x*|jjD]}|j:rt}PqqW|rf|j(|j*dd|jj;|jj1|jj2n||_)t3|d#t<j=t>|}|jj?d	krt|j@_<nid$gd%6}x|D]}|jjAd&|s|jBjCd&|rqnx||D]|}y7tDjEjF||jj
tjjGtd'|WqtHk
r}|jj
tjjGtd(||fqXqWqW|jj
tjj"td)|jId*|} |jj0d+t+j+||jj
tjj	|jJt7j7t7j8tK| jLS(.s)Take care of package downloading, checking, user
        confirmation and actually running the transaction.

        :return: a numeric return code, and optionally a list of
           errors.  A negative return code indicates that errors
           occurred in the pre-transaction checks
        csxidtdtdtdfd6}s\|jd|}|dkrXd}n|S|jdtdd|S(NudtdtdownloadtdownloadonlytextratpromptsIs this ok [y/d/N]: (RtuserconfirmRS(Rtdl_onlytret(tstuff_to_download(s/usr/share/yum-cli/cli.pyt_downloadonly_userconfirmSs	is9Trying to run the transaction but nothing to do. Exiting.iR~tuis6future rpmdb ver mismatched saved transaction version,is ignoring, as requested.s
 aborting.sExiting on user commandRs.Background downloading packages, then exiting:sDownloading packages:tcallback_totalRsError downloading packages:
s	  %s: %s
tkeepoldsRunning transaction checksrpmlib(s'ERROR You need to update rpm to handle:s)ERROR with transaction check vs depsolve:sRPM needs to be updatedsPlease report this error in %ssTransaction check time: %0.3fsRunning transaction testttestsTransaction check error:
s  %s
s
sTransaction test succeededsTransaction test time: %0.3ftdisplayslibnsssysinit.sosnss-sysinitROsPreloaded shared library %ss'Could not preload shared library %s: %ssRunning transactiontcbsTransaction time: %0.3f(R~R%N(MRpttsInfoR'tinfoRtlistTransactiontisEnabledForRRUtINFO_1RTRtassumenot	assumeyesR&twarnRR)t
getMemberstts_statetpoRqttstclosetreportRemoveSizetreportDownloadSizet_check_future_rpmdbvRStfutureRpmDBVersionRRRt
_promptWantedRRVtdownloadPkgstdownload_callback_total_cbR_R`tgpgsigchecktinitActionTst
dsCallbackt
populateTsRt_run_rpm_checkt
startswithR	tbugtracker_urlRtordertcleanRR(RRRRtSIG_DFLt	reinstalltcheckR!tYumCliRPMCallBacktweakrefRR)t
matchNaevrRtsearchNevratctypestcdlltLoadLibraryRt	ExceptiontrunTransactiontpostTransactionOutputRtreturn_code(!RR$tlststdownloadpkgstrmpkgstinstall_onlyttxmbrR5tcfrRtuctproblemsRR\terrorsterrortdscbtrcd_sttmsgstdepsolvetrpmlib_onlyttt_stttestcbttserrorstdescrtts_stthave_reinstallsR*tpreloadRtlibRtresultobject((R#s/usr/share/yum-cli/cli.pyt
doTransactionKs$		





		




 




	


		

				#
csx|D]}j|\}}|dkr4qq|dkrjjoVjj}tjjr|rtjj	t
dnj|fdqtjj	|qWdS(sLPerform GPG signature verification on the given packages,
        installing keys if possible.

        :param pkgs: a list of package objects to verify the GPG
           signatures of
        :return: non-zero if execution should stop due to an error
        :raises: Will raise :class:`YumBaseError` if there's a problem
        iisTRefusing to automatically import keys when running unattended.
Use "-y" to override.cs
jS(N(R (R]tytz(R(s/usr/share/yum-cli/cli.pyR^Vs(tsigCheckPkgRR1R0RtstdintisattyRRRRtgetKeyForPackage(RtpkgsR5Rterrmsgtay((Rs/usr/share/yum-cli/cli.pyR?=s	
	cCs|jd|gdt}|j|j}ttd|}|r|jtddj|}|j	j
tjj
t|ndS(s= If install argument doesn't match with case, tell the user. Rtignore_casecSs|jS(N(RO(R]((s/usr/share/yum-cli/cli.pyR^bss  * Maybe you meant: s, N(tdoPackageListsR)t	installedt	availabletsettmapt
fmtKeyValFillRRR'RTRRURVR(RRtmatchesR((s/usr/share/yum-cli/cli.pyt_maybeYouMeant^sc	Cs|s|ddkrdSd}|r0d}n|jd|d|gdt}|jss|jrw|j|rwdS|jjd	}|jjd
}|jr|jjt	j
jtd|||dS|jd|d|gdt
}|jr,|jr,|jjt	j
jtd|||dSttd|j}|sS|r~|jjt	j
jtd
|||n|r|jtddj|}|jjt	j
j|ndS(sr If the update/remove argument doesn't match with case, or due
            to not being installed, tell the user. it@NtallRzt	pkgnarrowRRxRRs/Package(s) %s%s%s available, but not installed.cSs|jS(N(RO(R]((s/usr/share/yum-cli/cli.pyR^ssNo package %s%s%s available.s  * Maybe you meant: s, (RyRRzR{treturnInstalledPackagesByDepRRR'RTRRURVRR)R|R}R~R(	RRt
always_outputt
rpmdb_onlyRRthibegthiendR((s/usr/share/yum-cli/cli.pyt_checkMaybeYouMeanths>	!		
!	
	csjjsgSg}tdfdxK|D]C}x'|jD]\}}||7}qNW||j7}q>W|S(sGo through the given txmbrs, and for any to be installed packages
        look for their installed deps. and try to upgrade them, if the
        configuration is set. Returning any new transaction members to be
        isntalled.

        :param txmbrs: a list of :class:`yum.transactioninfo.TransactionMember` objects
        :return: a list of :class:`yum.transactioninfo.TransactionMember` objects
        cs|jkrgS|dkr(|}nj|jg}xu|jD]j}xaj|D]P}|jkryq^n|jd|jd|7}||d|7}q^WqHW|S(NROtrequiringPotreqpo(RORStaddtrequiresRtupdate(RRturettreqtnpkg(t_pkg2upsRR(s/usr/share/yum-cli/cli.pyRs	N(Rtupgrade_requirements_on_installR|RSt	relatedtoR5(RttxmbrsR"RZtrtxmbrtT((RRRs/usr/share/yum-cli/cli.pyt_install_upgraded_requiress
	
tinstallcCst|j}t}x|D]}|jdrwtjj|sUtjj	|rw|j
|}|j|qnytrn|dkr|jd|}n|dkr/y|j
dd\}}	WnE|jjtd|||jjs
dtdgfSwnX|jd|d	|	}n|d
kryO|j
dd\}
}	|
j
dd\}}}|jd
d\}
}WnE|jjtd|||jjsdtdgfSwnX|jd|d|
d|d|d	|	}n*|dkst||jd|}Wntjjk
r}}
|jjtjj|
|jjsdtdgfSqtjjk
r|jjtjjtd|jjd||jjd|j||jjsdtdgfSqXt}|j|qWt|j|krXt|j|}dtdd||gfS|sqdtdgfSdtdgfS(ssAttempt to take the user specified list of packages or
        wildcards and install them, or if they are installed, update
        them to a newer version. If a complete version number is
        specified, attempt to upgrade (or downgrade if they have been
        removed) them to the specified version.

        :param userlist: a list of names or wildcards specifying
           packages to install
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        s.rpms	install-nROs
install-naRlisBad %s argument %s.s2Not tolerating missing names on install, stopping.Rs
install-nevrat-it:RRRRtpatternsNo package %s%s%s available.RRs%d package to installs%d packages to installs
Nothing to doi( RpR+RtendswithRR_t
re_remote_urlRRRtinstallLocalRRtrsplitR'RRRtskip_missing_names_on_installRotAssertionErrorRtGroupInstallErrorRTRURVtInstallErrorRRRR)R(RtuserlistRtrepoidtoldcountRRRtntatnevrtevtrRRtchange((s/usr/share/yum-cli/cli.pytinstallPkgsst
!


	
ic	
Cst|j}t|dkr.|jnDxA|D]9}|jdrtjj|sntjj	|r|j
|dd}|j|q5ny|jd|d|}Wn@tjj
tjjfk
r|j|dtdgfSX|j||s5|j||jjsn|jdd	d
|gdt}|jrk|jrkdtdgfSqnq5q5Wt|j|krt|j|}dtd
d||gfSdtdgfSdS(sTake user commands and populate transaction wrapper with
        packages to be updated.

        :param userlist: a list of names or wildcards specifying
           packages to update.  If *userlist* is an empty list, yum
           will perform a global update
        :param quiet: unused
        :param update_to: if *update_to* is True, the update will only
           be run if it will update the given package to the given
           version.  For example, if the package foo-1-2 is installed,
           updatePkgs(["foo-1-2], update_to=False) will work
           identically to updatePkgs(["foo"]), but
           updatePkgs(["foo-1-2"], update_to=True) will do nothing
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        is.rpmt
updateonlyiRt	update_tos1Not tolerating missing names on update, stopping.RRRRxis%d package marked for updates%d packages marked for updatesNo packages marked for updateN(RpR+RRRR_RRRRRRRtUpdateMissingNameErrorRRRRtskip_missing_names_on_updateRyRR{RzR(	RRRRRR|RRR((s/usr/share/yum-cli/cli.pyt
updatePkgss2

!



!cCsd}|rH|ddkrH|d}|d}|dkrHd}qHng}i}x0t|jjd|D]}|||j<qpWg}|jjr|jjdd}nxC|D];\}}|d|krqn|j|j	d|qWx5|D]-\}}|d|kr qn||d=qWi}	g}
|ry|j
jd|j}
Wqt
jjk
rg}
qXnx0|
D](}|j|krqn||	|j<qWx|D]}||	krqn||}|	|}
|j|
r|dkr
qnx|jj|gD]}|j|
re|j|re|j|jd	|q n|j}t}xc|j
j|jD]L}
d
|krd|kr|j|
jkr|j|
jkrt}PqqW|rq n|j|jd|jq Wqn|j|
rt}xc|jj|
jgD]I}|j|
rXt}q:|j|
r:|j|jd	|q:q:W|rqn|j|jd|
jq|j|
r|
j\}}}}}|j|j	d
|d|d|d|q|
j\}}}}}|j|j d
|d|d|d|qW|r}dt!ddt"|t"|gfSdt#dgfSdS(sUpgrade or downgrade packages to match the latest versions
        available in the enabled repositories.

        :param userlist: list of names or wildcards specifying
           packages to synchronize with the repositories.  If the
           first string in *userlist* is "full", packages will also be
           reinstalled if their checksums do not match the checksums
           in the repositories.  If *userlist* is an empty list or
           only contains "full", every installed package will be
           synchronized
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        tdiffitfullt	differentiRtnewesttpkgtupR5t
checksum_typet
checksum_dataRRORRtrelis2%d package marked for distribution synchronizations3%d packages marked for distribution synchronizations3No packages marked for distribution synchronizationN(RRR($RRRRORt	obsoletestuptgetObsoletesTuplestextendRtpkgSacktreturnNewestByNametkeysRRtPackageSackErrortverEQtsearchNamestallowedMultipleInstallstremovet
yumdb_infoRtsearchPkgTupleRRRtpkgIdR)RItverGTRtverLTt	downgradeRRpR(RRtleveltdupdatestipkgsRRt
obsoletingRztapkgsRutipkgnametipkgtapkgtnapkgtnayitfoundRRRRR((s/usr/share/yum-cli/cli.pytdistroSyncPkgsOs

"




	 	 ./)RcCs1g}x|D]}|rG|jd|}|r
|j|q
q
ntrPnh|dkrq|jd|}nG|dkry|jdd\}}Wn&|jjtd	||q
nX|jd|d
|}n|dkryO|jdd\}	}|	jd
d\}}
}|
jdd\}}
Wn&|jjtd	||q
nX|jd|d|d|
d|d
|}n*|d kst||jd|}|s|j	|dtdt
n|j|q
W|rdtddt|t|gfSdtdgfSdS(!sTake user commands and populate a transaction wrapper with
        packages to be erased.

        :param userlist: a list of names or wildcards specifying
           packages to erase
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        R5serase-nsremove-nROserase-nas	remove-naRlisBad %s argument %s.Rserase-nevrasremove-nevraRiRRRRteraseRRRRs%d package marked for removals%d packages marked for removalisNo Packages marked for removalN(serase-nsremove-n(serase-nas	remove-na(serase-nevrasremove-nevra(Rsremove(
RRRRR'RRRoRRR)RRp(RRtposRtall_rmsRtrmsRRRRRRR((s/usr/share/yum-cli/cli.pyt	erasePkgssJ


-)c
CsZt|j}t}x|D]}|jdrhtjj|sUtjj	|rh|j
|qny|jd|Wn`tjj
k
r|jjtjjtd|jjd||jjd|j|qXt}qWt|j|kr.t|j|}dtdd||gfS|sGd	td
gfSdtd
gfS(sAttempt to take the user specified list of packages or
        wildcards and downgrade them. If a complete version number if
        specified, attempt to downgrade them to the specified version

        :param userlist: a list of names or wildcards specifying
           packages to downgrade
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        s.rpmRsNo package %s%s%s available.RRis%d package to downgrades%d packages to downgradeis
Nothing to doi(RpR+RRRR_RRRRtdowngradeLocalRRtDowngradeErrorR'RTRURVRRRRR)R(RRRRRR((s/usr/share/yum-cli/cli.pyt
downgradePkgss,
!
	
cCs*t|j}t}x|D]}|jdrwtjj|sUtjj	|rw|j
|}|j|qny|jd|}Wntj
jk
r|j|dtqtj
jk
r^}x|jD]}d}d|jkr|jj}td|}ntd}	|jjtjj|	|jjd||jjd	|qWqtj
jk
r}tstd
|jjtjj|qXt}|j|qWt|j|krt|j|}
dtdd
|
|
gfS|sdtdgfSdtdgfS(sAttempt to take the user specified list of packages or
        wildcards and reinstall them.

        :param userlist: a list of names or wildcards specifying
           packages to reinstall
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        s.rpmRRRt	from_repos
 (from %s)s)Installed package %s%s%s%s not available.RRs"Shouldn't happen, but just in caseis%d package to reinstalls%d packages to reinstallis
Nothing to doi(RpR+RRRR_RRRRtreinstallLocalRRIRtReinstallRemoveErrorRtReinstallInstallErrortfailed_pkgsRRRR'RTRURVRRtReinstallErrorRR)R(RRRRRRRRtxmsgRR((s/usr/share/yum-cli/cli.pyt
reinstallPkgs$sB
!
cCst|dkr%dtdgfSt}xc|D][}|jdsi|jjtjjd|q2n|j	|d|}|r2t
}q2q2W|rdtdgfSdtdgfS(	sInstall or update rpms provided on the file system in a
        local directory (i.e. not from a repository).

        :param filelist: a list of names specifying local rpms
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        isNo packages provideds.rpms,Skipping: %s, filename does not end in .rpm.RisPackage(s) to installs
Nothing to do(RpRRRR'RTRRURVRR)(RtfilelistRt
installingRR((s/usr/share/yum-cli/cli.pytlocalInstall[s


c	CsMddddddddg}d}t}t}t|d	kr|rn|d	dkrnt}|jd	q|r|d	dkrt}|jd	q|d	|kr|jd	}qn|jd
|d|dtd
|}|jjr|j|j7_n|r%|j|_	|j
|_n|r7g|_n|rIg|_
n|S(sReturn a :class:`yum.misc.GenericHolder` object containing
        lists of package objects that match the given names or wildcards.

        :param extcmds: a list of names or wildcards specifying
           packages to list
        :param installed_available: whether the available package list
           is present as .hidden_available when doing all, available,
           or installed
        :param repoid: a repoid that all packages should belong to

        :return: a :class:`yum.misc.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
        R{RzRtextrastupdatestrecentRs
distro-extrasiRRRxR(RRpR)tpopRyRtshowdupesfromreposR{treinstall_availablethidden_availableRzthidden_installed(	RRtinstalled_availableRtspecialRtdone_hidden_availabletdone_hidden_installedtypl((s/usr/share/yum-cli/cli.pytreturnPkgLists~s4csUddddg}jj}ttt}t}t}t}fd}tdkrddkrjdnjddgd	|d
t}	x|	D]\}
}|kr-|rt|tkrPndGHnt}|t	d}n|j
|
|jj|
|qWj|d	|d
t}	t}t|tkrdGHtdkrt	d
}nt	d}|j
jdj
jdfGHg}	nx|	D]\}
}tt|kr/qn|rStt|krSqn|kr|rmdGHn|t	d}|jnj|
|qW|rt|tkrdGHt	dj
jdj
jdfGHnx6D].}
|
|krjjt	d|
qqW|sKdt	dgfSd|	fS(sESearch for simple text tags in a package object. This is a
        cli wrapper method for the module search function.

        :param args: list of names or wildcards to search for.
           Normally this method will begin by searching the package
           names and summaries, and will only search urls and
           descriptions if that fails.  However, if the first string
           in *args* is "all", this method will always search
           everything
        :return: a tuple where the first item is an exit code, and
           the second item is a generator if the search is a
           successful, and a list of error messages otherwise

        exit_code is::

            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
        RORitdescriptionturlcsDgD]}|kr|^q}j|dj|GHdS(Ns, (t
fmtSectionR(ttextRt	used_keys(RRR(s/usr/share/yum-cli/cli.pyt_print_match_sections%iiRtshowdupsRRsN/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|RpRtsearchGeneratorR)RRRt
matchcallbackRRR&R(RRt
searchlisttdupstokeystakeystmkeysRRtmatchingR5t
matched_valueRR((RRRs/usr/share/yum-cli/cli.pytsearchsn				"	

	#	,
 c	Csg}x|D]}|jdrqtjj|sFtjj|rqtjj||j	|}|j
|q
|jjr|j
|jjd|gdtq
y)|j
|jjd|gdtWq
tjjk
rq
Xq
W|j|}|j|dgfS(sPrint out a formatted list of dependencies for a list of
        packages.  This is a cli wrapper method for
        :class:`yum.YumBase.findDeps`.

        :param args: a list of names or wildcards specifying packages
           that should have their dependenices printed
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        s.rpmRRxi(RRR_RRRRtpackagest
YumUrlPackageR6RqRRRRRR)RRRtfindDepst
depListOutput(RRRuRtthispkgtresults((s/usr/share/yum-cli/cli.pytdeplists"
!

c	CsE|jj}t|j_|j}|j|d|dt}t|dkrttjt	j
djd}g}xx|D]p}|sq~ntj
j|s~tj
j|rq~nx1|D])}|sqn|jd||fqWq~W|j|d|dt}n||j_t|dkr;ddgfSdgfS(sPrint out a list of packages that provide the given file or
        feature.  This a cli wrapper to the provides methods in the
        rpmdb and pkgsack.

        :param args: the name of a file or feature to search for
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        tcallbacktcallback_has_matchforitPATHRs%s/%ssNo matches found(RRR)tmatchcallback_verbosetsearchPackageProvidesRpR|RRRtenvironRoRR_tre_filenametre_globRq(	RRtold_sdupR*R	tpathstnargsRR((s/usr/share/yum-cli/cli.pytprovidesAs.		#
$

cCsLt}x|D]}y|j|}Wntjjk
rHd}n4X|jjd||jjd|j|j	fy|j
|}Wn-tjjk
r|s
|j|q
qX|s|jjd|n|j|s|jjd|j|j	fqqW|rB|j
jtddjt|ndgfS(sPrint information about a package that provides the given
        dependency.  Only one package will be printed per dependency.

        :param args: a list of strings specifying dependencies to
           search for
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        s  %s:s%s %ss"Error: No packages found for:
  %ss
  iN(R|treturnInstalledPackageByDepRRRRSR'R,tenvratui_from_repotreturnPackageByDepRRR&RRRR(RRt	not_foundRRR((s/usr/share/yum-cli/cli.pyt
resolveDepClils.	

c"CsYd}}}}}g}}}	}
}|jtddjg|jjD]}|j^qQ}
|jjtj	j
|
td|jj}
|jjtj	j
|
d|krb|j\}}|j\}}|j\}}	|j\}}
|j\}}|jjd|||||}|||	|
|}x|D]}
|jj|
q]W|jddg}tj|d	}ggggf}|jj}t}x|D]}tjj|}tjj|r(||kr	d
}q.||jrd}q.d}nd}tjj |}|sLqn||j!||f|dkr|d/krt"}qqWtd|g}d0}ddddg}xt#|D]\}}g}d} xWt$||dddtD]6\}}|j!d|j%||f| |7} qW|r>dnd}!|d|j%| t||!fg7}||7}| ||<qW|td|j%t&|g7}dj|}
|jjtj	j
|
|s|jj'dkr|gfS|j%t&|d } | ddkr/| d d} ntd | }
|jjtj	j
|
|gfSd!|kr|jjtd"|j\}}nd#|kr|jjtd$|j\}}nd%|kr|jjtd&|j\}}	nd'|ksd%|krJ|jjtd(|j\}}
nd)|ksbd%|kr|jjtd*|j(\}}nd+|kr|jjtd,|j\}}nd-|kr|jjtd.|jjdn|||||}|||	|
|}x'|D]}
|jjtj	j
|
q,W|gfS(1sRemove data from the yum cache directory.  What data is
        removed depends on the options supplied by the user.

        :param userlist: a list of options.  The following are valid
           options::

             expire-cache = Eliminate the local data saying when the
               metadata and mirror lists were downloaded for each
               repository.
             packages = Eliminate any cached packages
             headers = Eliminate the header files, which old versions
               of yum used for dependency resolution
             metadata = Eliminate all of the files which yum uses to
               determine the remote availability of packages
             dbcache = Eliminate the sqlite cache used for faster
               access to metadata
             rpmdb = Eliminate any cached datat from the local rpmdb
             plugins = Tell any enabled plugins to eliminate their
               cached data
             all = do all of the above
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        isCleaning repos: Rs9Operating on %s (see CLEAN OPTIONS in yum(8) for details)RRGtbasearchRs/*iiii@is"Disk usage under %s after cleanup:s
enabled repossdisabled repossuntracked reposs
other dataR\cSs|dS(Ni((R]((s/usr/share/yum-cli/cli.pyR^streverses
  %-5s  %sRRs
%-5s  %s%ss%-5s  totals
iitbytess@Other repos take up %s of disk space (use --verbose for details)theaderssCleaning up headersRsCleaning up packagestmetadatasCleaning up xml metadatatdbcachesCleaning up database cachesexpire-caches!Cleaning up expire-cache metadataRsCleaning up cached rpmdb dataRsCleaning up pluginsi(s
enabled repossdisabled repossuntracked reposs
other data()R~RRRRtidR'RTRRURVRtcachedirtDEBUG_3t
cleanPackagestcleanHeaderst
cleanMetadatatcleanSqlitet
cleanRpmDBRRR&RtgetCachedirGlobtglobR)RRtbasenametisdirtenabledR_t
disk_usageRqRt	enumerateRt
format_numbertsumRtcleanExpireCache("RRthdrcodetpkgcodetxmlcodetdbcodetexpccodet
pkgresultst
hdrresultst
xmlresultst	dbresultstexpcresultsR]Rtrpmcodet
rpmresultstcodeRt	cacheglobRttableRtemptyRRtcolRgtlinesR(ttotalstheadertrowsttotaltcolon((s/usr/share/yum-cli/cli.pytcleanClis1	


	
		
	#
&
	

cCs
|j|S(sPrint out a list of groups that match the given names or
        wildcards.

        :param extcmds: a list of names or wildcards specifying
           groups to list
        :return: (exit_code, [ errors ])

        exit_code is::

            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        
        (t_returnGroupLists(RR((s/usr/share/yum-cli/cli.pytreturnGroupLists/sc
s?idd6dd6dd6dd6dd6dd6dd6dd6dd	6d
d6d
d6d
d
6d
d
6dd6dd6dd6dd6dd6dd6}jjtjj}itd6dd6dd6dd
6dd6dd6|d6|}xg|rJ|d}t}|jdr|d}t}n||kr,Pn|||<|j	dqW|sZd}nddkrddkrtd<td<nddkrd
dkrddkrtd<td
<nd}j
d|d|dt}	|	\}
}}}
ds,g}g}
ndsEg}
g}nds^g}g}
ngfd}|td||td|
g}x:|
D]2}|jrqnd
sqn|j
|qW|td|g}x:|
D]2}|jsqnds*qn|j
|qW|td|g}x:|D]2}|jrpq[nd
sq[n|j
|q[W|td|g}x:|D]2}|jsqndsqn|j
|qW|td |s,jjtd!d"j|dgfSdtd#gfS($NR[tlangtlanguaget	languagestlangstenvtenvironmenttenvironmentstenvsRtpackageRRutavailR{tinstRzR+tidsitnoiRtuservisiblet
return_evgrpscs|s
dSj|rFjjtjjd|t|dSjjtjj|xi|D]a}d|j}dr|d|j7}n|j	r|d|j	7}njj
d|qfWdS(Ns%s %us   %sR+s (%s)s [%s]s%s(RqR'RTRRURVRptui_nametcompsidtlangonlyR,(tsecttgroupsRR(RRRitwts(s/usr/share/yum-cli/cli.pyt_out_grps



	sInstalled Environment Groups:sAvailable Environment Groups:sInstalled Groups:sInstalled Language Groups:sAvailable Groups:sAvailable Language Groups:s)Warning: no environments/groups match: %ss, tDone(R'R.RRUR-RRSR)RDRtdoGroupListsRRhRqR&R_R(RRRitwts_maptverbt	ouserlistRtvaltuvtdGLRzR{tievgrpstevgrpsRlRjR((RRRiRks/usr/share/yum-cli/cli.pyRU?s



	

		 

0


	
	
	
	

	

	

	

cCs|j|dtS(sPrint a summary of the groups that match the given names or
        wildcards.

        :param userlist: a list of names or wildcards specifying the
           groups to summarise. If *userlist* is an empty list, all
           installed and available packages will be summarised
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        Ri(RUR)(RR((s/usr/share/yum-cli/cli.pytreturnGroupSummaryscCsx|D]}t}t}t}|jdrA|d}t}n"|jdrc|d}t}n|rx0|jj|D]}|j|t}q|Wn|rx0|jj|D]}|j|t}qWn|s|jj	t
d|qqWdgfS(sPrint complete information about the groups that match the
        given names or wildcards.

        :param userlist: a list of names or wildcards specifying the
           groups to print information about
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        s@^iRis-Warning: group/environment %s does not exist.i(RR)RDtcompstreturn_environmentstdisplayGrpsInEnvironmentst
return_groupstdisplayPkgsInGroupsR&R_R(RRtstrngt
group_matchedtpkg_grptgrp_grptevgroupR((s/usr/share/yum-cli/cli.pytreturnGroupInfos*

	
	



 cCsg}|r|jjdkrx.|jjD] }|j|jd|q,Wx1|jjD] }|j|jd|q]Wnt}x|D]}t}t}	|j	drt}	|d}n"|j	drt}|d}nt}
g}|r|j
j|}nxs|D]k}t}
y|j|j
d|}
Wn3tjjk
rr|jjtd|qqX|j|
qWg}|	r|j
j|}nxs|D]k}t}
y|j|jd|}
Wn3tjjk
r	|jjtd|qqX|j|
qW|
s@|jjtd	|qnt}qW|s|jjdkr{|jjtd
nd}|rd}n|rd}n|tdgfSdtd
dt|t|gfSdS(s|Mark the packages in the given groups for installation.

        :param grouplist: a list of names or wildcards specifying
           groups to be installed
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        tobjectss@^Riitupgrades-Warning: Environment group %s does not exist.s)Warning: Package group %s does not exist.s!Warning: group %s does not exist.s0Maybe run: yum groups mark install (see man yum)isANo packages in any requested group available to install or updates%d package to Installs%d packages to InstallN(Rt
group_commandtigroupsR]Rt_at_groupupgradeRjRR)RDRxRytselectEnvironmentt
environmentidRRtGroupsErrorR&RRR{tselectGrouptgroupidR_RRp(Rt	grouplistRt	pkgs_usedtievgrptigrpRtgroup_stringRRR~RjRRtexit_status((s/usr/share/yum-cli/cli.pyt
installGroupssl
!






		c	Csg}x|D]~}t}t}|jdrAt}|d}n"|jdrct}|d}ng}|r|jj|}|s|jjtd|qnxN|D]F}y|j|j	}Wnt
jjk
rqqX|j
|qWg}|r:|jj|}|s:|jjtd|q:nxN|D]F}y|j|j}Wnt
jjk
ryqAqAX|j
|qAWq
W|s|jjdkr|jjtdnd	td
gfSdtddt|t|gfSd
S(suMark the packages in the given groups for removal.

        :param grouplist: a list of names or wildcards specifying
           groups to be removed
        :return: (exit_code, [ errors ])

        exit_code is::

            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
        s@^iRisNo environment named %s existssNo group named %s existsRs/Maybe run: yum groups mark remove (see man yum)is!No packages to remove from groupss%d package to removes%d packages to removeN(R)RDRRxRyR&RRtenvironmentRemoveRRRRRR{tgroupRemoveRRRRRp(	RRRRRRRjRR((s/usr/share/yum-cli/cli.pytremoveGroupsMsJ





cCsv|jjs|jjr)|jjr)tS|jjr9tSx6|jjD]%}|j	sj|j
|jkrItSqIWtS(N(RR1RR0RtalwayspromptR)R+R3tisDepROR(RRZ((s/usr/share/yum-cli/cli.pyR<s%	cCstjj|jjdS(s/Print out an explanation of command line usage.N(RtstdoutRRtformat_help(R((s/usr/share/yum-cli/cli.pyRgscCstjj|jjdS(s,Print out an explanation of the shell usage.N(RRRRt	get_usage(R((s/usr/share/yum-cli/cli.pyt
shellUsagescCs|jj}|jjd|rG|jjtjjt	d|t
S|jjd|j}g}xj|D]b}t
|jt
|jkr|j|ql|jjtjjt	d|j|jqlqlWt|dkrtx|D]}|j|r/|j|kr(|j|jkr,tSqmtSq|j|rBt
S|j|r|rm|j|rmtSqqWn)|jjtjjt	d|jtSt
S(s:check if the package is reasonably installable, true/falseR5s)Package %s is already installed, skippingROs#Discarding non-comparable pkg %s.%sis;No other %s installed, adding to list for potential install(Rt
exactarchlistRtcontainsR'RTRRUR-RRRNRORRRqRpRR)RRRtDEBUG_1(RRtematchRtinstalledByKeyt
comparabletinstpo((s/usr/share/yum-cli/cli.pyt_installables8

%N(/RRRRR+RSRZRjRRRR)RRRRRRRnR?RRRRRRRRRRRRRRRR$RTRVRURwRRRR<RgRR(((s/usr/share/yum-cli/cli.pyRKsT	*			&		&9	
				%		!	
+	'W>	p9	,	7#3	l	$	+	+				(T	<			RcBsheZdZdZdZdZedZd
dZ	dZ
dZdZd	Z
RS(s\Subclass that makes some minor tweaks to make OptionParser do things the
    "yum way".
    cKsd|kr#|d|_|d=n	t|_tj||tjd|_||_t|t	d|_
|j|j
|jdS(NRsyum.clisPlugin Options(
t_utilsRRRR#R%R&RRRtplugin_option_grouptadd_option_groupt_addYumBasicOptions(RRtkwargs((s/usr/share/yum-cli/cli.pyRs

		cCs4|j|jjtd|tjddS(sOutput an error message, and exit the program.  This method
        is overridden so that error output goes to the logger.

        :param msg: the error message to output
        sCommand line error: %siN(tprint_usageR&RRRR(RR((s/usr/share/yum-cli/cli.pyR_s
c
Cswytdd|}WnJtk
rb}|jjtjtdd|fIJtjdnX|jd|dS(sParse only command line options that affect basic yum
        setup.

        :param args: a list of command line options to parse
        :return: a dictionary containing the values of command line
           options
        s--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_filtercmdlineRRRgRR
RRt
parse_args(RRR((s/usr/share/yum-cli/cli.pyRs


cCs:g}x-|D]%}|j|jddjq
W|S(sR Split all strings in seq, at "," and whitespace.
            Returns a new list. t,R(RtreplaceRo(tseqR"R((s/usr/share/yum-cli/cli.pyR	s
#c
Cs|s|j\}}n|jd|\}}|jjj||y|jsd|jjjrvt|jj_n|jrd|jj_n|j	rd|jj_	n|j
|jj_|j|jj_
|j|jjd<|j|jjd<|j|j|jjd<|j|j|jjd<|j|j|jjd<|j|j|jjd<|jjjrtjd	krd|jj_n!|jjsd|jj_n|jrd|jj_n|jrd|jj_n|jr|j||j|jj_n|jr7t|jj_ n|j!rRt|jj_!n|j"dkrst$t%dn|j"dkr|jjj"d
krN|jj&j'd|jjj"qNni
d
d
6d
d6dd6dd6dd6dd6dd6dd6dd6dd6}|j(|j"|j"|_"|j"d
krN|jj&j'd|j"n|j|j)|jj_*|j|j+|jj_,|j|j-|j_.x|jj.D]{}y/|jjj-}|j/|||jj_-Wqt0j1j2k
r#}|j3j4||jj5t6j7dqXqW|j8dk	rL|j8|jj_8n|jj9|jj:x|j;D]\}}	yH|dkr|jj;j<|	n"|dkr|jj;j=|	nWqpt0j1j2k
r	}|j3j4||jj5t6j7dqpXqpW|j>rLt|j_?x&|jj;j@D]}
t|
_?q6WnWnFt$k
r}|j3j4t%d||jj5t6j7dnX||fS(sParse command line options.

        :param args: the command line arguments entered by the user
        :return: (opts, cmds)  opts is a dictionary containing
           the values of command line options.  cmds is a list of the
           command line arguments that were not parsed as options.
           For example, if args is ["install", "foo", "--verbose"],
           cmds will be ["install", "foo"].
        Ritsecuritytbugfixtadvstbzstcvestsevsitautotalwaystnevertttysif-ttytyesRctontoffs)--color takes one of: auto, always, nevertcolort1ttrueRtfalses--enablerepos
--disablereposOptions error: %sN(
NRsalwaysRRsif-ttysyessnoRR(ARRRt
setCmdLinettolerantRR)trecheck_installed_requiresR1R0tdlonlyRtdldirtdownloaddirRtupdateinfo_filtersRRRRRRt	usercacheRtgeteuidRtsetCacheDirt	cacheonlyRRt_checkAbsInstallRoott
skipbrokentskip_brokenRRRSRRRtreinittgettdisableexcludestdisable_excludestdisableincludestdisable_includestexcludetcmdline_excludesRqRRRMR&RRgRRtrpmverbositytsetupProgressCallbackstsetupKeyImportCallbacksRt
enableRepotdisableRepot
nogpgcheckt_override_sigchecksR(RRRRt_remapRtexcludelistRRtrepoexpR((s/usr/share/yum-cli/cli.pyR	s
		"			
			%




	
cCsQ|js
dS|jddkr$dS|jjtd|jtjddS(NiRs*--installroot must be an absolute path: %si(RR&RRRR(RR((s/usr/share/yum-cli/cli.pyR	s	
cCs|j||jr|jjdrtj|jd|jtjre|jd|j|_nA|jdkrtj|jdtjr|jd|_qn|j}nd}|S(s(Return the root location to use for the yum operation.
        This location can be changed by using the --installroot
        option.

        :param opts: a dictionary containing the values of the command
           line options
        :return: a string representing the root location
        Rs/etc/yum/yum.confs
/etc/yum.conf(RRtlstripRtaccessRtR_OK(RRR((s/usr/share/yum-cli/cli.pyR	s	
#cOs|jj|jdS(N(RRgR(RRtvaluetparserRR((s/usr/share/yum-cli/cli.pyt_wrapOptParseUsage	s
cCsd}|jr1t|d}|j|n|}d|_|jddddd|jdtd	d
|_|jdddd
dtd|jdddddd
dtd|jdddddddtddd|jdddddd dddtd!dd"|jd#d$dd%dddtd&dd dd'|jd(dd)dd
dtd*|jd+dd)dd
dt|jd,d-dd.dddtd/dd dd0|jd1d2dddtd3dd4|jd5d6dd7dd
dtd8|jd9d:dd;dd
dtd<|jd=d>dd?dd
dtd@|jdAddBdd
dtdC|jdDddBdd
dt|jdEdd
dtdF|jdGdtdHddI|jdJddddKd|ddLdgdtdMddN|jdOddddKd|ddLdgdtdPddN|jdQdRdgddSdtdTddU|jd1dVdgddSdtdWddN|jd1dXdgddSdtdYddN|jdZdd
dtd[|jd\dd
dtd]|jd^dd
dtd_|jd1d`ddadgddSdtdbddc|jd1ddddedgddSdtdfddc|jdgdd
ddhdtdi|jd1djddkdddtdl|jd1dmddndddtdo|jdpddqdd
dtdr|jdsddtdddtdu|jd1dvddwdgddSdtdx|jdydd
dtdz|jd{dd
dtd||jd}d~dddgddSdtd|jddgddSdtd|jddgddSdtd|jdddgddddSdtddS(NcSs*td|j}|j||fdS(sCallback for the enablerepo and disablerepo option. 
            
            Combines the values given for these options while preserving order
            from command line.
            sparser.values.%sN(tevaltdestRq(toptobjRRRR((s/usr/share/yum-cli/cli.pyt
repo_optcb	ssYum Base Optionstresolves-hs--helptactionRthelpsshow this help message and exitR_s-ts
--tolerantt
store_truesbe tolerant of errorss-Cs--cacheonlyRRs2run 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--show-duplicatess-es--errorlevelRserror output levels
[error level]Rs--rpmverbositysdebugging output level for rpms[debug level name]s-qs--quietRsquiet operations-vs	--verboseRsverbose operations-ys--assumeyesR1sanswer yes for all questionss
--assumenoR0sanswer no for all questionss--nodepss	--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	--excludeRqs"exclude package(s) by name or globs	[package]s--disableexcludess7disable exclude from main, for a repo or for everythings--disableincludess0disable includepkgs 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-brokenRs&skip packages with depsolving problemss--colorRscontrol whether color is useds--releaseverRs5set value of $releasever in yum config and repo filess--downloadonlyRsdon't update, just downloads
--downloaddirRs2specifies an alternate directory to store packagess--setoptRws%set arbitrary config and repo optionss--bugfixs,Include bugfix relevant packages, in updatess
--securitys.Include security relevant packages, in updatess
--advisorys--advisoriesRs=Include packages needed to fix the given advisory, in updatess--bzss7Include packages needed to fix the given BZ, in updatess--cvess8Include packages needed to fix the given CVE, in updatess--sec-severitys
--secseverityRsDInclude security relevant packages matching the severity, in updates(	RRRtconflict_handlert
add_optionRRRSR(RRR((s/usr/share/yum-cli/cli.pyR	s					
	
















N(RRRRR_RtstaticmethodRRSRRRRR(((s/usr/share/yum-cli/cli.pyRs		
			
		cCsfg}t|}xMt|dkra|jd}d|kry|jdd\}}||kr^|j|q^q|dkr|j|q||kr|j|q||krt|dkrt|n|jd}|ddkrt|n|j||gqx?|D]7}t|dkr#|j|r#|j|q#q#WqW|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.
    iRkis--Ri(tlistRpRRoRqRRRD(t	novaloptstvaloptsRtoutRRRtnext((s/usr/share/yum-cli/cli.pyR7
s.
!(/RRRRRRR#RtoptparseRRRtrpmROR4RLRR!RRt
yum.Errorstyum.logginglevelstyum.misctyum.pluginst
rpmUtils.archRRRtyum.rpmtransRRR,tyum.i18nRR	R
tyum.packagesRRRRRR R"RRR(((s/usr/share/yum-cli/cli.pyt<module>sP	
`