MINI MINI MANI MO

Path : /usr/lib/python2.7/site-packages/yum/
File Upload :
Current File : //usr/lib/python2.7/site-packages/yum/__init__.pyc


[c@s(dZddlZddlZddlZddlZdZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
ZddlZddlZddlZddlZejjadZejjadZddlZddlmZmZddlZddlZddlZddlm Z m!Z!m"Z"m#Z#ddl$m%Z%ddl&Zddl'Z'ddl(Z(dd	l)m*Z*ddl+Z+dd
l,m-Z-m.Z.ddl/Z/ddl0Z0ddl1m2Z2m3Z3ddl4m5Z5dd
l6m7Z7m8Z8m9Z9ddl:Z:ddl;Z;ddl<Z<ddl=Z=ddl>Z>ddl?Zddl@Zddl@mAZAmBZBddlCZddlDZDddlEZEeEjFdejGddlHmIZImJZJddlHmKZKmLZLmMZMddlHmNZNmOZOddlPTddlQmRZRmSZSddlmTZTmUZUmVZVddlWmXZXmYZYddlZZZddl[m\Z[ddl1m]Z]dZ^e_ge^j`dD]Zaebea^qZce]jdjede^7_edd$dYZfdd%dYZgd d&d!YZhd"e:jifd#YZjdS('s
The Yum RPM software updater.
iNcCsXttdsdSy6tgtjD]}t|^q#}||kSWndSXdS(s Check if rpm is at least the current vertup. Can return False/True/None
        as rpm hasn't had version info for a long time. t__version_info__N(thasattrtrpmtNonettupleRtint(tvertuptnumtvi((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_rpm_ver_atleasts(cOs
t||S(N(t_wrap_yum_i18n__(targstkwargs((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_5scOs
t||S(N(t_wrap_yum_i18n_P_(RR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytP_8s(tParsingErrortConfigParser(tarchDifferencetcanCoinstalltArchStoragetisMultiLibArch(t
compareEVR(tRepoStorage(tConfigPreProcessort
varReplace(t
URLGrabbertURLGrabError(t
format_number(tpackagesNewestByNametpackagesNewestByNameArchtListPackageSack(tLibLVMErrort
lvmerr2strtignore(t
parsePackagestcomparePoEVR(tYumAvailablePackagetYumLocalPackagetYumInstalledPackage(t
YumUrlPackagetYumNotFoundPackage(t*(tRPMTransactiontSimpleCliCallBack(t
to_unicodetto_strt
exception2msg(t	DeltaInfotDeltaPackage(tproxy(tdefault_grabbers3.4.3t.s yum/t_YumPreBaseConfcBseZdZdZRS(sDThis is the configuration interface for the :class:`YumBase`
    configuration.  To change configuration settings such as whether
    plugins are on or off, or the value of debuglevel, change the
    values here. Later, when :func:`YumBase.conf` is first called, all
    of the options will be automatically configured.
    cCsd|_d|_t|_tjf|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dS(Ns/etc/yum/yum.conft/(tfntroottTruetinit_pluginstpluginst	TYPE_COREtplugin_typesRt	optparsert
debuglevelt
errorleveltdisabled_pluginstenabled_pluginstsyslog_identtsyslog_facilityt
syslog_devicetarcht
releasevertuuid(tself((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt__init__zs													(t__name__t
__module__t__doc__RJ(((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR5sst_YumPreRepoConfcBseZdZdZRS(s#This is the configuration interface for the repos configuration
    configuration.  To change configuration settings such what
    callbacks are used, change the values here. Later, when
    :func:`YumBase.repos` is first called, all of the options will be
    automatically configured.
    cCs^d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS(N(Rtprogressbartmulti_progressbartcallbacktfailure_callbacktinterrupt_callbacktconfirm_functgpg_import_functgpgca_import_functcachedirtcache(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRJs									(RKRLRMRJ(((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRNst_YumCostExcludecBs eZdZdZdZRS(sW This excludes packages that are in repos. of lower cost than the passed
        repo. cCs"t||_t||_dS(N(tweakreftrepot_repos(RIR[trepos((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRJscCsMxF|jjD]5}|j|jjkr/Pn||jjkrtSqWtS(N(R\tlistEnabledtcostR[tsackt_pkgtup2pkgsR9tFalse(RItpkgtupR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt__contains__s(RKRLRMRJRd(((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRYs	tYumBasec	BsP	eZdZdZdZdZdZddZddee	j
feeed	Zd
Z
eeddZd
ZeedZdZdZdZeeeeeedZdZdZdZdZedZeedZdZeedZeedZdZdZ dZ!dZ"d Z#d!Z$d"Z%d#Z&d$Z'd%Z(d&Z)e*d'd(d)d*d+d,d-d.Z+e*d'd/d)d0d+d1d-d2Z,e*d'd3d)d4d+d5d-d6Z-e*d'd7d)d8d+d9d-d:Z.e*d'd;d)d<d+d=d-d>Z/e*d'd?d+d@d-dAZ0e*d'dBd)dCd+dDd-dEZ1e*d'dFd)dGd+dHd-dIZ2e*d'dJd)dKd+dLd-dMZ3e*d'dNd)dOd+dPd-dQZ4e*d'dRd)dSd+dTd-dUZ5e*d'dVd)dWd+dXd-dYZ6e*d'dZd)d[d+d\d-d]Z7d^Z8d_Z9ed`Z:edaZ;dbZ<dcZ=ieddZ>iedeZ?dfZ@dgZAdhZBdiZCdjZDdkZEdlZFdmZGdnZHdoZIeeeegdpZJdqZKeedrZLdsZMedtZNduZOePdvZQedwZReSdxdydzZTeSd{ZUeSd|ZVd}ZWd~ZXeedZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdeeeedZgdZheeeedZidZjedZkeedZldZmdZneedZodeeedZpdZqdZrdZsgeeedZtedZugeedZvedZwedZxdZydZzdZ{dZ|dZ}dZ~edZeeedZdZdZdZedZdZdZdZdZdZdZdZdZdZedZdZedZdZdZdZeeedZedZeedZedZedZedZdZedZeSdZdZeedZdZdZeedZddZeedZeedZedZedZdZeeedZdZdZdZedZedZdZgedZeeeddZdZdZdZeedZdZeeedZdZdZRS(sThis is a primary structure and base class. It houses the
    objects and methods needed to perform most things in yum. It is
    almost an abstract class in that you will need to add your own
    class above it for most real use.
    cCsbtjj|d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_g|_i|_i|_tjd|_tjd|_tjd|_t|_t||_i|_|jg|_d|_ t!|_"t#|_$t%|_&t'|_(g|_)d|_*i|_+dS(Nsyum.YumBasesyum.verbose.YumBasesyum.filelogging.YumBasei(,tdepsolvetDepsolveRJRt_conft_tsInfot_rpmdbt_upt_compst_historyt_igroupst_pkgSackt	_lockfilet_tagst_upinfot_fssnapt
_ts_save_filetskipped_packagest_not_found_at_not_found_itloggingt	getLoggertloggertverbose_loggertfile_loggerRbt_override_sigchecksRR\trepo_setoptstdisablePluginst
localPackagestmediagrabberRRFR5tpreconfRNtprerepoconftsettrun_with_package_namest_cleanupt	exit_codetupdateinfo_filters(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRJsB																		
				cCsy=|j|j|jx|jD]
}|q+WWnBtjk
r}|jjdt|t	||j
fnXdS(NsException %s %s in %s ignored(tcloset
closeRpmDBtdoUnlockRtErrorst	RepoErrorR{tdebugtreprtstrt__del__(RItcbte((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs


cCs[|jdk	r|jjn|jdk	r>|jjn|jrW|jjndS(s#Close the history and repo objects.N(RmRthistoryRRntigroupsR\(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs	cCs
tjS(s/Factory method returning TransactionData object(ttransactioninfotTransactionData(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_transactionDataFactorysicCst|j_||j_dS(s
Do a default setup for all the normal or necessary yum
        components.  This function is really just a shorthand for
        testing purposes.

        :param cache: whether to run in cache only mode, which will
           run only from the system cache
        N(RbRR:tconfRX(RIRX((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoGenericSetupss/etc/yum/yum.confR6cCstjtdtjddt|dr||j_||j_||j_	||j_
||j_||j_||j_
n|jS(sQDeprecated.  Perform configuration setup.

        :param fn: the name of the configuration file to use
        :param root: the root directory to use
        :param init_plugins: whether to initialize plugins before
           running yum
        :param plugin_types: a tuple containing the types to plugins
           to load
        :param optparser: the option parser to use for configuration
        :param debuglevel: the minimum debug logging level to output
           messages from
        :param errorlevel: the minimum error logging level to output
           messages from
        s9doConfigSetup() will go away in a future version of Yum.
t
stackleveliR(twarningstwarnR
RtYumFutureDeprecationWarningRRR7R8R:R=R>R?R@R(RIR7R8R:R=R>R?R@((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
doConfigSetup
sc	KsH|rtjdn|jr&|jStj}|rrx7dD],}||kr?t|j|||q?q?Wn|jj}|jj}|jj}|jj	}|jj
}|jj}	|jj}
|jj
}|jj}|jj}
|jj}|jj}|jj}|jj}|jj}|r?|jj|n|jj}|dkrstjj|rsd}ntj|||}||_|jj|_|r||_n|jrtjj a!tjj"a#n|	dkr|	|_n|
dkr|
|_n|
dkr|
|_n|dkr6||_n|dkrN||_n|d
kr|j%d
krrd}qtjj&d
|j'}n|dkr||_n|j(|j|j|j|j|j|r|j)r|j*|||j+|j,||ntj-||_|jj.}|dkr:|t/j0_.n|jj1dt/j0_2|`x$|j3j4D]}|j5j6|qcW|j)j7d|j3j8|_8tj9|j3_:tjj;d|j3j<|j8j=dd|j8j=ddf|j3_>|j?|j3j:|j3j@|jAjBdtj||j)j7d|jS(s
        Parse and load Yum's configuration files and call hooks initialise
        plugins and logging. Uses self.preconf for pre-configuration,
        configuration. s2Use .preconf instead of passing args to _getConfigR7R8R:R=R>R?R@RARBs/etc/yum/yum.confs
/etc/yum.confR6is/timedhostst
postconfigs%s/repos/%s/%s/tbasearchs	$basearchRGs$releaseversConfig time: %0.3ftinit(	sfnsrootsinit_pluginssplugin_typess	optparsers
debuglevels
errorlevelsdisabled_pluginssenabled_pluginsN(CRRRhttimetsetattrRR7R8R:R=R>R?R@RARBRCRDRERGRFRHt
setup_archt	canonarchtostpathtexiststconfigtreadStartupConfigRt
gaftonmodetyumti18nt
dummy_wrapperR
tdummyP_wrapperRRtinstallroott
_getsysvertdistroverpkgtdoLoggingSetupR;t
doPluginSetupt
pluginpathtpluginconfpathtreadMainConfigtmax_connectionsR3toptsRWt
timedhostsRthistory_record_packagesRtaddtruntyumvartgeteuidtuidtnormpatht
persistdirtgett_repos_persistdirtdoFileLogSetuptlogfileR{R(RIRtconf_sttargR7R8R:R=R>R?R@RARBRCRDRERGRFRHtstartupconftmctpkgname((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_getConfig,s	
!				
"s/dev/logcCstj|||||dS(sPerform logging related setup.

        :param debuglevel: the minimum debug logging level to output
           messages from
        :param errorlevel: the minimum error logging level to output
           messages from
        :param syslog_ident: the ident of the syslog to use
        :param syslog_facility: the name of the syslog facility to use
        :param syslog_device: the syslog device to use
        N(t
logginglevelsR(RIR?R@RCRDRE((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs
cCstj|||jdS(sSet up the logging file.

        :param uid: the user id of the current user
        :param logfile: the name of the file to use for logging
        N(Rt
setFileLogR(RIRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRsc	Cs||dkr"tj|d}nt|d|jj}t}y|j|Wn(tk
r~}t	j
t|nXx|jD]}|d	krqnt
j|}|r|jjd|||j|fqny|j||}	Wn2t	jt	j
fk
r/}|jj|qn"X||	_||	_|jj|	_xt|jD]}
t
j|
s|qantj|	j|
raxp|j|
jD][}t|	|sd}|jj||	j|fnt|	|t |j|
|qWqaqaW|	j|jkrxv|j|	jjD]^}t|	|sid}|jj||	j|fnt|	|t |j|	j|q.Wn|r||	rqn|	j!r7x|	j"|	j#|	j$fD]b}
|
sqntj%|
tj&sd}|	j'r$|jj||	j|
fnt(|	_)qqWny|j*j+|	Wqt	jk
rs}|jj|qXqWdS(
sRead in repositories from a config .repo file.

        :param repofn: a string specifying the path of the .repo file
           to read
        :param repo_age: the last time that the .repo file was
           modified, in seconds since the epoch
        itvarstmaint	installeds!Bad id for repo: %s, byte = %s %ds-Repo %s did not have a %s attr. before setopts2Repo %s forced skip_if_unavailable=True due to: %sN(smains	installed(,RRtstatRRRRtreadfpRRtConfigErrorR/tsectionstmisctvalidate_repoidRztwarningtfindtreadRepoConfigRtrepo_config_agetrepofileRtbase_persistdirtsortedR~tre_globtfnmatchtidtitemsRRtgetattrtssl_check_cert_permissionst	sslcacertt
sslclientcerttsslclientkeytaccesstR_OKtenabledR9tskip_if_unavailableR\R(RItrepofntrepo_agetvalidatet
confpp_objtparserRtsectiontbadtthisrepotitopttmsgR7((s0/usr/lib/python2.7/site-packages/yum/__init__.pytgetReposFromConfigFilesn			 + *			 cCs4|jj}|j|jj|x|jjD]}tjj|jjd|rl|jjd|}ntjj	|}tjj
|r/xttjd|D]{}tj
|tjs|jjtdt|qntj|d}||kr|}n|j|d|qWq/q/WdS(s	Read in repositories from the main yum conf file, and from
        .repo files.  The location of the main yum conf file is given
        by self.conf.config_file_path, and the location of the
        directory of .repo files is given by self.conf.reposdir.
        R6s	%s/*.repos!Skipping unreadable repository %siRN(Rtconfig_file_ageRtconfig_file_pathtreposdirRRRRRtisdirRtglobRRRzRR
RR(RIRRRtthisrepo_age((s0/usr/lib/python2.7/site-packages/yum/__init__.pytgetReposFromConfigs  	cCstj|}y|j|||jWn5tk
r`}td||f}tj|nX|js||_|j	j
td|nt|j|_t|dd|_
|jj|_|jj|jj||_|j|_|S(s
Parse an INI file section for a repository.

        :param parser: :class:`ConfigParser` or similar object to read
           INI file values from
        :param section: INI file section to read
        :return: :class:`yum.yumRepo.YumRepository` instance
        s'Repository %r: Error parsing config: %ss8Repository %r is missing name in configuration, using idt
_old_cachedirt(tyumRepot
YumRepositorytpopulateRt
ValueErrorR
RRtnameRzterrorR-Rtold_base_cache_dirRWtbasecachedirRtupdatetcfgtasynct_async(RIRRR[RR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR9s"			cCstj|_dS(sDisable yum plugins.N(R;tDummyYumPlugins(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRXscCsRt|jtjr*ttdntj||||||||_dS(sInitialise and enable yum plugins.
        Note: _getConfig() will also initialise plugins if instructed
        to. Only call this method directly if not calling _getConfig()
        or calling doConfigSetup(init_plugins=False).

        :param optparser: the :class:`OptionParser` instance to use
           for this run
        :param plugin_types: a sequence specifying the types of plugins to load.
           This should be a sequence containing one or more of the
           yum.plugins.TYPE_...  constants. If None (the default), all plugins
           will be loaded
        :param searchpath: a list of directories to look in for plugins. A
           default will be used if no value is specified
        :param confpath: a list of directories to look in for plugin
           configuration files. A default will be used if no value is
           specified
        :param disabled_plugins: a list of plugins to be disabled    
        :param enabled_plugins: a list plugins to be enabled
        splugins already initialisedN(t
isinstanceR;t
YumPluginstRuntimeErrorR
(RIR>R=t
searchpathtconfpathRARB((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR]scCs)tjtdtjdd|jS(s%Deprecated.  Set up the rpm database.s8doRpmDBSetup() will go away in a future version of Yum.
Ri(RRR
RRt	_getRpmDB(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoRpmDBSetupyscCs|jdkrtj}|jjtjtdtj	d|j
jd|j
jdd|j
j
|_|jjdtj|n|jS(s@sets up a holder object for important information from the rpmdbsReading Local RPMDBR8RGRsrpmdb time: %0.3fN(RjRRR{tlogRtDEBUG_4R
trpmsacktRPMDBPackageSackRRRRR(RItrpmdb_st((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs
!cCse|jdk	r+d|j_|jjnd|_d|_d|_d|_d|_d|_dS(s6Closes down the instances of rpmdb that could be open.N(	RjRttstdropCachedDatat_tsRiRktcompsR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs					cCs|`d|_dS(N(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	_deleteTsscCs/tjtdtjdd|j|tS(sDeprecated. Set up the yum repositories.

        :param thisrepo: the repository to set up.  If None, all
           repositories will be set up
        :return: the set up repos
        s7doRepoSetup() will go away in a future version of Yum.
Ri(RRR
RRt	_getReposR9(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoRepoSetupscCst|drm|j|jjdkr`t|dr`t|jj}|jj||_n|jnt|drS|j}|`|jj	|j
|j|j|j_|jj
|j|jj|j|j|j_|j|j_|j|j_|jdk	r+|jj|jn|jdk	rS|jj|jqSn|rtj}|jj||jjdtj|n|jS(sB For each enabled repository set up the basics of the repository. RR6Rsrepo time: %0.3fN(RRRtlenRWRRRR]tsetProgressBarRORPRQtsetFailureCallbackRRtsetInterruptCallbackRSRTRURVRtsetCacheDirRXtsetCacheRR\tdoSetupR{R(RIRR(tirRtrepo_st((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR s6
	
!cCs|`t||_dS(N(R\R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	_delReposscCs5tjtdtjdd|jd|d|S(s4Deprecated. Populate the package sacks with information
        from our repositories.

        :param archlist: a list of the names of archs to include.  If
           None, all arches are set up
        :param thisrepo: the repository to use.  If None, all enabled
           repositories are used
        s7doSackSetup() will go away in a future version of Yum.
RitarchlistR(RRR
RRt	_getSacks(RIR,R((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoSackSetups	cCs|jdk	r"|dkr"|jS|dkr7d}n|jj|}|jjtdtj}|s|jj	}ni}x|D]}d||<qW|jj
j||jjd||jj
s|jj
S|jj
|_|j
|jj||dkr0|jj}nx(|D] }|j||j
|q7W|jjd|jj|j|jjdtj||jS(szpopulates the package sacks for information from our repositories,
           takes optional archlist for archs to includeRsSetting up Package Sacksitwhichtexcludespkgsack time: %0.3fN(RoRR]t	findReposR{RR
RRFR,tgetPackageSacktsetCompatArchstpopulateSacktexcludePackagestexcludeArchsR^tincludePackagesR;RtbuildIndexestcostExcludePackages(RIR,RR]tsack_sttarchdictRFR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR-s:	






cCsod|_x_|jjjD]K}t|dr>|jqtjtdtdt	j
ddqWdS(szreset the package sacks back to zero - making sure to nuke the ones
           in the repo objects, too - where it matterst
_resetSacks2repo object for repo %s lacks a _resetSack method
s%therefore this repo cannot be reset.
RiN(RRoR]tvaluesRR<RRR
RR(RIR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	_delSacks!s	

cCs)tjtdtjdd|jS(s}Deprecated. Set up the update object in the base class and populate the
        updates, obsoletes, and other lists.
        s9doUpdateSetup() will go away in a future version of Yum.
Ri(RRR
RRt_getUpdates(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
doUpdateSetup2scCs@|jr|jS|jjtdtj}tjj|jj	|j
j	|_|jjdkr}d|j_nt
|dr|jj|j_|`nT|jjrtj}|j
jdt|j_|jjdtj|n|jj|j_|jj|j_|jj|j_|jj|j_|jj|j_|jj|j_tj}|jj|jjdtj||jjrtj}|jj|jjdtj|ntj}|jj |jjd	tj||jjd
tj||jS(snsetups up the update object in the base class and fills out the
           updates, obsoletes and others listssBuilding updates objectiit_up_obs_hacktnewestsup:Obs Init time: %0.3fsup:simple updates time: %0.3fsup:obs time: %0.3fsup:condense time: %0.3fsupdates time: %0.3f(!RkR{RR
RtrpmUtilstupdatestUpdatestrpmdbt
simplePkgListtpkgSackRR?RRAtrawobsoletest	obsoletestreturnObsoletesR9RFRtmyarchtmultilibt_is_multilibR,t	_archlisttcompatarchest_multilib_compat_archest	exactarcht
exactarchlistt	doUpdatestdoObsoletestcondenseUpdates(RItup_sttobs_inittup_pr_sttobs_stt
cond_up_st((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR?;s@	*	!

!
cCs2tjtdtjddd|_|jS(s2Deprecated. Create and populate the groups object.s8doGroupSetup() will go away in a future version of Yum.
RiN(RRR
RRRRt
_getGroups(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoGroupSetupks	cCsK|dkr>|jr>x#|jjD]}t|_q%Wq>n||_dS(N(RR\tsortRbtgroups_addedRl(RItvalR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_setGroupsts
	c
Cs|jr|jStj}|jjtjtdg}|jx|jj	D]w}|j
rw|j|qUn|jst
jd|ny|j}Wnt
jk
r}qUX|j|qUW|jj}tjd||_|jjdkr|jjd7_xI|jjD];}tj}||_|_t|_|jj|q"WxL|jjD];}	tj }
|	|
_|
_!t|
_|jj"|
qnWnx|D]}|j
rqn|jjtjtd||j#}|s#td|}|j$j%|qny|jj&|WnKt
j't
j(fk
r}td|t)|f}|j$j%|qXt|_
qW|jjd	krt
j'td
n|jjdkr|jj*|j+j,n|jj-dtj||jS(screate the groups object that will store the comps metadata
           finds the repos with groups, gets their comps data and merge it
           into the group objectsGetting group metadatasRepository '%s' not yet setuptoverwrite_groupstobjectsis%Adding group file from repository: %ss0Failed to retrieve group file for repository: %ss1Failed to add groups file for repository: %s - %sis%No Groups Available in any repositorysgroup time: %0.3f(.RlRR{RRRR
RHR]tlistGroupsEnabledR_tappendtreadyRRtgetGroupLocationtRepoMDErrorRRbRtCompst
group_commandt
compscountRtgroupstGroupRtgroupidR9t_weakt	add_grouptenvironmentstEnvironmentt
environmentidtadd_environmentt	getGroupsRztcriticalRtGroupsErrortCompsExceptionR/tcompileRFRGR(
RItgroup_sttreposWithGroupsR[tgroupremoteRt	overwritetgidtgrptevgidtenvt	groupfileR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR\sl	
	
		
	
cCsWtj}|jjtjtd|jdkr2tj	j
|_x|jjD]}d|j
jkrzqYn|jjtjtd|yD|jd}tj|dd|j}|jj|j|WqYtjtjfk
r*}td|t|f}|jj|qYXqYWn|jjdtj||jS(	sT create the tags object used to search/report from the pkgtags 
            metadatasGetting pkgtags metadatatpkgtagssAdding tags from repository: %sspkgtags.sqlitetcacheds.Failed to add Pkg Tags for repository: %s - %sstags time: %0.3fN(RR{RRRR
RqRRt	pkgtag_dbtPackageTagsR]R^trepoXMLt	fileTypest
retrieveMDRtrepo_gen_decompressRXRRRRtPkgTagsErrorR/RzRvR(RIttag_stR[ttag_mdt
tag_sqliteRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_getTagss*
	cCsLtj}|jjtjtd|jd
kr'tj	d}tj	d}t
jd|d||_|jx|j
jD]}d|jjkrqn|jjtjtd|y|jj|Wqtjk
r}td|t|f}|jj|qXqWn|jjd	tj||jS(sX create the Update Info object used to search/report the updateinfo
            metadatasGetting updateinfo metadatas
yum.update_mdsyum.verbose.update_mdRztvloggert
updateinfos&Adding Update Info from repository: %ss1Failed to add Update Info for repository: %s - %ssupdateinfo time: %0.3fN(RR{RRRR
RrRRxRyt	update_mdtUpdateMetadataRHR]R^RRRRRhR/RzRvR(RItupi_stRzRR[RR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_getUpdateinfos,
cCs]|jdkrV|jjd}tjjd|jjd|d|jjd|_n|jS(seauto create the history object that to access/append the transaction
           history information. s/historyR8tdb_pathRGN(	RmRRRRRt
YumHistoryRR(RItpdb_path((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_getHistoryscCsR|jdkrK|jj}tjjd|jjd|d|j|_n|jS(s: create the fssnap object used to query/create snapshots. R8tdevicesRzN(	RsRRtfssnap_devicesRtfssnapshotst_FSSnapRR|(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_getFSsnapscCsA|jdkr:|jjd}tjjd||_n|jS(skauto create the installed groups object that to access/change the
           installed groups information. s/groupsRN(RnRRRRRtInstalledGroups(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_getIGroups&stfgetcCs
|jS(N(R (RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt<lambda>/stfsetcCst|d|S(NR\(R(RItvalue((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR0stfdelcCs
|jS(N(R+(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR1stdocs0Repo Storage object - object of yum repositoriescCs
|jS(N(R-(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR3scCst|d|S(NRo(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR4scCs
|jS(N(R>(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR5ss3Package sack object - object of yum package objectscCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR7scCst|d|S(NRh(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR8scCst|ddS(NRh(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR9ssYum Config ObjectcCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR;scCst|d|S(NRj(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR<scCst|ddS(NRj(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR=ssRpmSack objectcCs
|jS(N(t
_getTsInfo(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR?scCs
|j|S(N(t
_setTsInfo(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR@scCs
|jS(N(t
_delTsInfo(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRAss"Transaction Set information objectcCs
|jS(N(t_getActionTs(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRCscCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRDssTransactionSet objectcCs
|jS(N(R?(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRFscCst|d|S(NRk(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRGscCst|ddS(NRk(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRHssUpdates ObjectcCs
|jS(N(R\(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRJscCs
|j|S(N(Ra(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRKscCst|ddS(NRl(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRLssYum Component/groups objectcCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRNscCst|d|S(NRm(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyROscCst|ddS(NRm(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRPssYum History ObjectcCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRSscCst|d|S(NRn(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRTscCst|ddS(NRn(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRUssYum Installed Groups ObjectcCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRXscCst|d|S(NRq(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRYscCst|ddS(NRq(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRZssYum Package Tags ObjectcCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR]scCst|d|S(NRr(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR^scCst|ddS(NRr(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR_ssYum Update Info ObjectcCs
|jS(N(R(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRbscCst|d|S(NRs(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRcscCst|ddS(NRs(RR(RI((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRdssYum FS snapshot ObjectcCst}|jrixW|jjD]C}||jjkr\d|jj|krSqqbt}qt}qWn|rtd}|jj	t
j||jjddndS(sConvenience function to populate the repositories with the
        filelist metadata, and emit a log message only if new
        information is actually populated.
        t	filelistss)Importing additional filelist informationtmdtypeN(
RbRHR]R^R`taddedR9R
R{RRtINFO_2R4(RIt	necessaryR[R((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoSackFilelistPopulategs		
cCsy|jjddrdSd	\}}t|drX|jjd|jjd}}n|td|j|dS(
sOutput a message that the given tool requires the yum-utils
        package, if it not installed.

        :param func: the function to output the message
        :param prog: the name of the tool that requires yum-utils
        Rs	yum-utilsNRttermtboldtnormals1The program %s is found in the yum-utils package.(RR(RFtcontainsRRtMODER
t	_try_bold(RItfunctprogthibegthiend((s0/usr/lib/python2.7/site-packages/yum/__init__.pytyumUtilsMsgs$cCst|_|ritjd|jjritd}|jj||j	|jjdt
jdn|jj
dt
j
}|j\}}|j|jjr|jjtjtd|jnd}|dkr|jjrtj|jj}nd|j_|j||\}}|jj
dd	|d
||jjr|j|dk\}}|j||dt\}}n|jjdk	r|jj j!n|dk|_g}|dkr
|jj"r
|j#j$r
|jj%dt&}ni}xe|D]]}	|j'|	j(r8qn|	j)|kr`|	j(g||	j)<qn||	j)j*|	j(qWg}
g}x|D]}t+||dkrxO|jj,|gD]5}
|jj%|
j-t.rqn||j*|
qWn||d
}xx||dD]h}|j/|r4qntd}|sjtdi|d6}||}n|j*|||fqWqW|rd}t|_|}nt0t1g}g}|dkr|jjrt2|jj}|jj%d|}ni}x|D]}	|dk	r,|	j-|kr,n:|dk	rQ|	j)|d
krQqn|	j)|krfqn|	j)|krg||	j)<n||	j)j*|	j-qWx|jj,|j3D]w}|dk	r|j)|d
kr|||d
krqn|j)|kr
qn|j-||j)kr||j)=qqWx|j3D]}|dk	r}||d
kr}|||d
kr}qAnxj|jj4d|D]S}	|	j)|krqn|	j-||j)krqn|	j5t&kr||j)=qqWqAW|r:d}g}x+t6|D]}|j*td|q
Wt|_n|dkrh|jj7rh|j8dt9qhnt:j;|jj<krxT|jj=D]@}|j>dkr|j'|j(r|j?|j(rPqqqWn|jj@dt
j
|||fS(s'Go through the packages in the transaction set, find them
        in the packageSack or rpmdb, and pack up the transaction set
        accordingly.

        :param unfinished_transactions_check: whether to check for
           unfinished transactions before building the new transaction
        t
yumlibpaths/There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).syum-complete-transactionit
preresolves*--> Finding unneeded leftover dependenciesitpostresolvetrescodetrestringit
clear_skippedis%Protected multilib versions: %s != %ss Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:

  1. You have an upgrade for %(name)s which is missing some
     dependency that another package requires. Yum is trying to
     solve this by installing an older version of %(name)s of the
     different architecture. If you exclude the bad architecture
     yum will tell you what the root cause is (which package
     requires what). You can try redoing the upgrade with
     --exclude %(name)s.otherarch ... this should give you an error
     message showing the root cause of the problem.

  2. You have multiple architectures of %(name)s installed, but
     yum can only see an upgrade for one of those architectures.
     If you don't want/need both architectures anymore then you
     can remove the one with the missing update and everything
     will work.

  3. You have duplicate versions of %(name)s installed already.
     You can use "yum check" to get yum show these errors.

...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).

Rs)Trying to remove "%s", which is protectedtautoRsDepsolve time: %0.3fN(ARbt_depsolving_failedRtfind_unfinished_transactionsRRR
RzRvRRtsleepR;RtresolveDepst_limit_installonly_pkgstclean_requirements_on_removeR{RRRt_remove_old_depsRtprotected_packagestget_running_kernel_pkgtupRFt
readOnlyTSRt
_doSkipBrokenttsInfotchangedRoRHRtprotected_multilibRFRMtgetMembersWithStatetTS_INSTALL_STATEStallowedMultipleInstallstpoRReR"tsearchNamesRctTS_REMOVE_STATEStverEQtTS_OBSOLETEDtTS_ERASERtkeyst
matchNaevrtoutput_stateRt
autosavetstsave_tsR9RtRPMPROB_FILTER_OLDPACKAGEtprobFilterFlagst
getMemberstts_statet_enable_oldpackage_flagR(RItunfinished_transactions_checkRtds_stRRtkern_pkgtupttxmbrstversttxmbrtfinet	xrestringRtpkgtfirsttothertbigmsgtprotect_statest	protectedtbad_togotipkgtm((s0/usr/lib/python2.7/site-packages/yum/__init__.pytbuildTransactions
	

!$

	
		
!cCs|jjry|dkry|r*g|_ntj}|j||\}}|j|jjdtj|n||fS(s! do skip broken if it is enabled isSkip-Broken time: %0.3f(Rtskip_brokenRuRt_skipPackagesWithProblemst_printTransactionR{R(RIRRRtsb_st((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRYs
!csfd}fdd}t}t|}d}xtjdkr|dkr|d7}jjd_jjd||dkrjjdPnj	j
}tj}	t}
xRjD]G\}}}
jj|j
s.||||
q||||
qWxc|
D][}j|}xC|D];}|j||kre|jdkre|qeqeWqIW|
s|d7}|d	krPqjjd
jjdtnjtdt\}}tj}|	|tkrk|d7}|d	krEPqqjjd
jjdtnd}|dkrKjjdjjdtjjj\}}qKqKW|dkr{jjd|jjtdg|D]}|^q	}|jx@|D]8}tdt||jjf}jj|q,Wjj|njjdd|fS||fS(s= Remove the packages with depsolve errors and depsolve again cs+|s
dSj||||dS(N(t_getPackagesToRemove(RtdepTreettoRemove(t_remove_from_sackRI(s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_removekscsj|}xw|D]o}|jdkr|krjjdt|jj|jj|jj	|qqWdS(NRs.SKIPBROKEN: removing %s from pkgSack & updates(
t_getPackagesToRemoveAllArchtrepoidR{RRRHt
delPackagetupRcR(RtpkgsR(tremoved_from_sackRI(s0/usr/lib/python2.7/site-packages/yum/__init__.pyRrs
iis1SKIPBROKEN: ########### Round %i ################isSKIPBROKEN: Too many loops RisESKIPBROKEN: resetting already resolved packages (no packages to skip)thardtskipping_brokensISKIPBROKEN: resetting already resolved packages (transaction not changed)s0SKIPBROKEN: sanity check the current transactionsSKIPBROKEN: took %i rounds s1
Packages skipped because of dependency problems:s    %s from %ss$Skip-broken could not solve problemsN(RR"tpo_with_problemsRFttransactionResetRtinstalledFileRequiresR{RRt
_buildDepTreeRRRct_skipFromTransactionRRt
resetResolvedR9Rt_checkMissingObsoletedt_checkUpdatedLeftoverstinfoR
R^RR[RRutextend(RIRRRtcountt
skipped_pot
orig_restringtloopingRtstartTsRRtwpoterrtskippedtskiptendTstptskipped_listR((RRRIs0/usr/lib/python2.7/site-packages/yum/__init__.pyRhs|		$

	
	








"
cCsG|r
dS|d|d|d|d|df}d|krCdS|S(NRRFtepochtversiontrelease(R(RIRt
nevra_dictRc((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_add_not_founds
cCsN|dkr'|r'|j||}n|dkr7dSt||j|<dS(N(RR!R)Rv(RIRR Rc((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_add_not_found_as
cCsN|dkr'|r'|j||}n|dkr7dSt||j|<dS(N(RR!R)Rw(RIRR Rc((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_add_not_found_is
cCsx|jjdttgD]}x^|jD]S}|jj|js,|jj||j	}|j
jd||j	fq,q,Wx\|jD]Q}|jj|js|j
jd|j	|f|jj
|j	jqqWqWdS(s 
        If multiple packages is obsoleting the same package
        then the TS_OBSOLETED can get removed from the transaction
        so we must make sure that they, exist and else create them
        s+SKIPBROKEN: Added missing obsoleted %s (%s)s*SKIPBROKEN: Remove extra obsoleted %s (%s)N(RRRt
TS_OBSOLETINGRRJRRctaddObsoletedRR{Rtobsoleted_bytremove(RIRRtobs((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
s"$cCsx|jjdtgD]e}x\|jD]Q}|jj|js)|jjd|j	|f|jj
|j	jq)q)WqWdS(s 
        If multiple packages is updated the same package
        and this package get removed because of an dep issue
        then make sure that all the TS_UPDATED get removed.
        s(SKIPBROKEN: Remove extra updated %s (%s)N(RRRt
TS_UPDATEDt
updated_byRRcR{RRR'(RIRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs
c
Csg}|jjr|j\}}}}}xd|jjD]F}|||||f}|jj|||||}	|j|	q7Wn
|j||S(s, get all compatible arch packages in pkgSack(RFRMRcR,RHtsearchNevraRRe(
RIRRtntaRtvtrRctmatched((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs
cCsg}|j\}}}}}x|jjD]r}|||||f}|jj|r+xB|jj|D]+}	|	j}
|j|
}|j|qkWq+q+W|S(N(	RcRFR,RRRRt_removePoFromTransactionR(RIRRR,R-RR.R/RcRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR!s	cCsng}|jj|jrj|jjdt||jj|j|jdksj|j|qjn|S(Ns(SKIPBROKEN: removing %s from transactionR(	RRRcR{RRR'RRe(RIRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR1.scCsNi}xA|jD]6}x-|jD]"}|j|gj|jq WqW|S(s& create a dictionary with po and deps (Rt
depends_ont
setdefaultReR(RIRRtdep((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
7s
$cCs@x9|jD]+\}}|GHx|D]}dG|GHq%Wq
WdS(Ns	(t	iteritems(RIttreeRtlR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_printDepTree@s
cCsidt6dt6dt6dt6dt6dt6dt6dt6}|jj	t
jd	t|j
xt|j
D]}d
||j|jf}|jj	t
j|xItt|jD]2\}}d||f}|jj	t
j|qWqqW|jj	t
jdd
ddS(NR
tinstallttrueinstallteraset	obsoletedt
obsoletingt	availabletupdateds/SKIPBROKEN: Current Transaction : %i member(s) sSKIPBROKEN:  %-11s : %s s%SKIPBROKEN:                   %s : %ss
SKIPBROKEN:%si<t=(t	TS_UPDATEt
TS_INSTALLtTS_TRUEINSTALLRRR$tTS_AVAILABLER)R{RRtDEBUG_2R"RRRRRt	relatedto(RItstateRRRtrel((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRFs 

#"cCs|j|x|jj|jD]{}x8|j|jD]&}|j||j|||q:Wx7|jD],\}}|j||j|||qnWq#W|j|||dS(s2
        get the (related) pos to remove.
        N(RRRRcRDRJt_getDepsToRemoveRF(RIRtdeptreeRRRtrelativetrelation((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRZs


cCsx|j|gD]}t}xe|jj|jD]N}|j||jr[t}Pnx%|j|j	D]}|j
|qlWq5W|rqn||krqn|j
||j|||qWdS(N(RRbRRRct	removeDepR2R9RDRJRRI(RIRRJRR4t	more_depsRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRIis
	
cs*dkr|jjn|dkr6ddg}n|dkrctdfd}n|r|tdnt|tgttfkrt|}nt|g}td|D}d}g}|jtdritd	d
6tdd6}	x|jjD]|}
|
j	j
|krFq(n|
jdkrt}x*|
j
D]}|j
|kret}PqeqeW|rq(qn|j|
q(Wn|jtdr/t|jj}
xZ|jj|
D]C}
|
j	j
|krqn|
jj
|krqn|j|
qWn|jtdrxW|jjD]C}
|
j	j
|krrqTn|
jj
|krqTn|j|
qTWn|jtdrx?|jjD]+}
|
j	j
|krqn|j|
qWn|t|xt|D]}
|
qW|S(Ntdependenciest
duplicatessF** Found %d pre-existing rpmdb problem(s), 'yum check' output follows:cs|p|S(N((tproblems(Rtout(s0/usr/lib/python2.7/site-packages/yum/__init__.pyRss&Warning: RPMDB altered outside of yum.css|]}|jVqdS(N(Rc(t.0R((s0/usr/lib/python2.7/site-packages/yum/__init__.pys	<genexpr>sitallsmissing requirestrequiressinstalled conflictt	conflictsR<tprovides(sallRO(sallRP(salls	obsoleted(sallsprovides(RRzRR
ttypeRtintersectionRFtcheck_dependenciesRRctproblemR9RVRbReRtinstallonlypkgstcheck_duplicatest	duplicatetcheck_obsoletedt	obsoletertcheck_providesR"R(RIRRRtchkcmdtheadertignore_pkgstignore_pkgtupstrctprobstprob2uitprobtfoundtrestiopkgs((RRRs0/usr/lib/python2.7/site-packages/yum/__init__.pyt_rpmdb_warn_checks{sl'	c!sqtfd}jjs*jjrjjrtd}jjd-krptj	ddd|qj
j|njjr:jjsjjr:jjr:t}yjj
}Wn5tk
r}j
jt|t}g}nXt|dd	d
t}d}d}g}	xd|D]\}
|d
7}||
dkrn|
d}d
}q8n|jjkr8|	j|
dq8q8Wyjjd|	}Wn5tk
r}j
jt|t}g}nXt|rj
jtdt|q:|r:j
jtdq:njjrrjjtjrrjjrr|njjdx4jjD]#}|j rj!j"dPqqWjj#sjjtjrj$j%}nt&j!}
j'j(d|
}j'j)dtd}j*j+}|d.k	rQ|j-}ng}|d.kso||krj$j.d.t/}g|D]}|j0^q}|d.k	}j1d|d|}nd.}t2drj3rdj4j3}n-t2dr'j5r'dj4j5}nj$j%}j*j6||t&j$j7||j8t2drj9njjdj'j:|j;d.k	rt<j;dj=}j*j>d|yt?j@j;WqtAtBfk
r}qXnd._;jjCrft?jDd}|rfyt?jD|Wqcd}qcXqfnjj|jEd }jjCryt?jD|WqqXntFjG}d|_H|d.krnt|dkrtd!}j
j|d
|_Hnjj#ryjjtjryg|D]}tItJ|^q/}jjd"j*jK|d#d|njLjtd$x"|D]}jLj|dqWtj	dtd%d|jjtjsjMnxvd/D]n}t2||rtN||}ytFjO|WqitAtBfk
re}jLjtd(|qiXqqWjjtjs|jHrj'jPnj'jQt&j$jjd)jjtjs/d.} t2|d*r|jR} njS|| jjTd+kr/jUjVq/njjrmjjtjrmjjrm|d,tn|S(0sOPerform the transaction.

        :param cb: an rpm callback object to use in the transaction
        :return: a :class:`yum.misc.GenericHolder` containing
           information about the results of the transaction
        :raises: :class:`yum.Errors.YumRPMTransError` if there is a
           transaction cannot be completed
        cstd|rdnd}yjjjj}Wn/tk
ri}tdt|}t}nX|s|rjjdkrt	j
ddd	|qjj|nid
gd6}td}y"jj
jjd
|}Wn-tk
r$}|dt|7}g}nX|sr|r_jjdkr_t	j
ddd	|qrjj|nx4|D],\}}jjtd||fqyWdS(s<Create the pre or post trans snapshot if we have free space.s=Not enough space on logical volumes to create %s FS snapshot.s
post transspre.s3Could not determine free space on logical volumes: ssnapshot-failuretanyRsAborting transactionterrorssreason=automaticR*sFailed to create snapshotttagss: s(Created snapshot from %s, results is: %sN(ssnapshot-failuresany(ssnapshot-failuresany(R
tfssnapt	has_spaceRtfssnap_percentageR R!Rbtfssnap_abort_on_errorsRtYumRPMTransErrorR{RvtsnapshotR(tpostRRrRRptsnapstodevtndev(RI(s0/usr/lib/python2.7/site-packages/yum/__init__.pytcreate_snapshots0
"
sSnapshot support not available.sbroken-setupRnRsAborting transaction.RotkeycSs|d|dfS(Ntctimet
origin_dev((tx((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRstreverses<n/a>iiR~tdevRsDeleted %u snapshots.s3Skipping the cleanup of old snapshots due to errorstpretranssyum-metadata-parsertpatternst	main_onlyRRdRt tcmdst_shell_history_writethistorybeginR/tsaved_txRsIWarning: scriptlet or other non-fatal errors occurred during transaction.t
historyendisTransaction couldn't start:sCould not run transaction.t	ts_all_fnt
ts_done_fns$Failed to remove transaction file %st	posttranstverify_txmbrRcRw(sbroken-setupsanyN(RR(WRbRtfssnap_automatic_pretfssnap_automatic_postRqR>R
RtRRuR{Rvtfssnap_automatic_keept
old_snapshotsR RR!R9RRet
del_snapshotsR"RRRtisTsFlagSetRtRPMTRANS_FLAG_TESTR;RR]R^t_xml2sqlite_localRRthistory_recordRtfutureRpmDBVersiontlistRFtreturnPackagest
simpleVersionRtlastRtend_rpmdbversionRRRRmRRtjoinRtbegRut_store_config_in_historyRttransactionResultVersionRttopentreadtwrite_addon_dataRtunlinktIOErrortOSErrort
reset_nicetniceRQRt
GenericHoldertreturn_codeR-R.tendRztcleanUsedHeadersPackagesRtunlink_fRtdropCachedDataPostTransactionRtverifyTransactionRjRtsave(!RIRR{Rtcleanup_failRxRRRttodeltsnapR[tfrpmdbvtusing_pkgs_patst
using_pkgstrpmdbvtlastdbvtrpmdb_problemsRRRdtoutput_warntcmdlinet
savetx_msgtoniceRotresultobjectt	errstringRtherrorsRR7tvTcb((RIs0/usr/lib/python2.7/site-packages/yum/__init__.pytrunTransactions
%
	



#
	


		"%
	

%	csfd}|jj}|s3tjd}n|dkrHd}n'|rodjt|jd}ntj}|jj	dd}x|j
D]}|jtkr|j
jd|js|jjtd	|jt|_|||}qn|||}|j|j}|j}	|	j|j_|j|j_|jjd
|j_xk|jjD]]}
|
d
krqnn|
dkrqnn|
dkrqnnt|jd
|
|jj|
qnW|r||j_nd|jjkrd|j_nd|jjkr&d|j_ nd|jjkrGd|j_!nd|jjkrhd|j_"nt#|dr|j$rdj|j$|j_%n3t#|dr|j&rdj|j&|j_%n|	j'}|d#k	rt)|d|j_*t)|d|j_+nt,|	t-ry[t.j/|	j0}t)t1|j2}
t)t1|j3}|
|j_4||j_5WqqXn|	j6d#k	r|	j6|j_7nt#|	j8dr|	j8j9}|r|j:d#k	rt)|j:|j_4n|rt)|j;|j_5qnt#|dr:|j<|j_<nt=j>}|j?sa|j@sa|jAr|j?rz|j?d}n|j@r|j@d}n|}d|jkr|jjB|j_Bnd|jkr|jj<|j_<n|d#k	r&t)||j_Cq&n!|d#k	r&t)||j_Bn|jjDrH|jEjF|qHqqWx	|j
D]}|jtkrnqV|jtGkr(|j
jd|jr|j
jHd|jdts|jjtd|jt|_|||}qVqn|||}|j
jIjJd|j}|jKqV|||}|jLjMtNjOd|jqVW|jj	d|j
jPdtQd}|jjDr|jRjStjTrd }|d#k	r|jU}n|jj	d!|jEjV||n|j
jW|jLjXd"tj|d#S($sCheck that the transaction did what was expected, and 
        propagate external yumdb information.  Output error messages
        if the transaction did not do what was expected.

        :param resultobject: the :class:`yum.misc.GenericHolder`
           object returned from the :func:`runTransaction` call that
           ran the transaction
        :param txmbr_cb: the callback for the rpm transaction members
        cs*dk	r&|d7}||n|S(Ni(R(RR(ttxmbr_cb(s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_call_txmbr_cbs
s%_install_langsRTRt:tpreverifytransiRs+%s was supposed to be installed but is not!RGRRFtvar_t
nocontextsttruetnodocst	noscriptst
notriggersRRRiRtgroup_membertinstalled_byRct
output_statess)%s was supposed to be removed but is not!sWhat is this? %stpostverifytransRiRsVerifyTransaction time: %0.3fN(YRtoverride_install_langsRtexpandMacroRRtsplitRR;RRRRRFRRRzRvR
t	TS_FAILEDtgetInstalledPackageObjectRcRt
yumdb_infot	from_repotreasonRRGRtts_install_langsttsflagsttsflag_nocontextst
tsflag_nodocsttsflag_noscriptsttsflag_notriggersRRtcommand_lineRtreturnIdSumRRt
checksum_typet
checksum_dataRR&RRtlocalPkgRtst_ctimetst_mtimetfrom_repo_revisiontfrom_repo_timestamptxattr_origin_urlt
origin_urlR[Rtrevisiont	timestampRRtgetloginuidRDt
downgradest	reinstallRt
changed_byRRt
sync_alldbRRtyumdbtget_packagetcleanR{RRRERR9RRRRRRR(RIRRRtoiltvt_stRRRtrpotvartcsumtsttlp_ctimetlp_mtimetmdtloginuidtopot
yumdb_itemRtret((Rs0/usr/lib/python2.7/site-packages/yum/__init__.pyRs	!		%					
!"
c	Csi}x3|jjD]"}|j|jgj|qWt|dkrRdSt}d}g}xwt|D]i}|rxC||D]4}t||j}|j	j
|j|d|qWn|j||t
}qqWdS(sCreate an excluder for repositories with higher costs. For
        example, if repo-A:cost=1 and repo-B:cost=2, this function
        will set up an excluder on repo-B that looks for packages in
        repo-B.
        iNsyum.costexcludessexclude.pkgtup.in(R]R^R3R_ReR"RbRRYR`taddPackageExcluderRRR9(	RItcostsR/tdonetexidtoreposR_R[tyce((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR9Cs  cCsd|jjkrdS|sMd|jjkr2dS|jj}d}d}n8|j|jjkrfdS|j}|j}d|}d}xA|D]9}|d7}d||f}|jj||d	|qWdS(
sRemove packages from packageSacks based on global exclude
        lists, command line excludes and per-repository excludes.

        :param repo: a repo object to use.  If not given, all
           repositories are used
        RTNRsyum.excludepkgssyum.excludepkgs.iis%s.%us
exclude.match(Rtdisable_excludesR0RRtgetExcludePkgListRHR(RIR[texcludelistRtexid_begRtmatchR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR5]s$		


cCsx<t|jdgD]%}|dks7||jkrdSqW|j}t|dkradSd}|jj|j|dd}xD|D]<}|d7}dd	|f}|jj|j|d
|qWd}|jj|j|ddS(
sRemove packages from packageSacks based on list of
        packages to include.  

        :param repo: the repository to use
        tdisable_includesRTNisyum.includepkgs.1smark.washedis%s.%usyum.includepkgs.2s
wash.matchsyum.includepkgs.3sexclude.marked(RRRtgetIncludePkgListR"RHR(RIR[tditincludelistRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR7}s

 cCsK|jjdkrC|jjr"dS|jj}tjj|}n|jj}|d|}tjj|}t	tj
}xtr|j||d}|rPn|j
|}|s|j|qn|tj
krd}Pntd||f}tjd||qW|dkr,dS|dks>t||_dS(sAcquire the yum lock.

        :param lockfile: the file to use for the lock
        :raises: :class:`yum.Errors.LockError`
        iNR6iis4Existing lock %s: another copy is running as pid %s.i(RRRXRWRRtbasenameRRRtgetpidR9t_lockt_get_lockert_unlockR
Rt	LockErrortAssertionErrorRp(RItlockfileR8tmypidRtoldpidR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoLocks4	
cCst|drdS|jjdkr.d}n|dk	rW|jj}|d|}n|jdkrjdS|j}|j|d|_dS(sRelease the yum lock.

        :param lockfile: the lock file to use.  If not given, the file
           that was given as a parameter to the :func:`doLock` call
           that closed the lock is used
        RNiR6(RRRRRRpR(RIRR8((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs		
RicCstjj|}yatjj|s+dStj|tjtjBtjB|}tj||tj	|dSWnct
k
r}|jtjkst
d|t|f}tj|j|t|ndSXdS(Niis Could not create lock at %s: %s i(RRtdirnameRRtO_EXCLtO_CREATtO_WRONLYtwriteRRterrnotEEXISTR
R/RRR(tfilenametcontentstmodetlockdirtfdRterrmsg((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs&
!cCstj|dS(N(RR(R#((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRscCs:yt|d}WnDttfk
rY}td||f}tjtj|nXyt|j	}Wnt
k
rdSXy4td|j	}|jddkrdSWnztk
r5yt
j|dWq6tk
r1}|dtjkrdStd|}tjtj||q6XnX|S(NR/sCould not open lock %s: %ss
/proc/%d/statitZis#Unable to check if PID %s is active(RRRR
RRR!tEPERMRtreadlineRRRRtkilltESRCH(RR'RRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs,

 c	Cs/t}t|tjkr'|j}n||jkrE||_n|jsZt}n3t	|j
j|}|j|jkrt}n|r+t
j|d}t|j}||kr|jjr|j|jjrt
j|qn|r$td|jj}td|q+tSntS(sCheck that the checksum of a remote package matches what we
        expect it to be.  If the checksum of the package file is
        wrong, and the file is also larger than expected, it cannot be
        redeemed, so delete it.

        :param fo: the file object of the package
        :param po: the package object to verify
        :param raiseError: if *raiseError* is 1, and the package
           does not check out, a :class:`URLGrabError will be raised.
           Defaults to 0
        :return: True if the package is verified successfully.
           Otherwise, False will be returned, unless *raiseError* is
           1, in which case a :class:`URLGrabError` will be raised
        :raises: :class:`URLGrabError` if verification fails, and
           *raiseError* is 1
        is\Package does not match intended download. Suggestion: run yum --enablerepo=%s clean metadatai(RbRXttypestInstanceTypeR#Rt	localpathtverifyLocalPkgR9R&RFRRcRRtlongtsizeR[RXt
startswithtpkgdirRR
RR(	RItfoRt
raiseErrortfailedtylptcursizettotsizeR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	verifyPkg	s*		cCslytj||}Wn+tjk
rC}tdtdnX||krhtdtdndS(sVerify that the checksum of the given file matches the
        given checksum.

        :param fo: the file object to verify the checksum of
        :param checksumType: the type of checksum to use
        :parm csum: the checksum to check against
        :return: 0 if the checksums match
        :raises: :class:`URLGrabError` if there is an error performing
           the checksums, or the checksums do not match
        isCould not perform checksumisPackage does not match checksumi(RtchecksumRt	MiscErrorRR
(RIR6tchecksumTypeRtfilesumR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytverifyChecksumO	scsd}ifdjjjjdd|ttjdtg}dfd}g}x[|D]S}t|dr|j	d	krqn||rqnrS|j
|qWt|d}	}
xv|D]n}t|t
r^||r>j|q
n|	|j7}	|
|jj7}
n|j
||j7q
W|	rjjtd
t|
t|	d|	d|
nrtd
rlx|D]}|jjjjsqn|jtjj}ytj|jj|Wqytj|jj|WqeqeXqXqWnjjjj nt!j!}|}
}x4t"r|j#|tt$j%drt|dkrt$j%j&nd}dgttt$j'd}x,|D]$}|d7}|fd}tj(j)|j*}i}|r|j+j,r|fd|d<t"|d<nB|dkodo|jksd|t||f}ny5|j+j-|d|d|d|j+j.dk|Wq&t/j0k
rI}|t1|q&Xq&W|rdt$j'j2nj3j4tt$j%drt$j%j&dnr#x}|D]r}|jj5dsqn|krt6j7|jq|jj8ddd}tj9|j|||_qWnt}x'D]}t|t
s0t"}Pq0q0Ws`|rdPng}dx1D])}|j}|j
||j7qwW|
j:||7}j;jj<tdqW|rr||
||ns$jjdd|dntt$j'd rFt$j'j=nr|r|jjtd!t>j?j@nS("sDownload the packages specified by the given list of
        package objects.

        :param pkglist: a list of package objects specifying the
           packages to download
        :param callback: unused
        :param callback_total: a callback to output messages about the
           download operation
        :return: a dictionary containing errors from the downloading process
        :raises: :class:`URLGrabError`
        cSs|j}|j}|dkr^|dkr^tt|tt|tp]t||S|dkrndS|dkr~dS||krdS||krdSdS(Niii(t
getDiscNumRtcmpRR1(tapotbpoR-tb((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	mediasortp	scsj|gj|dS(N(R3Re(RR(Ro(s0/usr/lib/python2.7/site-packages/yum/__init__.pytadderror	stpredownloadtpkglisttdownloadonlyicsF|j}|kr6jjtd|tSj|rotjj|ro|j	j
|ntjj|rj||trjj
td|tS|j	jr|td|j	jtSnrB|jdtj7_ytj||jWntk
r-nX|j|jntS(Nsignoring a dupe of %ssusing local copy of %ss4package fails checksum but caching is enabled for %ss.%d.tmp(RR{RR
R9RRRRR[t_preload_pkg_from_system_cacheR<RbRRXRR0RtrenameRRtbasepath(Rtlocal(RHt	beenthereRKRI(s0/usr/lib/python2.7/site-packages/yum/__init__.pytverify_local	s0



tpkgtypeROs3Delta RPMs reduced %s of updates to %s (%d%% saved)idgY@Rttext_meter_total_sizeit
parallel_waitcsj||ddc|j7<ttjdrRtjjdnt|trrj|dSj	|j
krj|j
j|\}}|dkrj
jd|qn|j|_|kr|=ndS(NiiRSs%s(R<R3Rt
urlgrabbertprogressRSRR1trebuildtdequeue_maxRRtsigCheckPkgR{RR#R0(tobjRtresultR((t
done_reposRot
local_sizetprestotremote_sizeRI(s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	checkfunc	s"

cs|t|jS(N(R/t	exception(RZR(RH(s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
stfailfuncRs(%s/%s): %sR`ttextRXtnones.tmpR4is9Some delta RPMs failed to download or rebuild. Retrying..tpostdownloadRotreset_curl_objs)exiting because "Download Only" specified(ARRR;RRRRRbRRRReR0RR1RWR3RR{RR
RR0R4RWR"RtlinkRtshutiltcopy2R]RRRR9R^RURVRStgrabberRRtrelativepathR[R
t
getPackagethttp_cachingRRR/RTtdequeue_alltwaittendswithRRtrsplitRMRtclearRRftsystexitR(RIRJRQtcallback_totalRGtremote_pkgsRQRRt	deltasizetrpmsizeRtbeg_downloadtall_remote_pkgstall_remote_sizeRRR`RcRRtrpmfiletfatal((	RHRPR\RKRoR]R^R_RIs0/usr/lib/python2.7/site-packages/yum/__init__.pytdownloadPkgsd	s	
	





(



	
		

!
&





	





cCst|tjkr!|j}nytj|}|d}Wn<tjtfk
r||rutdt	dq}dSnXt
|}|j|jkr|rtddqdSndS(sCheck that the header of the given file object and matches
        the given package.

        :param fo: the file object to check
        :param po: the package object to check
        :param raiseError: if *raiseError* is True, a
           :class:`URLGrabError` will be raised if the header matches
           the package object, or cannot be read from the file.  If
           *raiseError* is False, 0 will be returned in the above
           cases
        :return: 1 if the header matches the package object, and 0 if
           they do not match, and *raiseError* is False
        :raises: :class:`URLGrabError` if *raiseError* is True, and
           the header does not match the package object or cannot be
           read from the file
        iisHeader is not complete.s'Header does not match intended downloadi(RXR.R/R#RtreadHeaderListFromFileRt
IndexErrorRR
R'Rc(RIR6RR7thlistthdrtyip((s0/usr/lib/python2.7/site-packages/yum/__init__.pytverifyHeaderV
sc
Cst|dr"|jdkr"dSi}|j}|jj|j}tjj|ry|j	||dd}Wn t
k
r}tj|qX||_
dSn(|jjrtjtd|j
n|jr|jj|jnyhtjj|jstj|jn|j	|dfif}|j|d|d|jd	k}Wn[tjk
r}|}	ytj|Wntk
r}tj|	qXtj|	nX||_
dSdS(
sDownload a header from a package object.

        :param po: the package object to download the header from
        :raises: :class:`yum.Errors.RepoError` if there are errors
           obtaining the header
        RRRONR7isKHeader not in local cache and caching-only mode enabled. Cannot download %sR`RXRd(RRRtlocalHdrR]tgetRepoRRRRRRRRthdrpathRRXRRR
t
dsCallbacktdownloadHeaderRthdrdirtmakedirst	getHeaderRmR(
RIRRoROR[R[RR`Rtsaved_repo_error((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR}
s@			c
Cs|jrt}d}n\t|drK|jdkrK|jj}d}n)|jj|j}|j	}|j
}|r|jj}t
jj||jd|jj}tjj|j}|dkrd}d}	q|dkr|rd}nd}td|}	q|dkr<d}td	|}	q|d
krv|rWd}nd}d}td|}	q|dkrd}td
|}	qnd}d}	||	fS(sVerify the GPG signature of the given package object.

        :param po: the package object to verify the signature of
        :return: (result, error_string) 
           where result is::

              0 = GPG signature verifies ok or verification is not required.
              1 = GPG verification failed but installation of the right GPG key
                    might help.
              2 = Fatal GPG verification error, give up.
        iRRROtpayloadRiis"Public key for %s is not installedsProblem opening package %sis Public key for %s is not trustedisPackage %s is not signed(R}RbRRRRtlocalpkg_gpgcheckR]RRtgpgchecktgpgkeyRFRRCt	miscutilstcheckSigRtpayload_gpgcheckRRRR
(
RIRtcheckt	hasgpgkeyR[Rt	sigresulttlocalfnR[R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRY
sJ								cCsg}x|jD]}|jjtkr.qn|jjdkrFqn|jj|jjkrdqn|jjjryqn|jj|jj}t}x*|j	D]}|j
drt}PqqW|r|j|jj
gq|jj|j|jj|jj
gqWx|D]}tjj|s<qnytj|Wn/tk
r~}|jjtd|qqX|jjtjtd|qWdS(s`Delete the header and package files used in the
        transaction from the yum cache.
        Rsfile:sCannot remove %ss
%s removedN(RRRGRRR]R[t	keepcacheRbtbaseurlR4R9RRRRRRRRRRRzRR
R{RRR(RItfilelistRR[ROtuR7R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
s<
)
cCsdg}|j|ddS(s+Delete the header files from the yum cache.RRRc(t_cleanFiles(RItexts((s0/usr/lib/python2.7/site-packages/yum/__init__.pytcleanHeaderss	cCsdg}|j|ddS(s,Delete the package files from the yum cache.RR5tpackage(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
cleanPackagess	cCs(dddddg}|j|ddS(s+Delete the sqlite files from the yum cache.tsqlites
sqlite.bz2s	sqlite.gzs	sqlite.xzssqlite-journalRW(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytcleanSqlite#s	cCs.dddddddg}|j|dd	S(
s-Delete the metadata files from the yum cache.sxml.gztxmltcachecookiesmirrorlist.txttascsxml.bz2sxml.xzRWtmetadata(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
cleanMetadata*scCsddg}|j|ddS(soDelete the local data saying when the metadata and mirror
           lists were downloaded for each repository.Rsmirrorlist.txtRWR(R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytcleanExpireCache2scCsP|jjd}tjj|s+g}ntj|dg}|jd|S(s,Delete any cached data from the local rpmdb.s/rpmdb-indexes/RRF(RRRRRRtgetFileListt_cleanFilelist(RIRWR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
cleanRpmDB9s
	cCsw|jjj}x|D]}d||<qWtj|jj|jj}tj|jj|}||jddS(s{Return a glob matching all dirs where yum stores cache files, based
        on cachedir and the given list of dynamic vars.R*s//R6(RRtcopyRRRt_pristine_cachedirtreplace(RItdynvarRtdtinstrootRW((s0/usr/lib/python2.7/site-packages/yum/__init__.pytgetCachedirGlobCs
cCsg}xs|D]k}xb|jjD]Q}t||}tjj|r#tjj|r#tj|||}q#q#Wq
W|j	||S(N(
R]R^RRRRRRRR(RIRtpathattrtfiletypeRtextR[R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRMs
$ cCsd}x|D]x}ytj|Wn2tk
rX}|jjtd||q
q
X|jjtj	td|||d7}q
Wt
dd|||f}d|gfS(NisCannot remove %s file %ss%s file %s removedis%d %s file removeds%d %s files removed(RRRRzRvR
R{RRRR(RIRRtremovedtitemRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRVs
RTc+Cs
|dkr|jj}ntjd|}g}g}g}	g}
g}g}g}
g}g}|}|dkri}i}x|jjd|d|D]x}tj|g|sqn|||j<|rqn|j	|j
f}||ks|j||r|||<qqW|j}|rO|j
jd|d|d|}nm|r|j
j|}|jd|d|}n<y|j
jd|d|}Wntjk
rg}nXx|D]}|r|j|kr|	j|q|j|q|j	|j
f}|j|kr/|	j|q|jj|j	d|j
}|rjt|d||<n||ks|j||r|j|q|
j|qWn|dkrx|jjD]\}}}}}|j
jd	|d|d
|d|d|}tj||}t|d
krf|j|d|jjtjtd|dqt|d
kr|j|dq|jjtjtd|||||qW|r	t||d|\}}} ||}q	n|dkr,|jjd|d|}tj||}n|dkr|rb|j
jd|d|d|}nm|r|j
j|}|jd|d|}n<y|j
jd|d|}Wntjk
rg}nXx|D]}|r|jjd|r|	j|q|j|q|jj|j	d|j
}|rTt|dtd}!n|sj|j|!rz|j|q|j |!r|	j|q|
j|qWn|dkrC|j
j!d|d|}t"|}x|jjd|d|D]@}tj|g|sqn|j|kr|j|qqWny|dkrxj|jjd|d|D]L}tj|g|sqkn|j
j#|j	grqkn|j|qkWn|dkrd
|j_$x|jj%D]\}"}#|"\}}}}}|j
jd	|d|d|d|d
|}$tj|$|}$|j&|#}%t|$d
kr|jjtjtd|$dnt|$d
kr|j|$d|
j|$d|%fqqW|rTt||d|\}}} ||}t"|}&g}'x9|
D]1\}}%||&kr4qn|'j||%fqW|'}
n|s	t'|}t"|}(g}'x9|
D]1\}}%||(krqn|'j||%fqW|'}
q	n|dkr	t(j(})|)|jj)d}*|r	|j
jd|d|d|}nm|rG	|j
j|}|jd|d|}n<y|j
jd|d|}Wntjk
r	g}nXx6|D]+}t*|j+|*kr	|j|q	q	Wn||_,||_-|	|_.|
|_/||_0||_$|
|_1||_)||_2|S(sOReturn a :class:`yum.misc.GenericHolder` containing
        lists of package objects.  The contents of the lists are
        specified in various ways by the arguments.

        :param pkgnarrow: a string specifying which types of packages
           lists to produces, such as updates, installed, available,
           etc.
        :param patterns: a list of names or wildcards specifying
           packages to list
        :param showdups: whether to include duplicate packages in the
           lists
        :param ignore_case: whether to ignore case when searching by
           package names
        :param repoid: repoid that all pkgs will 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
        titerRTRtignore_caseRRFiRDRRtverRHiis,More than one identical match in sack for %ss*Nothing matches %s.%s %s:%s-%s from updatet	casematchRR>RRtextrass
distro-extrasRJtrecentiQN(3RRtshowdupesfromreposRRRFRtfilter_pkgs_repoidRcRRFtverGTR=RHtsackstreturnNewestByNameArchRtPackageSackErrorReR+RRtgetUpdatesListR"R{RRtDEBUG_1R
R#RR9RRGRRRJtgetObsoletesTuplesRRRRRtfiletimeRR>treinstall_availablet
old_availableRDtobsoletesTuplesR(+RIt	pkgnarrowRtshowdupsRRtyghRR>RRRDRJRRRtictdinsttndinstRR|tavailRtipkgsR,R-RR.R/tmatchest
exactmatchR0t	unmatchedtlatestRctinstTupRtinstpotmatched_obsoletestnobsoletesTuplestfilttnowtrecentlimit((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoPackageListsesn




%	 	


	

-	
	


									cCsi}x|D]}i||<|j}|j||}xo|D]g}|\}}}	|jdrkqAng}
x*|j|||	D]}|
j|qW|
||<qAWq
W|S(s;Return the dependencies for a given package object list, as well
        as possible solutions for those dependencies.
           
        :param pkgs: a list of package objects
        :return: the dependencies as a dictionary of dictionaries:
           packageobject = [reqs] = [list of satisfying pkgs]
        srpmlib((RUR^R4twhatProvidesRe(RIRtresultsRtreqst
pkgresultstreqR/tfR.t
satisfiersR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytfindDepsjs

	


c%#sg}x'D]}|jtj||q
Wi}	g}
g}gid}ixX|D]P}
|j|
j|
j|
|
j<j|
||d8}qaWx3|jjjD]}|
j|j	||qWfd}||
|	|rK|j
j	dt}
|j||
|	~
ni}|r|j
}
x|
D]}d}g}g}xv|
|D]j\}}|t|7}|j||j|||krg||<n||j||fqWqmW~
n|	jrxxa|	jD]P}xG|D]?\}}}||krVg||<n||j||fq.Wq!Wni}	x|D]}g}g}x2||D]&\}}|j||j|qWtj|}tj|}t|}||	krg|	|<n|	|j|||fqWtjdd}|rlfdfd}ni}xtt|	D]}d	}x0t|	|dD]} |r| \}!}"}#n| dj| djf|krqn| dj| djf}$|d	ks5|d|$krG||d| rG|$| f}qn|d\}!}"}#|d|$krsd	}n|$| f}|r|!|"|#fVn|!|#fV|sd||!j|!jf<qqW|d	k	r|d\}!}"}#|r|!|"|#fVq|!|#fVqqWd	S(
sYield the packages that match the given search criteria.
        This generator method will lighten memory load for some
        searches, and is the preferred search function to use.

        :param fields: the fields to search
        :param criteria: a list of strings specifying the criteria to
           search for
        :param showdups: whether to yield duplicate packages from
           different repositories
        :param keys: setting *keys* to True will use the search keys
           that matched in the sorting, and return the search keys in
           the results
        :param searchtags: whether to search the package tags
        :param searchrpmdb: whether to search the rmpdb
           
        iic	sx|D]\}}t}g}||kr;g||<nxvD]n}xeD]]}tt||}|rO|jj|dkrO|j||j|qOqOWqBWt|dkr||j|||fqqWdS(Nii(RR-RtlowerRReRR"(	ttmprestsorted_listsRRttmpkeyst	tmpvalueststfieldR(tfieldstrcl2ctreal_crit_lower(s0/usr/lib/python2.7/site-packages/yum/__init__.pytresults2sorted_listss	


!
tloweredcSstS(N(R9(R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
scsMtfd|dDt|ddjt|d|dfS(Nc3s|]}|VqdS(N((RSty(tcritweights(s0/usr/lib/python2.7/site-packages/yum/__init__.pys	<genexpr>
siiti(tsumR"RR(R(R(s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
scs|d |d kS(Ni((RR(t	sort_func(s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
sR|N(Ret
RPM_TO_SQLITERRR3RHRR=Rt"searchPrimaryFieldsMultipleStringsRFR9RtsearchPackageTagsR"Rtuniquetoperatort
itemgettertreversedRRRRF(%RIRtcriteriaRRt
searchtagstsearchrpmdbt
sql_fieldsRRRt	real_critt
critweightRR`Rtresults_by_pkgRRt	matchkeyst
tagresultsRttaglistRtkR.ttotkeysttotvalstduptyieldedR`Rtsl_valsRtkstvstna((RRRRRs0/usr/lib/python2.7/site-packages/yum/__init__.pytsearchGenerators



	





"


	 /	c	Csi}x|D]}|j}|jj|}xu|jD]g\}}|jjd|}|skq>n|d}||krg||<n||j||fq>Wq
W|S(s Search for and return a list packages that have tags
        matching the given criteria.

        :param criteria: a list of strings specifying the criteria to
           search for
        :return: a list of package objects that have tags matching the
           given criteria
        Ri(RRtsearch_tagsRRHR+Re(	RIRRtcRkRR	RR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR=
s	


cCstjtdtjddi}|j||}xT|D]L\}}|r`|||n||kryg||<n||j|q>W|S(sDeprecated.  Search the specified fields for packages that
        match the given criteria, and return a list of the results.

        :param fields: the fields to search
        :param criteria: a list of strings specifying the criteria to
           search for
        :param callback: a function to print out the results as they
           are found.  *callback* should have the form callback(po,
           matched values list)
        sosearchPackages() will go away in a future version of Yum.                      Use searchGenerator() instead. 
Ri(RRR
RRRR(RIRRRQRt	match_genRtmatched_strings((s0/usr/lib/python2.7/site-packages/yum/__init__.pytsearchPackagesU
s	
cCsed}i}xf|D]^}t|}||\}}|sXt}	|j|}
nt}	|jj|}
|jjtj	t
ddt|
t|
xt|
D]}|jjtj
td|g}|	r|j|n|r|r|j|n|r{|r{|jjtj
tdxD|j|j|jD](}
tj|
|rL|j|
qLqLWn|jjtj
tdx|jD]v\}}\}}}tj|||||ff}|	stj||stj||r|j|qqqWt|dkr|rc|rS|rS||||qc|||n|||<qqWqWdd	d
g}d
g}x|D]}||\}}|s5|j|}
t}	x|
D]]}|g}t|dkr|r!|r||||q!|||n|||<qqWqt}	|j}
|rS|}n|}tjtj|}xt|
D]}g}g}xa|D]Y}t||}|dkrqnt|tj kr|j!|q|j|qWx-|D]%}|j"|r|j|qqWt|dkr~|rL|||n|||<q~q~WqW|S(snSearch for and return a list package objects that provide
        the given files or features.

        :param args: a list of strings specifying the files and
           features to search for the packages that provide
        :param callback: a callback function to print out the results
           as they are found
        :param callback_has_matchfor: whether the callback function
           will accept a list of strings to highlight in its output.
           If this is true, *args* will be passed to *callback* so
           that the files or features that were searched for can be
           highlighted
        cSsFtj|s't}|jd}nt}tj|}||fS(NR6(RRRbR4R9tre_filename(Rtisglobt	canBeFile((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	_arg_data
ssSearching %d packagesSearching %d packagesssearching package %sssearching in file entriesssearching in provides entriesiRtdirnamestprovides_namesN(#R-R9treturnPackagesByDepRbRHtsearchProvidesR{RRRRR"RRER
RetdirlistRt	ghostlistRRWRtprco_tuple_to_stringtreturnInstalledPackagesByDepRFtreRyt	translateRRRXR.tListTypeRR(RIRRQtcallback_has_matchforRRRRRt
usedDepStringtwhereRRtthisfiletp_nametp_flagtp_etp_vtp_rtprovR	ttaglist_provonlytarg_taglistt	arg_regext
searchlistttagttagdataR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytsearchPackageProvidesp
s	

"


"!$
	

			

cCs8i}|s|jjdkr#|Si}|j|jjkrW|jj|jj}ntt|}t|dr|j	|j
nx|D]}|jj|g}||kr|rd||<qn|sd||<qnxG|D]5}|j
jdd|jkrqnd||<PqWd||<qW|S(	s Return a dict of
             pkg_name =>
             (installed, available,
             backlisted-installed, blacklisted-available). RctpackagesR>sblacklisted-availableRRRsblacklisted-installed(RRjRnRRlt	pkg_namesRRRR
R9RFRRR(RItgroupRR:t
all_pkg_namestpkg_nameRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_groupInstalledData
s0




cCsi}|s|jjdkr#|Si}|j|jjkr]|jj|j}|j}ntt|}t	|dr|j
|jnx|D]}}|jjj|}||kr|rd||<qn|sd||<qn|j
|jkrd||<qd||<qW|S(s Return a dict of
             grp_name =>
             (installed, available,
             backlisted-installed, blacklisted-available). Rct	allgroupsR>sblacklisted-availableRsblacklisted-installed(RRjRsRRlRqt	grp_namesRRRR
R?Rtenvironment(RItevgroupRR@t
all_grp_namestgrp_nametigrp((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_groupInstalledEnvDatas,



cCs$d}d}|dkr|jj}|jjdkrK|jjj}n|jj}|jjdkr~|jjj}n||||fSg}g}xn|D]f}	|	jdr|j	|	dq|	jdr|j	|	dq|j	|	|j	|	qWdj
|}dj
|}|}
|jj|d|
}|jjdkr|ddj
g|D]}|j^qn}|jj|d|
}n|jj
|d|
}|jjdkr|ddj
g|D]}|j^q}|jj
|d|
}n||||fS(NRcs@^it@it,tcase_sensitive(RRRlRRjRR=RqR4ReRt
return_groupsRntreturn_environmentsRs(RIRRtigrpstievgrpstgrpstevgrpstgpatstepatstpattcsR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_groupReturnGroups:s>

--cCsLg}g}g}g}|jjdkr?tjtdn|j||\}	}
}}|	dk	ri}
x|	D]}||
|j<qvW|
}	n|dk	ri}
x|D]}||
|j<qW|
}nx|
D]}|	dkr|j	}n"|j
|	k}|r|	|j
=n|rN|r>|jrK|j|qKq}|j|q|rp|jr}|j|q}q|j|qWxk|D]c}|dkr|j	}n"|j
|k}|r||j
=n|r|j|q|j|qW|	dkri}	n|dkri}n|	s&t|s3txo|	jD]a}tj}|j|_
t|_	|j
|_x|jD]}d|j|<q}W|j|q@Wx`|jD]R}tj}|j|_
t|_	|j
|_t|j|_|j|qW|r6t|t|t|t|fSt|t|fS(sReturn two lists of groups: installed groups and available
        groups.

        :param uservisible: If True, only groups marked as uservisible
           will be returned. Otherwise, all groups will be returned
        :param patterns: a list of stings.  If given, only groups
           with names that match the patterns will be included in the
           lists.  If not given, all groups will be included
        :param ignore_case: whether to ignore case when determining
           whether group names match the strings in *patterns*
        :param return_evgrps: whether to return environment groups as well as
           package groups
        is3No group data available for configured repositoriesiN(RRkRRwR
RTRR~RRRntuser_visibleReRsRR=RmR9RR:tmandatory_packagesRrRRlt_groupsR(RItuservisibleRRt
return_evgrpsRR>t
einstalledt
eavailableRLRNRMROtdigrpsREtievgrpRt
grp_installedtevgrptevgrp_installedR=((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdoGroupListsbs	
	
	

		

		

		cCsg}|jj|}|s=tjtdt|nx|D]}|j|}t|_|j	}|j
}xv|D]n}||kr||dkrq{n|jd|dt}	|j|	x|	D]}
|
j
j|qWq{W|rD|jj|qDqDW|S(sMark all the packages in the given group to be removed.

        :param grpid: the name of the group containing the packages to
           mark for removal
        :return: a list of transaction members added to the
           transaction set by this function
        sNo Group named %s existsRRtsilence_warnings(RRJRRwR
R-R>R9ttoremoveR9RnR'RRlReRt	del_group(RItgrpidttxmbrs_usedtthesegroupst	thisgrouptigroup_dataRR~RRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytgroupRemoves&
			


c	Cs+|jj|}|s7tjtdt|nx|D]}t|_|j}x|jD]}x|j	D]}|j
j|krp|j
jt
krpy|jj|Wn9tk
r|jjtjtd|j
|qpnXt|jdkr|j	j|j
jqqpqpWq`Wq>WdS(sUnmark any packages in the given group from being removed.

        :param grpid: the name of the group to unmark the packages of
        sNo Group named %s existss%package %s was not marked in group %siN(RRJRRwR
R-RbRcR9RRRRGRRlR'RR{RRRR"Rc(RIReRgRhRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
groupUnremoves$
		$
cCsg}|jj|}|s=tjtdt|nx|D]}|j|}|j}|j}xm|D]e}||kr||dkrqrn|j	|}	|j
|	x|	D]}
|
jj|qWqrW|rD|j
j|qDqDW|S(sMark all the packages in the given group to be removed.

        :param evgrpid: the name of the environment containing the groups to
           mark for removal
        :return: a list of transaction members added to the
           transaction set by this function
        sNo Environment named %s existsR(RRKRRwR
R-RFR?RsRjRRqReRtdel_environment(RItevgrpidRfRgRhRiRNRRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytenvironmentRemoves$
		


cCsg}|jj|}|s=tjtdt|n|jj}|rX|}n|jjdkrst	}nx|D]}	|	j
rqznt|	_
|}
g}d|kr|j|	j
nd|kr|j|	jnd|kr|j|	jn|j|	}d}
|rl|	j|jjkrM|jj|	j}
t}
ql|jj|	j|	j|nx.|D]&}||dkrs|j|qsqsWt|}x|D]}|jjdkr-||kst||ks||jdr-td	}|jjtj|||	jqq-n|jjtjtd
||	j|
dk	r}|
jj |t|j_!ng}y|
r|jjdks|r||dkr|j"d|d
d}ni|r||dkrnP|j#d|d
d}x5|D]-}|	j|_$|
r+|	|_%q|	|_&qWWn/tj'k
rj}|jj(td|qX|j|x!|D]}|jj|	jqWqW|jj)}|dk	r|}nd}|
r|rx|	j*j+D]\}}|j,|ry|j#d|}Wntj'k
r.qn&X||j-j.krTg|j-j.|<n|j|x;|D]3}|jj|	j|j-j.|j|j/qhWqn|j0j1d|}|r|j2j3r9|jj4dkr9g}|j2j5}|jdx-|D]%}|j2|kr|j|qqW|}q9nt6|}|t|7}||j-j.krzg|j-j.|<n|j-j.|j|qqWn|
rzt||krz|j7j8td|	j|r|j7j8td|	j|qqzqzW|S(sMark all the packages in the given group to be installed.

        :param grpid: the name of the group containing the packages to
           mark for installation
        :param group_package_types: a list of the types of groups to
           work with.  This overrides self.conf.group_package_types
        :param enable_group_conditionals: overrides
           self.conf.enable_group_conditionals
        :return: a list of transaction members added to the
           transaction set by this function
        sNo Group named %s existstcompatt	mandatorytdefaulttoptionalRRctblacklisteds!Skipping package %s from group %ssAdding package %s from group %stsimpleRtpkg_warning_leveltdebug2s-No package named %s available to be installeditbesttnoarchs8Warning: Group %s does not have any packages to install.sDGroup %s does have %u conditional packages, which may get installed.N(9RRJRRwR
R-Rtgroup_package_typesRjRbtselectedR9RRVtdefault_packagestoptional_packagesR>RRnRRlRpR9ReR"RR4R{RRRER:RRR
R9Rt_ugroup_membert_igroup_membertInstallErrorRtenable_group_conditionalstconditional_packagesR5tisPackageInstalledRtconditionalsRRHR+RFRMtmultilib_policytlegit_multi_archesRRzRv(RIReRyRtupgradeR]RfRgt
package_typesRhtlupgradeRRiRERt
old_txmbrsRRRRtgroup_conditionalstcount_cond_testtcondreqtcondtuseRw((s0/usr/lib/python2.7/site-packages/yum/__init__.pytselectGroup/s		
			

		


	




!c	Cs|jj|s1tjtdt|n|jj|}|shtjtdt|nx/|D]'}t|_x|j	D]
}|j
jdt
}x|D]}|jj|krqn|s!y|jj|Wq!tk
r|jjtjtd|j|qq!Xn|s<t|jdkr|j
j|jjx9|j
jj|jgD]}|j
j|jqnWqqWqWqoWdS(s)Unmark the packages in the given group from being
        installed.

        :param grpid: the name of the group containing the packages to
           unmark from installation
        :param force: if True, force remove all the packages in the
           given group from the transaction
        sNo Group named %s existss%package %s was not marked in group %siN(Rt	has_groupRRwR
R-RJRbRzR9RRRRRRRlR'RR{RRRR"RcRR(	RIRetforceRgRhRRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
deselectGroups0

	


"cCs|jj|}|s7tjtdt|ng}x|D]}d	}|jjdkr}dj	t
|j}	n|jjdkr"|sdj	t
|j}	q|g}	xQ|jD]F}
|jj|
}|d	krqn|j
sqn|	j|
qWdj	t
|	}	nZ|jjdkr||j|}t}	xn|jD]c}
|
|ks{||
jdrtd}
|jjtj|
|
|jqVn|	j|
qVW|j|jjkrI|jj|j}x||jD]S}||jjkr
qn|jj|j}||jkr5qn|	j|qWn|jj|j|j}dj	t
|	}	ny"|j|	|||d|}Wntjk
rqDnX|j|qDW|S(
sMark all the groups in the given environment group to be installed.

        :param evgrpid: the name of the env. group containing the groups to
           mark for installation
        :param group_package_types: a list of the types of groups to
           work with.  This overrides self.conf.group_package_types
        :param enable_group_conditionals: overrides
           self.conf.enable_group_conditionals
        :return: a list of transaction members added to the
           transaction set by this function
        sNo Environment named %s existsRoRHRtRcRss%Skipping group %s from environment %sR]N( RRKRRwR
R-RRRjRRRltreturn_groupRReRFRR4R{RRRERsRRRqR@RARtR?RR(RIRmRyRRRORR_R]RNReRRiRRDtgrp_evgrpidttxs((s0/usr/lib/python2.7/site-packages/yum/__init__.pytselectEnvironmentsh

				
cCst|jj|}ts7tjtdt|nx6|D].}djt|j	}|j
||q>WdS(s@Unmark the groups in the given environment group from being
        installed.

        :param evgrpid: the name of the environment group containing the
           groups to unmark from installation
        :param force: if True, force remove all the packages in the
           given groups from the transaction
        sNo Environment named %s existsRHN(RRKRgRRwR
R-RRRlR(RIRmRROR_RN((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdeselectEnvironment>s	
cCsx$|jD]}|j|kr
|Sq
W|jj|}t|dkr|j|d||rhdStjt	dt
|nt|dkr|d}n
|d}|S(sReturn a package object that corresponds to the given
        package tuple.

        :param pkgtup: the package tuple specifying the package object
           to return

        :param allow_missing: If no package corresponding to the given
           package tuple can be found, None is returned if
           *allow_missing* is True, and a :class:`yum.Errors.DepError` is
           raised if *allow_missing* is False.
        :return: a package object corresponding to the given package tuple
        :raises: a :class:`yum.Errors.DepError` if no package
           corresponding to the given package tuple can be found, and
           *allow_missing* is False
        iRcs2Package tuple %s could not be found in packagesackiN(RRcRHtsearchPkgTupleR"R"RRtDepErrorR
R(RIRct
allow_missingRRR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pytgetPackageObjectPs

cCsd|jj|}t|dkrV|j|d|tjtdt|n|d}|S(s=Return a :class:`yum.packages.YumInstalledPackage` object that
        corresponds to the given package tuple.  This function should
        be used instead of :func:`searchPkgTuple` if you are assuming
        that the package object exists.

        :param pkgtup: the package tuple specifying the package object
           to return
        :return: a :class:`yum.packages.YumInstalledPackage` object corresponding
           to the given package tuple
        :raises: a :class:`yum.Errors.RpmDBError` if the specified package
           object cannot be found
        iRcs,Package tuple %s could not be found in rpmdb(RFRR"R#Rt
RpmDBErrorR
R(RIRcRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRws

cCs|jjd}tjj|r&dStjjd|jj}|j	t
jt
jB|j
dd}|j}~~|dkrdStjj|}tjj|stj|nt|d}|j~dSdS(	sChecks for the presence of GPG keys in the rpmdb.

        :return: 0 if there are no GPG keys in the rpmdb, and 1 if
           there are keys
        s/.gpgkeyschecked.yumiR8Rs
gpg-pubkeyitwN(RRWRRRRCttransactiontinitReadOnlyTransactionRtpushVSFlagsRt_RPMVSF_NOSIGNATURESt_RPMVSF_NODIGESTStdbMatchRRRRR(RItgpgkeyscheckedtmytstidxRtmydirR6((s0/usr/lib/python2.7/site-packages/yum/__init__.pytgpgKeyChecks$
cCs|s
gSt|tjkr1|\}}}n|}d}d}|ddkr|j}t|dkr|\}}}|tkrtjt	dt
|nt|}qn|dkr|jj|S|jj
|||jS(sReturn a list of package objects that provide the given
        dependencies. 

        :param depstring: a string specifying the dependency to return
           the packages that fulfil
        :return: a list of packages that fulfil the given dependency
        iR6isInvalid version flag from: %sN(RXR.t	TupleTypeRRR"tSYMBOLFLAGSRtYumBaseErrorR
RRHR tgetProvidesR(RIt	depstringtdepnametdepflagstdepvert	dep_splitt
flagsymbol((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs"cCs|}t|tjkr*t|}ny|j|}Wn*tjk
ritjtd|nXt|}|j	|j
d|}|dkrtjtd|n|S(sReturn the best, or first, package object that provides the
        given dependencies.

        :param depstring: a string specifying the dependency to return
           the package that fulfils
        :return: the best, or first, package that fulfils the given
           dependency
        :raises: a :class:`yum.Errors.YumBaseError` if no packages that
           fulfil the given dependency can be found
        sNo Package found for %sRN(RXR.tStringTypesRRRRR
Rt_bestPackageFromListRR(RIRRRJtpsR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pytreturnPackageByDeps	cCs|s
gSt|tjkr1|\}}}n|}d}d}|ddkr|j}t|dkr|\}}}|tkrtjt	dt
|nt|}qn|dkr|jj|S|jj
|||jS(s&Return a list of installed package objects that provide the
        given dependencies.

        :param depstring: a string specifying the dependency to return
           the packages that fulfil
        :return: a list of installed packages that fulfil the given
           dependency
        iR6isInvalid version flag from: %sN(RXR.RRRR"RRRR
RRFR RR(RIRRRRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR$s"	cCs|}t|tjkr*t|}ny|j|}Wn*tjk
ritjtd|nXt|}|j	|j
d|}|dkrtjtd|n|S(sReturn the best, or first, installed package object that provides the
        given dependencies.

        :param depstring: a string specifying the dependency to return
           the package that fulfils
        :return: the best, or first, installed package that fulfils the given
           dependency
        :raises: a :class:`yum.Errors.YumBaseError` if no packages that
           fulfil the given dependency can be found
        sNo Package found for %sRN(RXR.RRR$RRR
RRRR(RIRRRJRR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pytreturnInstalledPackageByDeps	cCsWt|dkrdSt|dkr0|dS|j|ddd|}|ddS(stake list of package objects and return the best package object.
           If the list is empty, return None. 
           
           Note: this is not aware of multilib so make sure you're only
           passing it packages of a single arch group.

           :param pkglist: the list of packages to return the best
             packages from
           :param req: the requirement from the user
           :return: a list of the best packages from *pkglist*
        iitreqpoRN(R"Rt_compare_providers(RIRJRtbestlist((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR/scCsg}|jj|}g}g}g}	xq|D]i}
|
j|krLq1q1|
jdkrk|	j|
q1td|
jr|j|
q1|j|
q1W|j|d|}|j|d|}|j|	d|}
|r
|r
|r
|j|jkr
d}n|
dkrE|r,|j|n|r|j|qn|r|j||
gd|}|jdkr|j|
q|r|j|n|r|j|qn]|r|j||
gd|}|jdkr|j|
q|j|n
|j|
|S(s,Return the best packages from a list of packages.  This
        function is multilib aware, so that it will not compare
        multilib to singlelib packages.

        :param pkglist: the list of packages to return the best
           packages from
        :param arch: packages will be selected that are compatible
           with the architecture specified by *arch*
        :param single_name: whether to return a single package name
        :param req: the requirement from the user
        :return: a list of the best packages from *pkglist*
        RxRFRN(RFt
get_arch_listReRRRR(RIRJRFtsingle_nameRt
returnlisttcompatArchListtmultiLibt	singleLibRxRtmultitsingletnoRw((s0/usr/lib/python2.7/site-packages/yum/__init__.pytbestPackagesFromListFsL
$	
c
sSjd
k	r*jjjg}njjs:d
Stdstj}t	j
jgg}jj
dt|_jjdtj||_njjjg}j|krO|j}g}x4|D],}tj|ds|j|qqW|r,|}nt|dkrx|d}g|D] }	|d|	dkrO|	^qO}nt|dkrd}
|j|
|d}g|D]}	|
||	s|	^q}nt|dkrdfd}|j|nx3|D]+}	j|	d	t}|d
k	r|SqWd
Sd
S(s Given a package return the package it's obsoleted by and so
            we should install instead. Or None if there isn't one. RARBsObs Init time: %0.3fiicSsI|\}}}}}|\}}}	}
}t|||f|	|
|fS(N(R(RRtn1ta1te1tv1tr1tn2ta2te2tv2tr2((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt	_sort_verscSs:t||}|sdSt||}|s2dS||S(Ni(R(tcarchRRtres1tres2((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_sort_arch_isc
se|\}}}}}|\}}}	}
}j||}|rI|Sjj||}|S(N(RFtbestarch(
RRRRRRRRRRRRR(RRRI(s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_sort_archsRN(RkRRtcheckForObsoleteRcRRJRRRCRDRERHRKR9RIR{RRARRFReR"R^R(
RIRtthispkgobsdictRXRR=toobsoletingtopkgtupRRcRRR((RRRIs0/usr/lib/python2.7/site-packages/yum/__init__.pyt_pkg2obspkgsP	

	

#	


	
cCs|}t}x{tr||}|dkr8|r8dS|dkrH|S||}|dkrd|St}||}||krdSqWdS(s Generic comp. sci. test for looping, walk the list with two pointers
            moving one twice as fast as the other. If they are ever == you have
            a loop. If loop we return None, if no loop the last element. N(RbR9R(RItnodet	next_functslowRtnext((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_test_loops	cCs8t|dr4d|jjd||jjdfS|S(s1Attempt to make the string look bold in terminal.Rs%s%s%sRR(RRR(RItstring_((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs%cCs?|ddkst|d}g}y
|j}Wn*tjjk
r_}|jj||SXt}|r|ddkr|d}x|j|D]1}t	}|j
|jd|}	|j|	qWnExB|j
|D]1}
t	}|j|
jd|}	|j|	qW|s;tjtd|j|n|S(s= Do groupinstall via. leading @ on the cmd line, for install.iRGit^RsGroup %s does not exist.(RRRRRwRzRRbRKR9RRsRRJRRntGroupInstallErrorR
R(RItpatternRtgroup_stringt	tx_returnRRRjtenv_grpRR;((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_at_groupinstalls.


	"cCs`y|j|dtSWnBtjk
r[}|jjtd||jjrUgSnXdS(s= Do group upgrade via. leading @ on the cmd line, for update.RsWarning: %sN(	RR9RRRzRR
Rtskip_missing_names_on_update(RIRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_at_groupupgradescCs|ddkst|d}g}|r|ddkr|d}y|j|}Wn0tjjk
r|jjtd|nX|j||Sy|j	|}Wn0tjjk
r|jjtd|nX|j||S(s; Do groupremove via. leading @ on the cmd line, for remove.iRGiRs-Warning: Environment Group %s does not exist.sNo group named %s exists(
RRnRRRwRzRvR
RRj(RIRRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_at_groupremoves"



cCs|ddkst|d}|jj|}|sWtjtdt|nt}x|D]}|j|j	qgW|j
j|S(s8 Do downgrade of a group via. leading @ on the cmd line.iRGisNo Group named %s exists(RRRJRRwR
R-RR
R9RHR(RIRReRgtpkgnamesRh((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_at_groupdowngrade2s
	
cCs|ddkst|dj}|rR|jdrR|d}|j|S|r|ddkr|d}|j|S|jj|S(s5 Remove things from the transaction, like kickstart. it-is@^iRG(RtstripR4RRRtdeselect(RIRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_minus_deselectAs



ccs|jjsdSt|tsqxn|jjd|jD]2\}}|j|kr8|j|}|Vq8q8Wnx|j	|D]}|VqWdS(s; Return the pkgs. that are obsoleted by the po we pass in. NR(
RRJRR&RtgetObsoletersTuplesRRcRt_find_obsoletees_direct(RIRtobstuptinst_tupt
installed_pkgR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_find_obsoleteesPs%ccsRxK|jD]@}x7|jjd|D] }|j|gr&|Vq&q&Wq
WdS(s< Return the pkgs. that are obsoleted by the po we pass in. This works
            directly on the package data, for two reasons:
            1. Consulting .up. has a slow setup for small/fast ops.
            2. We need this work even if obsoletes are turned off, because rpm
               will be doing it for us. RN(tobsoletes_namesRFR+tobsoletedBy(RIRtobs_nR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR^scGs=x6|D].}||jjkr|jjj|qqWdS(sB Add all of the passed flags to the tsInfo.probFilterFlags array. N(RRRe(RItflagstflag((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_add_prob_flagsis
cCs`xY|jjd|jD]?}|j|rt|j|jr|jtjt	SqWt
S(s9Add RPMPROB_FILTER_OLDPACKAGE if the package requires it.R(RFR+RRRRFRRRR9Rb(RIRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRos
%cCstr(|jdk	r(|j|jjkS|j|r;tSx|D]y}|j|r]qBn|j|jkrst	Sd|j|jfkrt	S|jj
st	St|j|jrqBnt	SWtS(sh See if po is an upgradeable version of an installed pkg.
        Non-compat. arch differences mean no. RxN(RbRkRRcRt
updating_dictRtverLERFR9RMR(RIRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_install_is_upgradews"
cCs|s!|jj|jg}n|}xB|jj|jD]+}|jtkrYq>n|j|jq>Wxy|D]q}|j	|j	krqtn|j
|sqtnt|j	|j	rqtn|jj
tjtd||tSWtS(sj See if we can install this arch of package, mainly for
            i386 vs. i586 or ppc64 vs. ppc64 etc. s&Package: %s - can't co-install with %s(RFRRRRRRReRRFRRR{RRRR
RbR9(RIRRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_valid_install_archs$
cCsX|jjs|jjdkr#tS|jdksA|jdkrEtS|j|jjkS(syReturn whether this obsoleter meets multilib_policy in case we are
        dealing with the noarch->arch obsoletion case.RwRx(RFRMRRR9R(RIR`t	obsoletee((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_valid_obsoleter_archs
cso	|jdd}fd}i|d6jjd6}||krPd}n||}g}t}|rt|tst|tr|j|q tj	t
dnq|stj	t
dnd|kr'|dr|dd	d
krj|dS|dr4|dd	dkr4j|dSd)}d|krS|d}nt}|dg}	jjd
|	d|dt}
|j|
|
s|d}jjt
d|j|}
|rtj|
|}
ntj|sj|
dtd|}
n|j|
qn{j|}jjd|dd|dd|dd|dd|d}j||tj||jd}|r jjr|s|drjjdkri}
g}g}jj}|jdxG|D]?}|j|kr;d|
|j <|j|q	|j|q	Wx-|D]%}|j |
krS|j|qSqSW|}qqnt!|}i}xD|D]<}|j |kr|g||j <q||j j|qWg}x*|j"D]}|jj|qW|}n|s4d|kr|d}j#jd
|gdt}|sjjt
d|j$|}qnd|krj#jd|d}nd|krj#jd|dd	}ntrx*|D]}jjt
d|qWn|rgStj	t
dng}x.|D]&}j%j&d|j'rj%j(|j't)rjj*t+j,t
d ||jj%j-d|j'qAqnj#j.|j g}|r"j/||r"j0d!|d|jd}|j|qAnj1||s:qAnd)}jj2rtt|trtj3|j4}n|d)k	rgd)}j#jd|j }|j5|d"d}|r|d	}n|r|t
d#||qAd$|kr)|j6|d$s)|t
d%|j |j qAq)n|t
d&|j |j ||jj7d!|qAnj#j8d!|rj%j(|j't9s|t
d'|qAqnj:|sit}xQj#jd|j d|jD].}t}j%j(|j't9rt}PqqW|si|t
d(|j0d!|d|jd}|j|qAqinxkj#jd|j d|jD]H}|j;|rj<t=j>t=j?t=j@j%jA|j'PqqWjB|tCjD|}|rH	xe|D];}j%jE||}j%jF|||j|q	WqAj%jG|}|j|qAW|S(*sfMark the specified item for installation.  If a package
        object is given, mark it for installation.  Otherwise, mark
        the best package specified by the key word arguments for
        installation.

        :param po: a package object to install
        :param kwargs: if *po* is not specified, these keyword
           arguments will be used to find the best package to install
        :return: a list of the transaction members added to the
           transaction set by this function
        :raises: :class:`yum.Errors.InstallError` if there is a problem
           installing the package
        Rutflibblecsjjtj||dS(N(R{RRRE(RR(RI(s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_dbg2sRvRs0Package Object was not a package object instancesNothing specified to installRiRRGRRRs3Checking for virtual provide or file-provide for %sRRRRRFRRRHRRwRxis=Checking for installed virtual provide or file-provide for %sRcs&Package %s installed and not availables"No package(s) available to installs)Package: %s  - already in transaction setRtlimits8Package %s is obsoleted by %s which is already installedtprovides_forsWPackage %s is obsoleted by %s, but obsoleting package does not provide for requirementss;Package %s is obsoleted by %s, trying to install %s insteads/Package %s already installed and latest versions;Package matching %s already installed. Checking for update.N(HRR{RRbRR%R&ReRRR
RRRR9RHRRRRRRRRt_nevra_kwarg_parseR+R"RFRMRRRRRR=RFR$RRRcRRRRRRRRR
RRJRRRRR9RRRRRRtRPMPROB_FILTER_REPLACEPKGtRPMPROB_FILTER_REPLACENEWFILEStRPMPROB_FILTER_REPLACEOLDFILESR'RRRt
addObsoletingR%t
addInstall(RIRRtpkg_warnRt
level2funcRtwas_patternRtpatstmypkgsRR tpkgs_by_nameRt	not_addedRwRt	pkgbynametlstRRRtobsoleting_pkgtalready_obsRjRtobs_pkgsRR((RIs0/usr/lib/python2.7/site-packages/yum/__init__.pyR9sH
	


	






	
			 
 
	!


		(!
	(


cCst|jd}t|jd}g}x|j|D]}|jj|}x|D]y}xp||D]d}	|jd|	sp|j|jf}
x3|jj	|
D]}|j
|jd|qWPqpqpWq_Wq@W|S(s Check for any difference in the provides of the old and new update
            that is needed by the transaction. If so we "update" those pkgs
            too, to the latest version. RWR(Rt
returnPrcot
differenceRtgetRequirestinPrcoRangeRRFRHRRR
(RItopkgtnpkgtoprovstnprovsRR1RRRtnaTup((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_check_new_update_providess
c
Cst}x|jj|tgD]}d}x|jD]z}|j|rW|d7}q5xU|jj|jD]>}|jj|j	j|j
|j	|}	|j|	qmWq5W|rt}q|jj|j	jqW|S(s We return True if there is a newer package already in the
            transaction. If there is an older one, we remove it (and update any
            deps. that aren't satisfied by the newer pkg) and return False so
            we'll update to this newer pkg. ii(
RbRRR)R*RRRcR'RR"RR9(
RIRct
available_pkgRRjRRRtntxmbrR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_newer_update_in_transs
		cCs\|jj||}|r+|j|nd|jkrX|jjdkrXd|_n|S(NRR4(Rt	addUpdatetsetAsDepRR(RItrequiringPotupkgRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_add_up_txmbrs!c,s
|jdd}fd}i|d6jjd6}||krPd}n||}g}|r|rjjtjtdjj}	j	j
rjjdd}
ng}
x|
D]\}}j|d	t
}
|
d'krqnj|}j|
|s$qnj|
j}|d'k	rN|}
njj|
|}jj||
|r|j|n|j|qWx|	D]\}}jjd
|rjjtjtd|qj|d	t
}|d'krqn|jjd|qWj	jd
krj	jrx.jjD] }|jjd|qWWx1jj D] }|jjd|qWn|Sg}g}t
}|r|j!dkr|j|q|j|nd|kr|dr5|dddkr5j"|dS|drd|dddkrdj|dS|d}|sj#j$d|g}t%j&||jd}n'j'j$d|gd|jd}|r|rg}y+|rj(|}nj)|}Wn3t*j+j,k
rE}j-j.td|nXt%j&||jd}|rw|j|q|j|nyz|rg}ng|jdr|dg}j'j/|d}|j0d|}n"|dg}j'j0d|}Wnt+j1k
rg}nX|j||r}|r}j-j.tdt2|j	j3s}t+j4tdq}nd|dk}nj5|}j#j6d|dd|dd|dd|dd|d }|sj'j6d|dd|dd|dd|dd|d }j7||t8|dkrpj9||}t:d!|}q|s|td"j;|qnj	j
rQx|D]}jj<j|j=g}g}xb|D]Z} j| d	t
}
|
d'krqn|r&j|
|r&qn|j|
qWx-t>|D]}
|jj?d|
qDWqWx|D]}!xj@|!D]}"|rj|!|"rqn|"j=}#jj|!|"}|r|j|n|j|jj|#r$jjtjtd#|#qjj|"|!}|j|qWqrWnx|D]z}xqjjAj|j=gD]T}$j|$d	t
}|d'krqznjj|j=rjjtjtd|j=qz|j=jjBd|jCkr~	xj@|D]d}%jjD||}|rD	|j|njj||%jj|%||j|q	WqzjjE|j=tFr	jjG|j=njH|||}|j|qzWqXWx0|D](}!jI|!s	q	ntJ|!tKr
|!jC}&xmj#jL|&D]Y}'|'j=}(jjE|(tFrZ
jjG|(njH||!|'}|j|q#
Wq	nj|!j}
|
d'k	r|jdr
|
j!|jdkr
q	njjtjtd$|!|jjd|
q	nxjjMj|!j=gD]}(jj|(rijjtjtd|(q.jN|(|!|rjjtjtd%|(q.j|(}'jjE|(tFrjjG|(njH||!|'}|j|q.Wj#j6d|!jCd|!jO})|)rGjP|!rGtQ|)d&})nx|)D]}*jj|*j=rjjtjtd|*j=qNjN|*j=|!|rjjtjtd%|*j=qN|*jR|!rNjH||!|*}|j|qNqNWq	Wxq|D]i}x`j#j6d|jCD]F}+|+|jSkr/
jT|jU|+ru
jjV|+|jUqu
q/
q/
Wq
W|S((sOMark the specified items to be updated.  If a package
        object is given, mark it.  Else, if a package is specified by
        the keyword arguments, mark it.  Finally, if nothing is given,
        mark all installed packages to be updated.


        :param po: the package object to be marked for updating
        :param requiringPo: the package object that requires the
           upgrade
        :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
        :param kwargs: if *po* is not given, the names or wildcards in
           *kwargs* will be used to find the packages to update
        :return: a list of transaction members added to the
           transaction set by this function
        RuRcsjjtj||dS(N(R{RRRE(RR(RI(s0/usr/lib/python2.7/site-packages/yum/__init__.pyRsRvRsUpdating EverythingRBiRRcs>Not Updating Package that is already obsoleted: %s.%s %s:%s-%sRRcs@^RGRRiRRRs%ssNo Match for argument: %ss1Not tolerating missing names on update, stopping.R4RRRFRRRHRcSs|dS(Ni((R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRss!No package matched to upgrade: %ss,Package is already obsoleted: %s.%s %s:%s-%ss*Not Updating Package that is obsoleted: %ss<Not Updating Package that is already updated: %s.%s %s:%s-%siN(WRR{RRRRER
RtgetUpdatesTuplesRRJRRR9RRRRRRRR%R'RetisObsoletedRR
Rjtupgrade_group_objects_upgradeRRqRRlRRRFRRRRHRR$RRRRzRvRRRR-RtUpdateMissingNameErrorRR+R"R"Rtmapt_ui_nevra_dicttobsoleted_dictRcRR9RtupdatesdicttgetObsoletesListRR&RRR'R*RRR&treturnNewestByNameRR%RFRRtverLTRDt_does_this_updateRt
addUpdated(,RIRR(t	update_toRR
RRRRDRJR=RRRttopkgRtnewtoldR]REtinstpkgst	availpkgstarch_specifiedRt
depmatchesRRRR tobs_tupsRRcR#t
obsoleted_pkgR<tupdatingRR,tupdated_pkgR?tpot_updatedRti_pkg((RIs0/usr/lib/python2.7/site-packages/yum/__init__.pyR
s!
	
		!
			



 "

	!
	
#
"!	
				"			!

	
$c
Ks|r|rtjdng}g}|r;|g}nYd|kr|drv|dddkrv|j|dS|dr|dddkr|j|dS|jj|dg\}}}d|krtj||d}tj||d}n|j||j||rg}|d}	y|j	|	}Wn3t
jjk
rz}|jj
td|nXd|krtj||d}n|st|	}	|jj
tdt|	q|j|qn|j|}
|jjd	|
d	d
|
d
d|
dd|
d
d|
d}|j||
t|dkr|jdts|jjtd|j|
qn|jj}tj|}x|D]}|jjr|j|kr|jjtd|qn|jj|jr_xM|jj|j D]3}
|jj!td|
|jj"|
jq%Wn|jj#|}
|j$|
qW|S(sZMark the specified packages for removal. If a package
        object is given, mark it for removal.  Otherwise, mark the
        package specified by the keyword arguments.

        :param po: the package object to mark for installation
        :param kwargs: If *po* is not given, the keyword arguments
           will be used to specify a package to mark for installation
        :return: a list of the transaction members that were added to
           the transaction set by this method
        :raises: :class:`yum.Errors.RemoveError` if nothing is specified
           to mark for removal
        sNothing specified to removeRiRRGRs%ssNo Match for argument: %sRRRFRRRHRRbs No package matched to remove: %ssSkipping the running kernel: %ss Removing %s from the transaction(%RtRemoveErrorRRRFtmatchPackageNamesRRRR$RRRzRvR
R-RR+R#R"RRbRR0RRRRRcRRRRRR'taddEraseRe(RIRRRRRRRR?RR RRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR'Gsj
"


	#(
cCsg}g}g}g}|sy1t|d|jjd|dtjj}Wn.tjk
r|jj	t
d||SX|jjt
jt
d|j|n|jddkr|jj	t
d||S|j|jjkr|jj	t
d	||j|S|jjrg|j|jj|j}|rg|jj	t
d
||d|Sn|jjd|j}	t|	dkr|r|jjt
d
|j|S|j|nxa|	D]Y}
|j|
rF|
j|jjkr0|j|
jkr |j||
fqC|j|q'|j||
fq|j|
r|j|
jkrt|jst|
jr|r|jjt
d|j|jq|j|q'|j|q|j |r|r
|jjt
d|j|jq'|j|q|j|qW|g|D]}|d^q5}|j!||r{|jj"t
d||SxY|D]Q}|jjt
jt
d|j|j#j||j$|j%d|qWxh|D]`\}}
|jjt
jt
d|j|
|j#j||j&d|}|j$|qWx0|D](}|jjt
jt
d|jqIWx|D]x}|j'jr||jr|xY|j(|j'D]B}|j)j*||j'|jj||j)j+|j'|qWq|q|W|S(s|Mark a package on the local filesystem (i.e. not from a
        repository) for installation. 
        
        :param pkg: a string specifying the path to an rpm file in the
           local filesystem to be marked for installation
        :param po: a :class:`yum.packages.YumLocalPackage` 
        :param updateonly: if True, the given package will only be
           marked for installation if it is an upgrade for a package
           that is already installed.  If False, this restriction is
           not enforced
        :return: a list of the transaction members added to the
           transaction set by this method
        RturltuasCannot open: %s. Skipping.sExamining %s: %st
payloadformattdrpms+Cannot localinstall deltarpm: %s. Skipping.sGCannot add package %s to transaction. Not a compatible architecture: %ssBCannot install package %s. It is obsoleted by installed package %siRsRPackage %s not installed, cannot update it. Run yum install to install it instead.sUPackage %s.%s not installed, cannot update it. Run yum install to install it instead.sExcluding %ssMarking %s to be installedRsMarking %s as an update to %ss&%s: does not update installed package.(,R(RFRR3Rt
user_agentRR>RzRvR
R{RRRR0RRFR,RRJRtsearchObsoletesRR+R"RReRRSRRRt_is_local_excludeRRRR9R
RRRR%R(RIRRt
updateonlyRtinstallpkgst
updatepkgst
donothingpkgst
obsoleterstinstalledByKeyRRt
check_pkgstoldpoRRtobs_pkg((s0/usr/lib/python2.7/site-packages/yum/__init__.pytinstallLocals 
%%!


!cCs
|sy1t|d|jjd|dtjj}Wn.tjk
rg|jj	t
d|gSX|jjt
jt
d|j|n|j|jjkr|jj	t
d||jgS|j||gr|jjt
d|gS|jd|S(	sMark a package on the local filesystem (i.e. not from a
        repository) for reinstallation. 
        
        :param pkg: a string specifying the path to an rpm file in the
           local filesystem to be marked for reinstallation
        :param po: a :class:`yum.packages.YumLocalPackage` 
        :return: a list of the transaction members added to the
           transaction set by this method
        RRIRJsCannot open file: %s. Skipping.sExamining %s: %ssGCannot add package %s to transaction. Not a compatible architecture: %ssExcluding %sR(R(RFRR3RRMRR>RzRvR
R{RRRR0RFR,RORR(RIRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytreinstallLocals 
cKs|jtjtjtjg}|rG|j|jd|jn|j|j||sxtj	t
dnt|}g}g}g}x|D]}|jj
}	t|j_
t|trd|kr|jd|}
n$|jd|jd|jd}
|	|j_
t|
dkrz|jj|j|j||jt|j|j|jqn|j|
qW|r|rtjt
ddj|d	|n|j||S(
sMark the given package for reinstallation.  This is
        accomplished by setting problem filters to allow a reinstall
        take place, then calling :func:`install`.

        :param po: the package object to mark for reinstallation
        :param kwargs: if po is not given, the keyword will be used to
           specify a package for reinstallation
        :return: a list of the transaction members added to the
           transaction set by this method
        :raises: :class:`yum.Errors.ReinstallRemoveError` or
           :class:`yum.Errors.ReinstallInstallError` depending the nature
           of the error that is encountered
        Rcs2Problem in reinstall: no package matched to removeRRtrepoid_installis6Problem in reinstall: no package %s matched to installs, tfailed_pkgs(RRRR	R
RR'RcRtReinstallRemoveErrorR
R"RRJRbRR&R9RRReRRtReinstallInstallErrorR(RIRRttx_mbrsttemplentnew_membersR8R\Rtold_conf_obstmembers((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR=s@


+
cCs
|sy1t|d|jjd|dtjj}Wn.tjk
rg|jj	t
d|gSX|jjt
jt
d|j|n|j|jjkr|jj	t
d||jgS|j||gr|jjt
d|gS|jd|S(	sMark a package on the local filesystem (i.e. not from a
        repository) to be downgraded.
        
        :param pkg: a string specifying the path to an rpm file in the
           local filesystem to be marked to be downgraded
        :param po: a :class:`yum.packages.YumLocalPackage` 
        :return: a list of the transaction members added to the
           transaction set by this method
        RRIRJsCannot open file: %s. Skipping.sExamining %s: %ssGCannot add package %s to transaction. Not a compatible architecture: %ssExcluding %sR(R(RFRR3RRMRR>RzRvR
R{RRRR0RFR,RORt	downgrade(RIRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytdowngradeLocalzs 
cCsd|jjks$d|jjkr(tSg}t|jjdkrwt||jjdd\}}}||}n||krtStS(s0returns True if the local pkg should be excludedRTRiRi(RRRbR"R0R#R9(RIRRJttoexcRR0R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyROs$
c
Ks|r|rtjdnt}|r5|g}nud|krJ|drp|dddkrp|j|dS|dr|dddkr|j|d}t}q|jjd|dgdt}|s|d}|jj	t
d|y|j|}WqGtjj
k
rC}|jjt
d	t|qGXqn`|j|}|jjd
|d
d|dd|dd
|dd|d}|j|||s.g}d|kr|jjd|dgdt}nd
|kr|jjd
|d
}n|rgStjt
dnt}	g}
x|D]}|j|r|j|jf|	krt
d|}|jjtj|n|	j|j|jfqDn|
j|qDW|
}t}
x|D]}|
j|jqW|jjt|
}i}i}xt |D]}|j|ksZ|j!||jdrm|g||j<n1|j"||jdr||jj|n|||j|jf<q+Wi}xt |D]}|j|jf}d}||kr||}n[|j|kr]xI||jD]7}t$|j|js|}|j|jf}PqqWn|dkr||	kr|r|j|krt
d|}|jj|n|	j|qn|j"|rqn|j%|r'||	krt
d|}|jj|n|	j|qn|	j||j&|kr_|j'||j&r_qn|||j&<qWg}xh|D]`}|j&|krq}n|j(j)||j&|}|sq}n|j*t+j,|j-|q}W|S(srMark a package to be downgraded.  This is equivalent to
        first removing the currently installed package, and then
        installing the older version.

        :param po: the package object to be marked to be downgraded
        :param kwargs: if a package object is not given, the keyword
           arguments will be used to specify a package to be marked to
           be downgraded
        :return: a list of the transaction members added to the
           transaction set by this method
        :raises: :class:`yum.Errors.DowngradeError` if no packages are
           specified or available for downgrade
        sNothing specified to downgradeRiRRGRRs3Checking for virtual provide or file-provide for %ssNo Match for argument: %sRRRFRRRHRs$No package(s) available to downgrades1Package %s is allowed multiple installs, skippings"No Match for available package: %ss%Only Upgrade available on package: %sN(.RtDowngradeErrorRbRRR9RHRR{RR
RRRRzRvR-RR+R"RFRRRRFRRRRReRRRRRRRtverGERcRRtaddDowngradeRRRR(RIRRtdoing_group_pkgstapkgsRRR Rt
warned_nasttapkgsRRt
apkg_namesRtlatest_installed_natlatest_installed_ntdowngrade_apkgsRtlipkgttlipkgRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRds		
*



	
	





cCs|d}|d}|d}|d}|d}|rZ|rZ|rZd|||f}nS|ry|ryd||f}n4|r|rd||f}n|r|}nd	}|r|rd||fS|rd
|S|r|SdS(NRRRRRFs%s:%s-%ss%s-%ss%s:%sRs*-%ss	<unknown>((R R,RR.R/R-tevr((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR0Bs*




	cCsi}d|kra|d\}}}}}||d<||d<||d<||d<||d<|S|jd|d<|jd|d<|jd|d<|jd|d<|ddkr|jd|d<n|jd|d<|ddkr|jd|d<n|S(	NRcRRRFRRRRH(RR(RIRt
returndictR,R-RR.R/((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR\s&




cCse|jj}t|j_t}xA|jD]6}|jdkr(|jd|jr^t}q^q(q(Wx|jD]}|jdkrl|r|jj	|jr|jd|jrlt}qlqlny"|j
d|jrt}nWqtjj
k
r|jjtd|qXqlqlWxh|jD]]}|r&|jdkr&|jj|jr\q&n|jd|jdtrt}qq&q&Wx|jD]}|jdkr|r|jj	|jr|jd|jrt}qqn|jd|jrt}q|jjtd|qqWxh|jD]]}|r-|jd	kr-|jj|jrcq-n|jd|jdtrt}qq-q-Wx|jD]u}|jdkr|r|jj	|jr|jd|jrt}qqn|jd|jr
t}q
qqWxA|jD]6}|jd
kr|jd|jrQt}qQqqW||j_|S(sDRepeat the transaction represented by the given
        :class:`yum.history.YumHistoryTransaction` object.

        :param transaction: a
           :class:`yum.history.YumHistoryTransaction` object
           representing the transaction to be repeated
        :param force_reinstall: bool - do we want to reinstall anything that was
           installed/updated/downgraded/etc.
        :param force_changed_removal: bool - do we want to force remove anything
           that was downgraded or upgraded.
        :return: whether the transaction was repeated successfully
        t	ReinstallRct	DowngradesFailed to downgrade: %st
DowngradedRbtUpdatesFailed to upgrade: %stUpdatedtInstallsTrue-Installt
ObsoletingtErase(R{sTrue-InstallR|(RRJRbt
trans_dataRGRRcR9RFRRdRRRgRzRvR
RRR'R
R9(RIRtforce_reinstalltforce_changed_removalRbRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pythistory_redoxsj	
$		 	cCsu|jj}t|j_t}xA|jD]6}|jdkr(|jd|jr^t}q^q(q(Wxx|jD]m}|jdkrly"|jd|jrt}nWqt	j
jk
r|jj
td|qXqlqlWxZ|jD]O}|jdkr|jd|jrt}q6|jj
td|qqWx\|jD]Q}|jdkrD|jj|jrtqDn|jd|jrt}qqDqDWxA|jD]6}|jd
kr|jd|jrt}qqqWxA|jD]6}|jdkr|jd|jrt}qqqWxA|jD]6}|jdkr+|jd|jrat}qaq+q+W||j_|S(sCUndo the transaction represented by the given
        :class:`yum.history.YumHistoryTransaction` object.

        :param transaction: a
           :class:`yum.history.YumHistoryTransaction` object
           representing the transaction to be undone
        :return: whether the transaction was undone successfully
        RvRcRzsFailed to downgrade: %sRxsFailed to upgrade: %sR|sDep-InstallR{sTrue-Installt	ObsoletedR}(sDep-InstallsInstallsTrue-Install(RRJRbR~RGRRcR9RdRRRgRzRvR
R
RRR'R9(RIRRbRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pythistory_undosN
$	 cCs|j}|j}|j}|jdks6||kr:dS|jdkr\td|}ntd||f}d|_|jj|dS(sFailure callback for urlgrabber to force a retry if we time out
        (code 12) or error out (code 14) after being redirected (since these
        codes are not in opts.retrycodes).

        This allows for failovers if the URL points to a MirrorManager2 (such
        as download.fedoraproject.org).  If the mirror it redirects to is down
        for some reason, this will ensure that we try again, hopefully getting
        a mirror that works.
        iiNsTimeout on %s, trying agains'Could not retrieve %s: %s, trying againi(ii(RaRIR!R
RzR(RItdataRturl_initialt
url_actualR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytredirect_failure_callbacks
				cCst}|j}td|}|jjtj|yftj|}|dkriidd6}d}	n|j
}|jd}	tj
|d||}
Wn8tjjk
r}tjtdt|nXd}t}
|r|r|jr|j|d|jyHtj|d	}|j
}|jd
}	tj|d||}Wntjjk
rv}d}nX|rtj|tj|
|jstjtd||jfqtd}|jjtj|t}
qnytj|
d
t}Wn8tk
rD}tjtd|t|fnXg}x|D]}i}xAdD]9}||krtjtd|n||||<qeWtj|dj|d<|
|d<t||d<|j |qRW|S(s
        Retrieve a key file
        @param keyurl: url to the key to retrieve
        Returns a list of dicts with all the keyinfo
        sRetrieving key from %si'Rs
global/gpgkeys/gpgkeyRRsGPG key retrieval failed: RQs.ascs
/gpgkeysigs>GPG key signature on key %s does not match CA Key for repo: %ss,GPG key signature verified against CA Key(s)tmultiplesInvalid GPG Key from %s: %stkeyidRtuseridtfingerprinttraw_keys2GPG key parsing failed: key does not have value %sthexkeyidt	valid_sigthas_sigN(Rs	timestampsuseridRR(!RbRR
R{RRRRtto_utf8Rt_default_graboptsRRUturlreadRjRRRR/tgpgcakeytgetCAKeyForRepoRTturlopentvalid_detached_sigtStringIOtgpgcadirR9t
getgpgkeyinfoRt
keyIdToRPMVertuppertboolRe(RItkeyurlR[tgetSigt
key_installedRRRIRRctrawkeyRtsigfileRt	keys_infoRtkeyinfotthiskeyR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_retrievePublicKeysh	
	


	%


tGPGc
Csd}|jdr|td}|jj|}|rt|d}td||dt|dtj	|||j
|jddf}qn|dkrtd||dt|dtj	||jddf}n|jj
d	|dS(
Nsfile:isaImporting %s key 0x%s:
 Userid     : "%s"
 Fingerprint: %s
 Package    : %s (%s)
 From       : %sRRsfile://RsKImporting %s key 0x%s:
 Userid     : "%s"
 Fingerprint: %s
 From       : %ss%s(RR4R"RFtsearchFilesRR
R-Rtgpgkey_fingerprint_asciitui_from_repoRRzRv(RIRRtkeytypeRtfnameR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_getKeyImportMessagees"			c	s|jjjj}t}fd}t}x|D]}|j|}	x|	D]}
|jj}tj	||
d|
ddkr|j
jtd||
dfqbnj
r|
dr|
drt}n|j|
|t}|jjrt}n|jjr*t}nr|ry|id	6|
d
d
6|
dd6|d6|
dd6|
dd6}n#|r||
d
|
d}n|st}qbn|jj}|jtj|
d
}
|
dkr
td|
}tj||n|j
jtdt}qbWqCW|rP|rPtjtdn|s~tdj}tj||n|j\}
}|
dkrtd}|j
j|t|}tj||ndS(sRetrieve a key for a package. If needed, use the given
        callback to prompt whether the key should be imported.

        :param po: the package object to retrieve the key of
        :param askcb: Callback function to use to ask permission to
           import a key.  The arguments *askck* should take are the
           package object, the userid of the key, and the keyid
        :param fullaskcb: Callback function to use to ask permission to
           import a key.  This differs from *askcb* in that it gets
           passed a dictionary so that we can expand the values passed.
        :raises: :class:`yum.Errors.YumBaseError` if there are errors
           retrieving the keys
        cs*|tddjjf7}|S(Ns;


 Failing package is: %s
 GPG Keys are configured as: %s
s, (R
RR(R(RR[(s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_prov_key_datasRRis)GPG key at %s (0x%s) is already installedRRRRRRRRsKey import failed (code %d)sKey imported successfullysDidn't install any keyssThe 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(R]RRRRbRRFRRtkeyInstalledRzRR
RR9RRtassumenot	assumeyestpgpImportPubkeyt
procgpgkeyRRRRYR-(RIRtaskcbt	fullaskcbtkeyurlsRRtuser_cb_failRRRRRfR[RR(((RR[s0/usr/lib/python2.7/site-packages/yum/__init__.pytgetKeyForPackagesf	

#			
	
csat}fd}t}xD]}	|j|	d}
x|
D]}tt|ddd!jtj|kr|jjt	d|	|dft
}qNnr9jd}d	}
g}y(t|d
j
}|jd}Wnttfk
rnXt|d|kret
}qen,d}
jre|d
re|dret
}n|s|j||	|
t}|jjrt}nd|jjrt
}nO|r|id6|dd6|dd6|	d6|dd6|dd6}n|st
}qNqntj|d|dd|}|sat	d|d}tj||n|jjt	dt
}rN|rN|d|krt|d}y-|j|dd|j|jWqttfk
rqXqqNqNWq(W|r/|r/t	d}tj||n|s]t	dj}tj||ndS(sL
        Retrieve a key for a repository If needed, prompt for if the key should
        be imported using callback
        
        @param repo: Repository object to retrieve the key of.
        @param destdir: destination of the gpg pub ring
        @param keyurl_list: list of urls for gpg keys
        @param is_cakey: bool - are we pulling in a ca key or not
        @param callback: Callback function to use for asking for permission to
                         import a key. This is verification, but also "choice".
                         Takes a dictionary of key info.
        csKtd}r!td}n|td|djf7}|S(NtNotYessD


 CA Key: %s
 Failing repo is: %s
 GPG Keys are configured as: %s
s, (R
R(Rtcakeytxt(tis_cakeytkeyurl_listR[(s0/usr/lib/python2.7/site-packages/yum/__init__.pyRsRRiis(GPG key at %s (0x%s) is already importedRs/imported_cakeystCAR/s
RRRR[RRRRRtgpgdirsKey %s import failedsKey imported successfullyR-s#Didn't install any keys for repo %ssThe GPG keys listed for the "%s" repository are already installed but they are not correct.
Check that the correct key URLs are configured for this repository.N(RbRthexRRRtreturn_keyids_from_pubringRzRR
R9RRRRRRRRRRRRtimport_key_to_pubringRRR tflushRR(RIR[tdestdirRRRQRRRRRRtikfRtcakeystcakeys_dRfR[Rtikfo((RRR[s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_getAnyKeyForRepos|

2
				 

	
cCs)|j||j|jdtd|dS(s-Retrieve a key for a repository.  If needed, use the given
        callback to prompt whether the key should be imported.

        :param repo: repository object to retrieve the key of
        :param callback: callback function to use for asking for
           verification of key information
        RRQN(RRRRb(RIR[RQ((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
getKeyForRepoGscCs)|j||j|jdtd|dS(s-Retrieve a key for a repository.  If needed, use the given
        callback to prompt whether the key should be imported.

        :param repo: repository object to retrieve the key of
        :param callback: callback function to use for asking for
           verification of key information
        RRQN(RRRR9(RIR[RQ((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRQscCs!d}|jjdkrdS|jjr/dSg}|jj}tj|\}}i}x|jjD]~}|j	dkrqon|j
rqon|j|jsqon|j
|kr|jg||j
<qo||j
j|jqoWx|D]}|jjd|}	||	}	t|	t||}
|
|jjkrQqn|
|jj}xc|	D][}|j|jf||fkrqhn|dkrPn|j|||f|d8}qhWqWxO|D]G\}}
|jj|}t|
dkr|jj|
dqqWdS(	s Limit packages based on conf.installonly_limit, if any of the
            packages being installed have a provide in conf.installonlypkgs.
            New in 3.2.24: Obey yumdb_info.installonly data. cSsg}g}g}xt|D]}d|jkrG|j|qn|jjdkr_qntrx|j|qn|jjdkr|j|q|jjdkr|j|q|j|qW|||S(sb Allow the admin to specify some overrides for installonly pkgs.
                using the yumdb. tinstallonlytkeepsremove-firstsremove-last(RRReRR9(Rtret_begtret_midtret_endR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt_sort_and_filter_installonly`s$

iNRRRi(RR(Rtinstallonly_limitRt_check_future_rpmdbvRFRRt"get_running_kernel_version_releaseRRRRRRReR+R"RRRHR2(RIRRcRtcur_kernel_vtcur_kernel_rRjRRRttotaltnumleftRtnewposR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR[sJ		

cCs|stj}n|jtj|j|}|dkrc|jtj|j||n|jtj|j	|d||jtj
|j|d|dS(sqProcess the current transaction.  This involves the
        following steps:
          - Download the packages
          - Check the GPG signatures of the packages
          - Run the test RPM transaction
          - Run the RPM Transaction
        The *callback*.event method is called at the start, and
        between each step.

        :param callback: a callback object, which must have an event
           method
        :param rpmTestDisplay: name of the display class to use in the
           RPM test transaction
        :param rpmDisplay: name of the display class to use in the rpm
           transaction
        tdisplayN(t	callbackstProcessTransNoOutputCallbackteventtPT_DOWNLOADt_downloadPackagesRtPT_GPGCHECKt_checkSignaturest
PT_TEST_TRANSt_doTestTransactiontPT_TRANSACTIONt_doTransaction(RIRQtrpmTestDisplayt
rpmDisplayR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytprocessTransactionscCstdtd|jj}t|dkr=dS|jtj|y|j	|}Wn&t
k
rtjt
dgnXt|dkrt
dg}xI|D]A}tj||}x%|D]}|jd||fqWqWtj|n|S(s/ Download the need packages in the Transaction cSs|jS(N(R(R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRscSs
|jdkS(NRR(RR(R(R((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRsis!Unable to find a suitable mirror.s3Errors were encountered while downloading packages.s%s: %sN(R/tfilterRRR"RRRtPT_DOWNLOAD_PKGSR~RRRR
RRRetYumDownloadError(RIRQtdlpkgsRgterrstrR|RoR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs"


cCsjxc|D][}|j|\}}|dkr4qq|dkrV|j||jqtj|qWdS(s/ The the signatures of the downloaded packages ii(RYRt_askForGPGKeyImportRtYumGPGCheckError(RIRRQRR[R(((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs
cCstS(su 
        Ask for GPGKeyImport 
        This need to be overloaded in a subclass to make GPG Key import work
        (Rb(RIRRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRscCs|j|j}d|_|jdd|jjtjtd|j	}|rt
}x)|D]!}|jdrqgnt}qgW|rtdg}|j
|tj|ntdg}|j
|tj|ni}x'dgD]}	t|j|	||	<qWt|dt
}
|r<||
_n|jj|
d	|}~
t|dkrtd
}x|D]}
|d|
7}q|Wtj|n|`||_dS(
s Do the RPM test transaction tkeepoldisRunning Transaction Checksrpmlib(s'ERROR You need to update rpm to handle:s)ERROR with transaction check vs depsolve:tdiskspacecheckttestRsTest Transaction Errors: s  %s
N(tinitActionTsRRt
populateTsR{RRRR
t_run_rpm_checkR9R4RbRRtYumRPMCheckErrorRRR+RRRR"tYumTestTransactionError(RIRQRtdscbtmsgstrpmlib_onlyRtretmsgsttsConftfeaturettestcbttserrorsRtdescr((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR
sF
		





cCsl|j|jdd|jj|jjt|dt}|rX||_n|jd|dS(s do the RPM Transaction RiRRN(	RRRRtorderR+R,RR(RIRQRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR=s


cCsDg}|jjx*|jjD]}|jt|q#W|S(N(RRRQReR.(RIRRi((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRJs

c
Kstj|}||_|jj|_|jdt}|rg}|rx<|D]+}|rR|jt	||jj
qRqRWn|}||_n|r|rt	||jj
}n||_n|j
d|jjt|_d|_|jj|_|jj|_|jj|_|jj|_x=|jD]/}	t||	sRq7nt||	||	q7W|jj||jj|j|S(sRAdd and enable a repository.

        :param repoid: a string specifying the name of the repository
        :param baseurls: a list of strings specifying the urls for
           the repository.  At least one base url, or one mirror, must
           be given
        :param mirrorlist: a list of strings specifying a list of
           mirrors for the repository.  At least one base url, or one
           mirror must be given
        :param kwargs: key word arguments to set any normal repository
           attribute
        :return: the new repository that has been added and enabled
        tvariable_convertRXi(RRRRRWR	RR9ReRRRt
mirrorlisttsetupRXtenablegroupstmetadata_expireRt
repo_gpgcheckRRRRRR]Rt
enableRepoR(
RIRtbaseurlsRRtnewrepotvar_converttreplacedRR|((s0/usr/lib/python2.7/site-packages/yum/__init__.pytadd_enable_repoUs<	
&		s/$basearch/$releasevercCs0|rtjdkrtS|dkr;tjd}n|dkrPd}nytj||}Wn?ttfk
r}|j	j
tdt|d}nX|dkrt
S|t||jj7}t|dr||j_n|jj|t|ds |jj|_n||j_tS(slSet a new cache directory.

        :param force: whether to force the cache directory to be
           changed
        :param tmpdir: a temporary directory
        :param reuse: whether the temporary directory can be reused
        :param suffix: suffix to attach to the directory name
        :return: whether the new cache directory is successfully set
        itTMPDIRs/var/tmpsCould not set cachedir: %sRRN(RRR9RtgetenvRtgetCacheDirRRRzRvR
R/RbRRRRRRWR]R&R(RIRttmpdirtreusetsuffixRWR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR&s*	 
cCsx|j|jkrtS|j|r)tS|j|jjkrBtStjj|j|jratS|j|rttStS(sreturns True if pkg1 can update pkg2, False if not. 
           This only checks if it can be an update it does not check if
           it is obsoleting or anything else.(	RRbRRFR,RCRRR9(RItpkg1tpkg2((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR6scCsm|jjd|jjd}x1|jjD] }||j7}|d7}q2W|jjd|dS(Nsconfig-mainRs
sconfig-repos(RRRtdumpR]R^(RItmyreposR[((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRscCs|jjdd||S(sCallback to call a plugin hook for pkg.verify().

        :param verify_package: a conduit for the callback
        :return: *verify_package*
        tverify_package(R;R(RIR((s0/usr/lib/python2.7/site-packages/yum/__init__.pytverify_plugins_cbsc
Cs[|jjrD|r,|jjtddStjtdn|sdtjd}t	j
ddd|\}}tj|d}nt
|d}||_d	|jjd
td}|d	|jj7}|jjdkr|d7}nd|d	t|jjd
7}x@|jjD]/}|d|jt|j|jjf7}q,W|dd|jjf7}|d	t|jj7}x'|jjD]}||j7}qWy|j ||j!Wnvt"t#fk
rV}	d|_|r.|jjtd|t$|	fqWtjtd|t$|	fnXdS(sSave out a transaction to a .yumtx file to be loaded later.

        :param filename: the name of the file to save the transaction
           in.  If *filename* is not given, a name will be generated
        :param auto: whether to output errors to the logger, rather
           than raising exceptions
        :raises: :class:`yum.Errors.YumBaseError` if there are errors
           saving the transaction
        s>Dependencies not solved. Will not save unresolved transaction.Nsyum_save_tx.%ss%Y-%m-%d.%H-%M.Rs.yumtxtprefixRs%s
Ris1
is	%s:%s:%s
s%s:%s
Rs&Could not save transaction file %s: %s(%Rt_unresolvedMembersRzRvR
RRRtstrftimettempfiletmkstempRtfdopenRRtRFRR9Rt
getTsFlagsRoRR"R]R^RR`RRRRt_dumpR RRRR/(
RIR#RRR'RRR/RR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs<
	
!-
	)cCsyt|dj}Wn&ttfk
rA}t|d
fSX|sXtdd
fS|ddkr|ddkr|dd!}q|dd	!}nd
|fS(s* Load the file into a simple data format. R/sFile is empty.is
saved_tx:
ishistory addon-info
iiiN(Rt	readlinesRRR/RR
(RIR#RR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt
_load_ts_data	sc!
Csf|j|}|dd&k	rEtjtd||dfn|d}|d&krj|jj}n|d&kr|jj}n|d&kr|jj}n|rt	}n|dj
}|t|jj
dt	dkrAtd}|r|td7}|jjt|qA|td7}tj|nyt|dj
}Wn4ttfk
r}	td}tj|nX|jj|t|d	j
}
g}d
|
}d&}
xk|d
|!D]\}|j
jd}|r+|ddkr+d
|d|d	f}
qn|j|qWt||j
}|d}d}t}d&}t}x||D]}|j}|jdr3|r|jj|||jjkr|r|jjj|qnt}|jddj
jd\}}t|j
}t|j
jd}y_|tkrd|j |}n=|t!kr|j"|}ntd|}tj|Wnftjk
r
}	t	}tdt||f}|stj|q0t	}|jj|q3X|d7}t#j$|}||_%qn|j
}|jdd\}}|j&}|d'kr|j
j'}|dkrt(||tqT|dkrTt(||t	qTn|dkrt(||t|j
ng|dkr|j)j*|jdn?|d(krx0|j
jdD]}|jd \}}yO|d!kr|j t|jd}n|j"t|jd}WnHtjk
r}	td"t||f}|jj|t	}q7Xt+||}|j|t(|||q7Wn5|d#kr>x&|jdD]}|jd\}} |jd \}}yO|d!kr|j t|jd}n|j"t|jd}WnHtjk
r}	td"t||f}|jj|t	}q;Xt+||}|j|| ft(|||q;Wnt(|||j
|rt	}qqW|jj|||jjkr|jjj|n||krt	}n|rtd$}|rt	}|td%7}|jj|q|td7}tj|nt,|j|kr5d&}
n|
d&k	rY||
|f|j_-n|jj.S()s,Load a transaction from a .yumtx file.

        :param filename: the name of the file to load the transaction
           from
        :param ignorerpm: whether to ignore starting rpmdb version mismatch.
        :param ignoremissing: whether to ignore that there may be
           transaction members missing
        :param ignorenewrpm: whether to ignore ending rpmdb version mismatch.
        :return: the members of the loaded transaction
        :raises: :class:`yum.Errors.YumBaseError` if there are problems
           loading the transaction
        is/Could not access/read saved transaction %s : %siRs/rpmdb ver mismatched saved transaction version,s ignoring, as requested.s
 aborting.s+cannot find tsflags or tsflags not integer.iiRRs%s:%ssmbr:RRHs(Found txmbr in unknown current state: %ss$Could not find txmbr: %s in state %stisDepRtfalseRRRlR*R&t
downgraded_byRRDRJR2RGRs(Could not find txmbr: %s from origin: %sRFsCTransaction members, relations are missing or ts has been modified,s- ignoring, as requested. You must redepsolve!N(R"s	reinstall(s
updated_bysobsoleted_byR$s
downgradessupdatess	obsoletess
depends_on(/R!RRRR
Rtloadts_ignorerpmtloadts_ignorenewrpmtloadts_ignoremissingR9RRRFRRzRvRRRRtsetFlagsRReRbtrstripR4RRRR'RRBRRDRRtTransactionMembert
current_statetlstripRRRlRRR"RR(!RIR#t	ignorerpmt
ignoremissingtignorenewrpmRtrpmvRRRtnumreposR]trindext
future_rpmdbvR/R[tnumpkgstpkgstarttpkgcounttpkgprobtcurpkgt
missinganyR7RcR+RR
R.tpkgspectorigintcurlistRRH((s0/usr/lib/python2.7/site-packages/yum/__init__.pytload_tss&
	
%

(
		!"

!"

		c
Cst}t}g|jjdtD]}|j^q(}i}x!|jjD]}t||<qSWx,|D]$}x|jD]
}|j	j
dddkrt||<qn||krqn|j|||rqnt}	x&|j
D]}
|
|krqqqW|	sd|j|jfGH|jd|}xP|D]E}|jd||j|krz|j|jn|j|qBWqqWqnW|jjtjdt|dS(	stake the set of pkgs being removed and remove any pkgs which are:
           1. not required anymore
           2. marked as a 'dep' in the 'reason' in the yumdb. RRRR4s6---> Marking %s to be removed - no longer needed by %sRs+Found and removing %s unneeded dependenciesN(RRRRRRFRR9trequired_packagesRRRbt_has_needed_revdepstrequiring_packagesRR'R'ReRR{RRRR"(
RItfound_leavestcheckedtttbeingremovedtokay_to_removeRRtrequiredtstill_neededt	requiringRR((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRs8		+



cCs||s-|jjtjtd|tS|jjtjtd|i}x!|jjD]}t||<qbWx|D]}t||<q}Wg}|j	|x|r|d}||s<||s|jjtjtd|t||<tS|j
jdddkrM|jjtjtd||t||<t||<tSxo|jD]d\}}	}
|j
j||	|
jrWt||<t||<|jjtjtd|tSqWWxm|j|jD][}|j
j|dd
jrt||<t||<|jjtjtd|tSqWt||<nt}|j}
x/|
D]'}||sU|j	|t}PqUqUW|r|jqqW|jjtjtd	|tS(Ns2%s has been visited already and cannot be removed.sExamining revdeps of %siRRR4s*%s has revdep %s which was user-installed.s*%s is needed by a package to be installed.s!%s has no user-installed revdeps.(NNN(R{RRRER
R9RFRRbReRRRWRtgetNewRequiresRRR!RR@tpop(RIRRDtok_to_removetvisitedRtstackR8tprovntprovftprovevrR7tall_leaves_visitedtleavestleaf((s0/usr/lib/python2.7/site-packages/yum/__init__.pyR?'s^


	



"









(RKRLRMRJRRRRR9R;R<RRRRRRRRRRRRRRR!RbR R+R.R-R>R@R?R]RaR\RRRRRtpropertyR]RHRRFRRRRRRRtupinfoRqRRRRRR!R"R#R
RRRR1R
R8RRRIRmRRR9R5R7tYUM_PID_FILERRtstaticmethodRRRR<RAR~RRRYRRRRRRRRRRRRRRRR8R>RFRTRaRjRkRnRRRRRRRRRR$RRRRRRRRRRRRRRRRRRR9R"R%R*R
R'RYRZRReRORdR0RRRRRRRRRRRRRRRRRRRR&R6RRRR!R=RR?(((s0/usr/lib/python2.7/site-packages/yum/__init__.pyRes	+	
	
			}	Y						
	
	*	:				0				M	#	 	
	
																																											n	
				
								C		 	.	7		'	1	?	*						
	
					 		&	#(	l	#		!+I'			%		&	H	F															UU=		K	:	N_i

	\#			3
	:	#				3		3((((kRMRtos.pathRRsR	R%R.R!RRRRxtlogging.configRRRhtyum.i18nRRR
R
RRRRRRRtrpmUtils.updatesRCt
rpmUtils.archRRRRtrpmUtils.miscutilsRtrpmUtils.transactionRRR]RRRRRRRUturlgrabber.grabberRRturlgrabber.progressRtpackageSackRRRRfR;RRRtyum.historytyum.fssnapshotsR R!tyum.igroupsRRtsimplefilterRR9R#R$R%R&R'R(R)t	constantstyum.rpmtransR+R,R-R.R/tyum.drpmR0R1RRZR2R3t__version__RRRRRRRMR5RNRYRgRe(((s0/usr/lib/python2.7/site-packages/yum/__init__.pyt<module>s			"
.

OHA YOOOO