MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/share/yum-cli/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/yum-cli/cli.pyc
m
ODc@sddkZdkZdkZdkZdkZdkZdkZdkZdkl	Z	dk
Z
dkZdkZdk
TdkZdkZdkZdklZdklZlZlZdklZlZlZdklZdklZdkZdk Z dk!Z dei"i#fd	YZ$d
ei%e
i&fdYZ'de	fd
YZ(dZ)dS(N(sOptionParser(t*(s
compareEVR(s
parsePackagessYumInstalledPackagesYumLocalPackage(sLoggers	SysLoggersLogContainer(spgpmsg(t_tCliErrorcBstZddZRS(NtcCs tiii|||_dS(N(tyumtErrorstYumBaseErrort__init__tselftargs(RR	((t/usr/share/yum-cli/cli.pyR.s(t__name__t
__module__R(((R
R-st
YumBaseClicBstZdZdZeddZdZgdZdZdZ	dZ
d	Zed
ZeddZ
ed
ZeddZdZedZedZedZedZedZedZedZedZedZdZdZRS(sZThis is the base class for yum cli.
       Inherits from yum.YumBase and output.YumOutput cCsktii|t|_ddddddddd	d
ddd
ddddddddddg|_dS(Ntupdatetinstalltinfotlistteraset	grouplisttgroupupdatetgroupinstalltgroupremovet	groupinfot	makecachetcleantremovetprovidesscheck-updatetsearchtupgradetwhatprovidestlocalinstalltlocalupdatet
resolvedeptshelltdeplist(RtYumBaseRRtFalsetin_shelltyum_cli_commands(R((R
R6s	icCst|do%|djo|idddSn|iddtii|d||o$|idd|i	d|ndS(	segrabs the repomd.xml for each enabled repository 
           and sets up the basics of the repositorytpkgSackis"skipping reposetup, pkgsack existsNisSetting up repositoriestthisrepos/Reading repository metadata in from local files(
thasattrRR)tNonetlogRR$tdoRepoSetuptdosacktdoSackSetup(RR)R.((R
R-BscCs	tdddti|_d}
td|dd|_|iidd	d
ddd
dt	dd|iiddd
ddd
dt	dd|iiddd
ddddddddd|iiddd
ddddddd]dd dd!|iid"dd
d#dddd]dd$dddd%|iid&dd
d'dddd]dd(dddd)|iid*dd
d+dd
dt	dd,|iidd-d
d.dt	dd
dd/|iidd0d
d1dddd]dd2dd3|iidd4dd5dd6d5|
d
d7dgdd8dd9|iidd:dd5dd6d5|
d
d7dgdd;dd9|iidd<d
d=dgdd>dd?dd@|iiddAd
dBdt	dd
ddC|iiddDd
dEdt	dd
ddFytd^d_|}Wn*t
j
o|itidGnX|iidH|dI}yG|ioLti|idJ|itio|idJ|i|_n|i}ndJ}y|idK|idL|WnBtiij
o0}|idItdM|tidGnXtd|iidti |_!|id]j	o"|i|i!_"|i|i_n|i#d]j	o"|i#|i_"|i#|i_#nWnFt
j
o:}|idItdN||itidGnX|i$o!|ii%o|i&|in|ii\}|_'|i(oti)GHtidIn|i%i*||i'yti+|i_,ti)|i_-|ii,dIjoAti.i/|ii0}ti.i2|pZyti3|dOdPWqt4j
o0}|idItdQ|tidGqXny0ti5|ii0ti6ti7Bti8BdR}WnBt4j
o6}|idItdS|ii0tidGnXti:|dT}t;i;|t;i<tddUd|dV|i=}ntddUdd]dV|i=}t?ddUdW|ii@dXdY}	tB|	|g|_C|iDodG|i_Dn|iEodG|i_Fn|iGd]j	otHiI|iGdZ}ndI}|iJodG|i_Jn|io|i|i_nx|iKD]z}y)|iiK}|iM|||i_KWqtiij
o6}|idIt||itidGqXqWx|iND]\}}yF|d4jo|iNiQ|n"|d:jo|iNiR|nWqRtiij
o6}|idIt||itidGqRXqRWWnFt
j
o:}|idItdN||itidGnX|iS||_d[|_Tx$|iD]}
|iTd\|
7_Tqc	Wy|iVWn tWj
otidGnX|ii,dIjodG|i_FntXiY|d]S(`sparses command line arguments, takes cli args:
        sets up self.conf and self.cmds as well as logger objects 
        in base instancet	thresholditfile_objectcCs*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(tevaltoptobjtdesttappendtopttvalue(R3R6R7tparserR4((R
t
repo_optcb]stbasetusages!yum [options] < update | install | info | remove | list |
    clean | provides | search | check-update | groupinstall | 
    groupupdate | grouplist | groupinfo | groupremove |
    makecache | localinstall | erase | upgrade | whatprovides |
    localupdate | resolvedep | shell | deplist >s-ts
--tolerantR4ttoleranttactiont
store_truetdefaultthelpsbe tolerant of errorss-CRt	cacheonlys+run entirely from cache, don't update caches-ctconffiletstores
/etc/yum.confsconfig file locationtmetavars [config file]s-Rt	sleeptimettypetintsmaximum command wait times
 [minutes]s-dt
debuglevelsdebugging output levels [debug level]s-et
errorlevelserror output levels [error level]s-yt	assumeyessanswer yes for all questionss	--versiontversionsshow Yum version and exits
--installroottinstallrootsset install roots[path]s--enablerepotcallbacktstringtreposs3enable one or more repositories (wildcards allowed)s[repo]s
--disablerepos4disable one or more repositories (wildcards allowed)s	--excludetexcludeR5s"exclude package(s) by name or globs	[package]s--obsoletest	obsoletess*enable obsoletes processing during updatess--nopluginst	nopluginssdisable Yum pluginsiR	it/tfntrootsConfig Error: %ssOptions Error: %stmodeis$Cannot make directory for logfile %sisCannot open logfile %stai
t	preprefixtfacilitytidentRi<syum s%s N(s--noplugins(s-cs-ds-es
--installroot(ZtLoggertsyststderrRterrorlogR9tYumOptionParsert	optparsert
add_optionR%R+t_filtercmdlineR	t
ValueErrorR;texitt
parse_argstoptsRLtostaccessRBtR_OKRUt
doConfigSetupRRtConfigErrorteRtconfRHtstdoutR,R0RIRRtpluginst
doPluginSetuptcmdsRKt__version__t
setCmdLinetgeteuidtuidt
yumversiontpathtdirnametlogfiletlogpathtexiststmakedirstOSErrortopentO_WRONLYtO_APPENDtO_CREATtlogfdtfdopentfcntltF_SETFDt	printtimetfilelog_objectt	SysLoggertsyslog_facilityt
syslog_objecttLogContainertfilelogRJRAtcacheREtrandomt	randrangeRQRPtexcludelistR5ROR6trepoexpt
enableRepotdisableRepotsetupProgessCallbackst	cmdstringtargt
parseCommandsRttimetsleep(RR	R6RRRPRERzRRR9RlRyRRRURf((R
tgetOptionsConfigUsB		















$


#
 	












		
cCsP|idd|ii|idd|i|idd|iit|iidjo)t|idjo|ii|_n|i|i_t|idjo*|i	dt
d|itn|id|_
|id|_t|idjo<|iddx)|iD]}|idd	|q,Wn|i
|ijo|itn|iidjo[|i
d
ddd
dddddddddg
jo |i	dt
dtqn|i
d
dd
ddddgjoo|ip^x[|iiD]F}|io6|idjo&t
d}|i	d|tq%q%Wqwn|i
d
dddddgjoKt|idjo1|i	dt
d|i
|itqLni|i
dddgjoDt|idjo*|i	dt
d|itqLn|i
dddd gjoDt|idjo*|i	dt
d!|itqLn|i
djo{t|idjo|i	dt
d"nxh|iD]9}|d#d$d%d&d'd(gjo|itqqWn!|i
d)jot|idjo|idd*qLt|idjoj|idd+|idtii|idp1|i	dt
d,|i|itqqL|i	dt
d-|itn=|i
d.d/d0dd
d1dd2gjon|itd3S(4s{reads self.cmds and parses them out to make sure that the requested 
        base command + argument makes any sense at allisYum Version: %ssCOMMAND: %ssInstallroot: %siisYou need to give some commandsExt Commands:
s   %sRRRRRRRRRt	importkeyRRR s,You need to be root to perform this command.Rs

You have enabled checking of packages via GPG keys. This is a good thing. 
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
    rpm --import public.gpg.key


Alternatively you can specify the url to the key you would like to use
for a repository in the 'gpgkey' option in a repository section and yum 
will install it for you.

For more information contact your distribution or package provider.
R#s(Error: Need to pass a list of pkgs to %sRRRsError: Need an item to matchRs%Error: Need a group or list of groupssHError: clean requires an option: headers, packages, cache, metadata, alltheaderstpackagestmetadataRtdbcachetallR"sNo argument to shellsFilename passed to shell: %ss5File: %s given has argument to shell does not exists.s5Error: more than one file given as argument to shell.Rscheck-updateRRR!N(RR,RmRvRRLtlentcommandsRqR^RR;RtbasecmdtextcmdsRR'RutgpgKeyCheckROtlistEnabledtrepotgpgchecktgpgkeytmsgtcmdRgRwtisfile(Rt
mycommandsRRRR((R
RFs/




7%
"


	




(
cCs|iddt|_|i|it|idjo ti	d|}|inti	d|}|i|i
|ifS(s*do a shell-like interface for yum commandsisSetting up Yum ShelliR:N(RR,tTrueR&t	doTsSetuptdoRpmDBSetupRRR"tYumShelltyumshelltcmdlooptscripttresultt
resultmsgs(RR((R
tdoShells	


cCs	y|iWn.tiij
o}dt|gfSnX|idjoS|iddy|i	SWq	tiij
o}dt|gfSq	Xnt|idjoS|iddy|i
SWq	tiij
o}dt|gfSq	Xn|idjo_d|i_|iddy|i
SWq	tiij
o}dt|gfSq	Xn|id	d
gjoS|iddy|i
SWq	tiij
o}dt|gfSq	Xn9|idd
gjoy|iddd}|id
jo
d}ny|id|SWq	tiij
o}dt|gfSq	Xn|iddgjo8y|i}Wn.tiij
o}dt|gfSq	X|i|id|i|i|id|i|i|id|i|i|id|it|idjo=|idjo-dGHx>|iD]}|i|dq\Wn|i|id|i|i|id|idgfSn\|idjo|iiddd}yI|i}t|idjo#|i|idddd}nWn.tiij
o}dt|gfSq	X|gfSn|idgjoS|idd y|iSWq	tiij
o}dt|gfSq	XnE|id!jod|i_ |i!Sn|id"d#d$d%d&gjo|idd'|i"d(dy|i#WnStii$j
odd)gfSn/tiij
o}dt|gfSnX|id%jo|i%Sq	|id#d"gjoCy|i&SWqtiij
o}dt|gfSqXq	|id$joCy|i'SWqtiij
o}dt|gfSqXq	|id&joCy|i(SWqtiij
o}dt|gfSqXq	nW|id*gjoS|idd+y|i)SWq	tiij
o}dt|gfSq	Xn|id,d-gjoS|idd+y|i*SWq	tiij
o}dt|gfSq	Xn|id.gjoS|idd/y|i+SWq	tiij
o}dt|gfSq	Xn"|id0gjo|idd1|idd2|id3d4|i,yx#|i-i.d5D]}d|_0qWW|i"d(d|i-i1d6d7d8d|i-i1d6d9d8d|i-i1d6d:d8dWn.tiij
o}dt|gfSnXdd;gfSndd<gfSd=S(>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 stageiRisSetting up Install ProcessRsSetting up Update ProcessRsSetting up Upgrade ProcessRRsSetting up Remove ProcessRR s Setting up Local Package Processit
updateonlyRRsInstalled PackagessAvailable PackagessExtra PackagessUpdated PackagessObsoleting PackagesRQsRecently Added Packagesscheck-updatetupdatesRt
outputTypeidR#sFinding dependencies: RRRRRRsSetting up Group ProcessR.s!No Groups on which to run commandRsSearching Packages: RRR!s"Searching Packages for Dependency:Rs*Making cache files for all metadata files.s=This may take a while depending on the speed of this computeris%sRtwithRt
pickleonlyt	filelistst	otherdatasMetadata Cache Createds!command not implemented/not foundN(2RRRRRRltstrRR,tinstallPkgst
updatePkgsRmRQt	erasePkgsRtlocalInstalltreturnPkgListstypltlistPkgst	installedt	availabletextrasRRtobsoletesTuplestobtuptupdatesObsoletesListtrecentRtinsertRR#RtcleanCliR-tdoGroupSetuptGroupsErrortreturnGroupListst
installGroupstremoveGroupstreturnGroupInfoRRt
resolveDepClitpickleRecipeROt	findReposRtmetadata_expiretpopulateSack(RRlRRRRR((R
t
doCommandss
&
 
cCsv|id|ig}t}xX|iiD]G}|i	ddgjo+t
}|i}
|
o|i|
qyq2q2W|o|i
|n|io)|ip|idddSqn|idd|i|}t|idjoud}	|	d	7}	xO|iD]A}
tii||
}x"|D]}|	d
|
|f7}	qCWq Wtii|	n|i|djodSn|iddh}x'dgD]}t |i!|||<qWt"i#d
d}|i|_|`%|i&|i'}d|_'|i*dd|i%i+|d|}~|iddt|djo8d}	x|D]}|	d|7}	qqWtii|	n|idd|`%|i&|i*dd|i%i.|i%i/||_'d}|i!i1djo
d}nt"i#d
|}|i3|_3|i|_|idd|i4d||id|i5dS(sntakes care of package downloading, checking, user confirmation and actually
           RUNNING the transactionitituisExiting on user CommandisDownloading Packages:RsError Downloading Packages:
s	  %s: %s
sRunning Transaction TesttdiskspacechecktoutputtkeepoldRmsFinished Transaction TestsTransaction Check Error: s  %s
sTransaction Test SucceededsRunning TransactiontcbN(6RR,tlistTransactiontdownloadpkgsR%tstuff_to_downloadttsInfot
getMembersttxmbrtts_stateRtpoR5treportDownloadSizet
_promptWantedtuserconfirmtdownloadPkgstproblemsRtkeyst	errstringtkeyRtmisctuniqueterrorsterrorRRtgpgsigcheckttsConftfeaturetgetattrRmRMtRPMInstallCallbackttestcbttstinitActionTst
dsCallbacktdscbR+t
populateTsttestttserrorstdescrtchecktorderRRHRRtrunTransactiontpostTransactionOutput(RRRRRRRRRRRRRRRRRR((R
t
doTransactionws	





		


	
cCs
x|D]}
|i|
\}}|djoqq|djo|id|tii	o!|i
ioti
idn|ii|
i}|i}t}
x|D]}|idd|yti|dd}	Wn7tiij
o%}ti
idt|nXyLtii |	}|d}tii#|i$}|d	}|d
}Wn.t(j
o"}ti
idt|nXtii)|i*||djo!|idd||fqn|idd
||f|i
ip)|i+p|idddSq-n|i,i-tii.|	}|djoti
id|n|iddt/}
qW|
pti
id|i0n|i|
\}}|djo#|iddti
i|qqti
i|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.sRetrieving GPG key from %stlimiti'sGPG key retrieval failed: tkeyidt	timestamptuseridsGPG key parsing failed: s)GPG key at %s (0x%s) is already installedsImporting GPG key 0x%s "%s"sExiting on user commandsKey import failed (code %d)sKey imported successfullysThe GPG keys listed for the "%s" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.s+Import of key(s) didn't help, wrong key(s)?N(1tpkgsRRtsigCheckPkgRterrmsgR,R\tstdintisattyRmRJRRRROtgetRepotrepoidRRtkeyurlsR%t
key_installedtkeyurlt
urlgrabberturlreadtrawkeytgrabbertURLGrabErrorRlRRt
getgpgkeyinfotkeyinfoR
t
keyIdToRPMVertupperthexkeyidRRRctkeyInstalledtread_tsRRtpgpImportPubkeyt
procgpgkeyRtname(RR
RRRRRRlR
RRRRRR R((R
Rsb

	!

"




c(	Cst|i}|p
|i}n|i|i|ii	}|ii}
h}g}|idtdx|D]}tii|o2|ido"|id|g\}	}
q~n|g}t|
|dd\} }}t|djo|d}|idd	|y|i|}&Wn5t!i"i#j
o#}|i%dtd
|qXd|&i&|&i'|&i(|&i)|&i*f}t|
|g\}}}#| i.||i.|nt!i/i0| |}|i2i3}xP|D]H}|i5|jo|idd
|qn|ii6d|i'}g}xy|D]q}|\}%}}'}}t?i*i@|t?i*i@|i*jo|iA|qL|idd|%|fqLqLWt|djoxg|D]}|\}%}}'}}tB|'||f|i&|i(|i)f}|djoI|%|jo(|i*|jo|iA|i5qrq|iA|i5q|djoqq|djoP|i5| jo<|iD|i'pg||i'<n||i'iA|qqqWq|idd|i'|iD|i'pg||i'<n||i'iA|qWq~Wg}x.|iFD] }|i.|iG||qYWt|djo|iddnx2|D]*}!|idd|!i5|iI|!qWt|djo|iddg}xf|D]^\}}}}$}"|idd||||$|"fd|||$|"|f}|iA|q	W|iPd|ddnt|i|joddgfSnddgfS(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 
           downgrade them to the specified versionis!Parsing package install argumentss.rpmtfilelistt	casematchiiis3Checking for virtual provide or file-provide for %ssNo Match for argument: %ss%s:%s-%s-%s.%sis)Package %s is already installed, skippingR%s#Discarding non-comparable pkg %s.%sis;No other %s installed, adding to list for potential installsreduced installs :s   %s.%s %s:%s-%sspotential updates :tuserlisttquietsPackage(s) to installs
Nothing to doN(QRRRtoldcountR(RR-Rtrpmdbt
getPkgListRR(treturnPackagestavailt
toBeInstalledtpassToUpdateR,RRRgRwR{tendswithRtvaltmsglisttarglistt
parsePackagest
exactmatchtmatchedt	unmatchedtreturnPackageByDeptmypkgRRRRlR^tepochR%RKtreleasetarchtemtchtmtchtunmtchtextendRRtinstallableRmt
exactarchlisttpkgtpkgtuptreturnTupleByKeywordtinstalledByKeyt
comparabletinstTuptn2ta2te2tv2tr2trpmUtilstisMultiLibArchR5t
compareEVRtrcthas_keytpkglistRtbestPackagesFromListRRt
updatelisttnRWtvtrt	pkgstringR((RR(R?RRDRR4R/RZR2R3RCR8R.R>RWR*RRR0RTRBRVRHRGRMRKR7RWRlR%RNRIR6RRYR@RXRJR:RL((R
R4s


#		
(
(*



$
#ic"
Cst|i}|p
|i}n|i|ii}	|i
|ii}|i|ii}|iio|iidd}
ng}
t|djo	xe|
D]]\}
}|i|
}t|ii|d}|ii|||ii||qWxx|D]\}}|iid|}|o,|di!t"jo|i#dd|q|i|}t|ii|d}|ii&||qWng}!xC|D];}t)i*i+|o"|ddjo|!i,|qqWt|!djo@|i-d	|!d
d\}}x|!D]}|i0|q:Wng}x]|D]U\}}|\}}}} }|i7|ii8d|d|d
|d| d|qbWt9i:i;||dd\}}}x-|D]%}|p|iAdd|qqWt9iBiC||}xh|D]`}xW|D]O\}}|iF|jo3t|ii|d}|ii&||q9q9Wq,Wt|i|jo.t|i|}d|}d|gfSnddgfSdS(s[take user commands and populate transaction wrapper with 
           packages to be updatedtnewestiiREis>Not Updating Package that is already obsoleted: %s.%s %s:%s-%sis.rpmR&RR%R=R;tvertrelR's"Could not find update match for %ss(%d packages marked for Update/Obsoletionis(No Packages marked for Update/ObsoletionN(IRRRR*R(RR-R(t
simplePkgListR.RR+R,Rt
doUpdateSetuptuptgetUpdatesTuplesRRmRQtgetObsoletesTuplest
obsoletingtgetPackageObjecttobsoleting_pkgtYumInstalledPackagetreturnHeaderByTuplet
installed_pkgt
addObsoletingtaddObsoletedtnewtoldRttxmbrstoutput_statetTS_OBSOLETEDR,tupdating_pkgtupdated_pkgt	addUpdatetlocalupdatestitemRgRwR{R5RR2R3Rt	updatesPoRWRWRlRXRYRAtsearchNevraRRR5R6R7R8tuserargR)R^RRt
updateMatchesRREtchangeR("RR(R)RlRtRuReR3R8R.RcRYR*RQRRkRRWRmRRRyR7RhRxRlRwRqR6RWRpR2RXRs((R
Rs|




$!$
cCst|i}	|p
|i}n|ig}x0|ii	D]}t|}|i
|qCWt|djo>tii||dd\}
}}tii||
}n|ox|D]}
y|i|
}Wn8tiij
o&}|idtd|qnX|p|idtd|
q|i|qWnx|D]}|i!d|qZWt|i|	jo.t|i|	}d|}d|gfSndd	gfSd
S(sctake user commands and populate a transaction wrapper with packages
           to be erased/removediR'is%ssNo Match for argument: %sRs%d packages marked for removalisNo Packages marked for removalN($RRRR*R(RRRR+t
getHdrListthdrRfRR5RRR5R6R7R8RRterasesRtreturnInstalledPackagesByDept
depmatchesRRRlR^RRARDRRyR(RR(RlR~R{RDR|RRyR*R6R8RRRR7((R
Rs@

$
cCs$t|i}|p
|i}nt|djoddgfSn|ig}g}
g}x|D]
}ytd|id|}Wn2tiij
o }|idd|qjnX|idd|i|f|iid|i}t|djo6|o|idd	|iqj|i|qjnx2|D]*}t|ii|d}|i\}}}}}|i\}}
}}}t)|||f|||f}	|	djoh||i+i,jo;||
jo|
i||fqFq*|i|qFqp|
i||fqFqF|	djo|i|qFqF|	djo|i|qFqFqFWqjWg}t|i+i.djoBt/|t0d
|
|i+i.dd\}}}||}nxm|D]e}||jo|id
d|qn|idd|i|i4i||i5d|qWx||
D]t\}}||jo|id
d|qPn|idd|i|f|i4i||ii7||qPWx%|D]}|idd|iqWt|i|joddgfSnddgfS(slhandles installs/updates of rpms provided on the filesystem in a 
           local dir (ie: not from a repo)isNo Packages ProvidedRtfilenamesCannot open file: %s. Skipping.isExamining %s: %sR%sRPackage %s not installed, cannot update it. Run yum install to install it instead.cCs|dS(Ni(tx(R((R
t<lambda>usR'iisExcluding %ssMarking %s to be installedRsMarking %s as an update to %ss&%s: does not update installed package.sPackage(s) to installs
Nothing to doN(8RRRR*R&RRtinstallpkgst
updatepkgst
donothingpkgsRDtYumLocalPackageR"RRRt	MiscErrorRlR^R,t	localpathR+RFR%RGRR5RIRfRgRhRERWRWRXRYRJRKRLRMRNRQRRRmRCttoexcRPR5tmapR6R7R8t
localPackagesRtoldpoRr(RR&RRR6RDRR8R*RRRR7RRKRWRRGRMRLRhRRlRNRWRYRXRJRI((R
R2s


!








csdddddddg}d}tidjo.id|joiid}qenid	|}d
}||i	i|_	||i
i|_
||ii|_||ii|_||i
i|_
||ii|_|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
           RRRRRRRQit	pkgnarrowcstt|djoYt|djoFiddtii||\}}}tii||Sn|SdS(Niis/Matching packages for package list to user args(
RtlstR	RR,RRR5R6R7R8RR(RR	R6R8R7(R(R
t_shrinklists
&N(tspecialRRRRtpoptdoPackageListsRRRRRRRRQ(RRRRR((RR
Rs	cCs|p
|i}nddddddg}|i||}d}x.|D]&\}}|i	|||d7}qKW|djodd	gfSndgfS(sgcli wrapper method for module search function, searches simple
           text tags in a package objectR%tsummarytdescriptiontpackagertgroupturliisNo Matches foundN(
R	RRt
searchlisttsearchGeneratortmatchingttotalRt
matched_valuet
matchcallback(RR	RRRRR((R
Rs

cCs:|p
|i}n|i|}|i|dgfS(sxcli wrapper method for findDeps method takes a list of packages and 
       returns a formatted deplist for that packageiN(R	RRtfindDepstresultst
depListOutput(RR	R((R
R#s

cCs`|p
|i}n|i|d|i}t|idjoddgfSndgfS(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 
           moduleRMisNo Matches foundN(R	RRtsearchPackageProvidesRRRR(RR	R((R
Rs
cCs|p
|i}nx|D]}y|i|}Wn5tiij
o#}|i
dtd|qXd|i|i
|i|i|if}|id|qWdgfS(sBreturns a package (one per user arg) that provide the supplied argisNo Package Found for %ss%s:%s-%s-%s.%sN(R	RRRR9RDRRRRlR^RR;R%RKR<R=RR,(RR	RlRDRR((R
Rs
(cCs|djo
|i}nd}
}}}}g}}
}}}d|ijo|idd|i\}}|i\}
}
|i\}}|i\}}|i\}}|
||||}|
||||}	x|	D]}|id|qW|gfSnd|ijo&|idd|i\}
}
nd|ijo&|idd|i\}}nd	|ijo&|idd
|i\}}nd|ijo&|idd|i\}}nd
|ijo&|idd|i\}}n|
||||}|
||||}	x|	D]}|id|q\W|gfS(NiRisCleaning up EverythingRsCleaning up HeadersRsCleaning up PackagesRsCleaning up xml metadataRsCleaning up pickled cacheRsCleaning up database cache(R(R+RRthdrcodetpkgcodetxmlcodetpiklcodetdbcodet
pkgresultst
hdrresultst
xmlresultstpiklresultst	dbresultsR,t
cleanPackagestcleanHeaderst
cleanMetadatatcleanSqlitetcleanPicklestcodeRR(RR(RRRRRRRRRRRRR((R
RsL

cCsd}|djo
|i}nt|djo|ddjo
d}qRn|id|\}}t|djo<|i	ddx)|D]}|i	dd|iqWnt|djo<|i	ddx)|D]}|i	dd|iqWndd	gfS(
NiithiddentuservisibleisInstalled Groups:s   %ssAvailable Groups:tDone(RR(R+RRRtdoGroupListsRRR,RR%(RR(RRRR((R
R0s$

cCss|djo
|i}nxL|D]D}|ii|}|o|i|q!|i	dd|q!WdgfS(s0returns complete information on a list of groupsis!Warning: Group %s does not exist.iN(
R(R+RRtstrngtcompstreturn_groupRtdisplayPkgsInGroupsR^(RR(RR((R
RIs

cCs|ig}|djo
|i}nx|D]}|ii|}|p!|i
dtd|q1ny|i|i
}Wn8tiij
o&}|i
dtd|q1q1X|i|q1W|pddgfSnddt|gfSdS(s2for each group requested do 'selectGroup' on them.is!Warning: Group %s does not exist.sANo packages in any requested group available to install or updateis%d Package(s) to InstallN(RR-t	pkgs_usedRR+Rtgroup_stringRRRR^RtselectGrouptgroupidRmRRRRlRAR(RRRRRmRRl((R
RWs(


cCsg}|djo
|i}ng}xc|D][}y|i|}Wn2t	i
ij
o }|i
dd|q-q-X|i|q-W|pddgfSnddt|gfSdS(s;Remove only packages of the named group(s). Do not recurse.isNo group named %s existss!No packages to remove from groupsis%d Package(s) to removeN(RRR+RRt
erasesbygroupRtgroupRemoveRmRRRRlR^RAR(RRRRlRmRR((R
Rss 

cCs}|iiotSn|iiotSnxL|iiD];}|i	p#|i
djp|i|ijotSq:q:WtS(NRl(
RRmRJR%talwayspromptRRRRtisDepRR%R(RR((R
Rs

-cCs.|ipH|iinH|iidS(s%Print out command line usage
        N(RR&R`t
print_helptprint_usage(R((R
R;s
(RRt__doc__RR+R-RRRRRRRRRRRRR#RRRRRRRRR;(((R
R
2s2		p			^	_~U+c	0*	R_cBs tZdZdZdZRS(s\Subclass that makes some minor tweaks to make OptionParser do things the
    "yum way".
    cKsti||||_dS(N(tOptionParserRRtkwargsR:(RR:R((R
RscCs2|i|iidd|tiddS(sHThis method is overridden so that error output goes to errorlog
        isCommand line error: iN(RRR:R^RR\Rd(RR((R
Rs
(RRRRR(((R
R_s	cCsTg}t|}x;t|djo'|id}d|jo:|idd\}}||jo|i
|qKq||jo|i
|q||jo]t|djo
tn|id}|ido
tn|i||gqxB|D]:}t|djo!|i|o|i
|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.
    it=it-iN(toutRR	RRRWtsplitR6RtvaloptsR5t	novaloptsRctnextt
startswithRA(RRR	RWR6RRR((R
Rbs0






#(*Rgtos.pathR\RRRtfnmatchtretoptparseRRR"Rt
yum.constantst
yum.Errorstyum.misct
rpmUtils.archROtrpmUtils.miscutilsRQtyum.packagesR5RfRt
yum.loggerR[RRtpgpmsgti18nRRMRturlgrabber.grabberRRRR$t	YumOutputR
R_Rb(RQRR_RR[RfRRR
RRR"RR5R\RRRRMRRRRRORbRgR((R
t?s@								
						


			

Anon7 - 2021