MINI SHELL

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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/usr/lib/python2.4/site-packages/yum/plugins.pyc
m
ODc@sdkZdkZdkZdkZdkTdkZdkZdkZdZdZ	dZ
e	e
fZhdd<dd<d	d
<dd
<dd
<dd<dd<dd<dd<dd<dd<dd<Zei
ZdefdYZdfdYZdfdYZdfdYZdefd YZdefd!YZd
efd"YZdefd#YZd
efd$YZdefd%YZdefd&YZd'Zd(ZdS()N(t*s2.2iitconfigtConfigPluginConduittinittInitPluginConduittpredownloadtDownloadPluginConduittpostdownloadtprereposetuptPreRepoSetupPluginConduitt
postreposetuptPostRepoSetupPluginConduittcloset
PluginConduittpretranstMainPluginConduitt	posttranstexcludet
preresolvetDepsolvePluginConduittpostresolvet
PluginYumExitcBstZdZRS(s3Used by plugins to signal that yum should stop
    (t__name__t
__module__t__doc__(((t//usr/lib/python2.4/site-packages/yum/plugins.pyRost
YumPluginscBs\tZdZeedZdZdZdZdZdZ	dZ
dZRS(	s(
    Manager class for Yum plugins.
    cCsx||_||_||_d|_|p
t}n|i|h|_	h|_
ti|i
d|i
ddS(sInitialise the instance.

        @param base: The
        @param searchpath: A list of paths to look for plugin modules.
        @param optparser: The OptionParser instance for this run (optional).
            Use to allow plugins to extend command line options.
        @param types: A sequence specifying the types of plugins to load.
            This should be sequnce containing one or more of the TYPE_...
            constants. If None (the default), all plugins will be loaded.
        RRN(NN(t
searchpathtselftbaset	optparsertNonetcmdlinettypest	ALL_TYPESt_importpluginstoptstcmdlinestatexittregistertrun(RRRRR!((Rt__init__xs
				

		cKsti|d}|djotd|nt|}xg|i|D]X\}}|iidd||f|i
|\}}||||i||qMWdS(s5Run all plugin functions for the given slot.
        sunknown slot name "%s"is$Running "%s" handler for "%s" pluginN(tSLOT_TO_CONDUITtgettslotnameRt
conduitclst
ValueErrortevalRt_pluginfuncstmodnametfuncRtlogt_pluginst_tconftkwargs(RR,R7R-R6R1R2R5((RR(s
cCsh|_h|_xtD]}g|i|<qWxY|iD]N}tii	|pq:nx+t
i
d|D]}|i||qnWq:WdS(s/Load plugins matching the given types.
        s%s/*.pyN(RR4R0tSLOTStslotRtdirtostpathtisdirtglobt
modulefilet_loadpluginR!(RR!R9R?R:((RR#s		
cCs7tii|\}
}	|	idd}	|i|	}|p#t	i
|ddtt	io|i
idd|	dSnti|	|
g\}}}ti|	|||}t|dptid	|	ntt|ip#tid
|	|itfnt|dt}t|t t!fp
|f}nt"|djodSnx#|D]}
|
|jodSqnqnW|i
id
d|	|i%i&|	p||f|i%|	<ntid|	xOt'D]G}|d}t||o'|i*|i+|	t||fqqWdS(sYAttempt to import a plugin module and register the hook methods it
        uses.
        s.pyitmaintenabledis"%s" plugin is disabledNtrequires_api_versions0Plugin "%s" doesn't specify required API versions1Plugin "%s" requires API %s. Supported API is %s.tplugin_typeiisLoading "%s" pluginsFTwo or more plugins with the name "%s" exist in the plugin search patht_hook(,R;R<tsplitR?R:R1Rt_getpluginconfR6Rt	getOptiontFalset
BoolOptionRR3timptfind_moduletfptpathnametdescriptiontload_moduletmodulethasattrtErrorstConfigErrortapiveroktAPI_VERSIONRCtgetattrR"tplugintypest
isinstancetlistttupletlent
plugintypeR!R4thas_keyR8R9tfuncnameR0tappend(RR?R!RQRXR6R9RMROR1R]R_RNR:((RR@s@#


cCstiid|d}yti}|i|Wnht	i
j
o(}ti
d|t|fn3tj
o&}|iidt|dSnX|S(sParse the plugin specific configuration file and return a
        IncludingConfigParser instance representing it. Returns None if there
        was an error reading or parsing the configuration file.
        s/etc/yum/pluginconf.ds.confsCouldn't parse %s: %siN(R;R<tjoinR1tconffilenameRtIncludingConfigParsertparsertreadtConfigParsertErrorteRSRTtstrtIOErrorRRR3R(RR1RhRdRb((RRGs#	cCsD|ii|otid|n|||f|i|<dS(sCalled from plugins to register a new config file option.

        @param name: Name of the new option.
        @param valuetype: Option type (PLUG_OPT_BOOL, PLUG_OPT_STRING ...)
        @param where: Where the option should be available in the config file.
            (PLUG_OPT_WHERE_MAIN, PLUG_OPT_WHERE_REPO, ...)
        @param default: Default value for the option if not set by the user.
        sHPlugin option conflict: an option named "%s" has already been registeredN(	RR$R^tnameRSRTt	valuetypetwheretdefault(RRkRlRmRn((Rtregisteroptsc
	Cs>htti<tti<tti<tti<}xo|iiD]^\}	\}}}|ttfjo6ti|id|	|||}t||	|qRqRWx|D]{}xr|iiD]a\}	\}}}|ttfjo9ti|i|i|	|||}|i|	|qqWqWdS(sParse any configuration options registered by plugins

        @param conf: the yumconf instance holding Yum's global options
        @param repos: a list of all repository objects
        RAN(tPLUG_OPT_STRINGRtOptiontPLUG_OPT_INTt	IntOptiont
PLUG_OPT_BOOLRJtPLUG_OPT_FLOATtFloatOptionttype2optRR$t	iteritemsRktvtypeRmRntPLUG_OPT_WHERE_MAINtPLUG_OPT_WHERE_ALLRHR6tcfgtvaltsetattrtrepostrepotPLUG_OPT_WHERE_REPOtidtset(
RR6RRyRwR}RnRmRRk((Rt	parseoptss B

cCs||f|_dS(sLSet the parsed command line options so that plugins can access them
        N(R$tcommandsRR (RR$R((Rt
setCmdLine1s(RRRRR)R(R#R@RGRoRR(((RRss			8			tDummyYumPluginscBs tZdZdZdZRS(s
    This class provides basic emulation of the YumPlugins class. It exists so
    that calls to plugins.run() don't fail if plugins aren't in use.
    cOsdS(N((RtargsR7((RR(<scOsdS(N((RRR7((RR?s(RRRR(R(((RR7s	cBsntZdZdZdZdZdZdZddZ	ddZ
dd	Zdd
ZRS(NcCs||_||_||_dS(N(tparentRt_parentRt_baseR6t_conf(RRRR6((RR)Cs		cCs|ii||dS(N(RRR3tleveltmsg(RRR((RtinfoHscCs|ii||dS(N(RRterrorlogRR(RRR((RterrorKscCs9|id||iiiodSn|iiSdS(Nii(RRRRR6t	assumeyestuserconfirm(RR((RtpromptYNNscCsdk}|iS(N(tyumt__version__(RR((Rt
getYumVersionUs	cCs
|iiS(sReturn the optparse.OptionParser instance for this execution of Yum

        In the "config" and "init" slots a plugin may add extra options to this
        instance to extend the command line options that Yum exposes.

        In all other slots a plugin may only read the OptionParser instance.
        Any modification of the instance at this point will have no effect. 
        
        See the getCmdLine() method for details on how to retrieve the parsed
        values of command line options.

        @return: the global optparse.OptionParser instance used by Yum. May be
            None if an OptionParser isn't in use.
        N(RRR(R((RtgetOptParserYscCs"ti|i|||tiS(s4Read a string value from the plugin's own configuration file

        @param section: Configuration file section to read.
        @param opt: Option name to read.
        @param default: Value to read if option is missing.
        @return: String option value read, or default if option was missing.
        N(RRHRRtsectiontoptRnRq(RRRRn((Rt
confStringjscCs"ti|i|||tiS(sZRead an integer value from the plugin's own configuration file

        @param section: Configuration file section to read.
        @param opt: Option name to read.
        @param default: Value to read if option is missing.
        @return: Integer option value read, or default if option was missing or
            could not be parsed.
        N(RRHRRRRRnRs(RRRRn((RtconfIntuscCs"ti|i|||tiS(sURead a float value from the plugin's own configuration file

        @param section: Configuration file section to read.
        @param opt: Option name to read.
        @param default: Value to read if option is missing.
        @return: Float option value read, or default if option was missing or
            could not be parsed.
        N(RRHRRRRRnRv(RRRRn((Rt	confFloatscCs"ti|i|||tiS(sYRead a boolean value from the plugin's own configuration file

        @param section: Configuration file section to read.
        @param opt: Option name to read.
        @param default: Value to read if option is missing.
        @return: Boolean option value read, or default if option was missing or
            could not be parsed.
        N(RRHRRRRRnRJ(RRRRn((RtconfBools(
RRR)RRRRRRRRRR(((RR
Bs						cBstZdZRS(NcOs|ii||dS(sjRegister a yum configuration file option.

        Arguments are as for YumPlugins.registeropt().
        N(RRRoRR7(RRR7((RtregisterOpts(RRR(((RRscBstZdZdZRS(NcCs
|iiS(N(RRR6(R((RtgetConfscCs
|iiS(stReturn Yum's container object for all configured repositories.

        @return: Yum's RepoStorage instance
        N(RRR(R((RtgetReposs(RRRR(((RRs	cBstZdZdZRS(NcCs
|iiS(s{Return parsed command line options.

        @return: (options, commands) as returned by OptionParser.parse_args()
        N(RRR (R((Rt
getCmdLinescCs$|ii|ii|iiS(sReturn a representation of local RPM database. This allows querying
        of installed packages.

        @return: rpmUtils.RpmDBHolder instance
        N(RRt	doTsSetuptdoRpmDBSetuptrpmdb(R((RtgetRpmDBs

(RRRR(((RR	s	cBstZdZRS(NcCs|ii|iiS(sMReturn group information.

        @return: yum.comps.Comps instance
        N(RRtdoGroupSetuptcomps(R((Rt	getGroupss
(RRR(((RRscBs&tZddZdZdZRS(NcCs,ti||||||_||_	dS(N(
RR)RRRR6tpkglistt_pkglistterrorst_errors(RRRR6RR((RR)s	cCs|iS(sYReturn a list of package objects representing packages to be
        downloaded.
        N(RR(R((RtgetDownloadPackagesscCs|iphSn|iS(sReturn a dictionary of download errors. 
        
        The returned dictionary is indexed by package object. Each element is a
        list of strings describing the error.
        N(RR(R((Rt	getErrorss
(RRRR)RR(((RRs	cBs/tZddZdZdZdZRS(NcCs-|o
|i}nd}|iii|S(N(RRtargRRRtpkgSacktreturnPackages(RRR((RtgetPackagess
cCs|ii|S(s
Retrieve a package object from the packages loaded by Yum using
        nevra information 
        
        @param nevra: A tuple holding (name, epoch, version, release, arch)
            for a package
        @return: A PackageObject instance (or subclass)
        N(RRtgetPackageObjecttnevra(RR((RtgetPackageByNevrascCs|iii|dS(N(RRRt
delPackagetpo(RR((RRscCs
|iiS(N(RRttsInfo(R((Rt	getTsInfos(RRRRRRR(((RRs	
	cBstZdgdZRS(NcCs,ti||||||_||_	dS(N(
RR)RRRR6trescodet
resultcodetrestringtresultstring(RRRR6RR((RR)s	(RRRR)(((RRscCs+|id\}}t|t|fS(Nt.(tapiverRFtmajtmintint(RRR((RtparseverscCsVt|}t|}|d|djodSn|d|djodSndS(s<Return true if API version "a" supports API version "b"
    iiN(Rtatb(RR((RRUs(R;R>RKR&t	constantsRfRRSRVt	TYPE_COREtTYPE_INTERFACER"R*tkeysR8t	ExceptionRRRR
RRR	RRRRRRU(RRRSR"R&RRRR*RRURKR8RRR	R>RRRfRRR
RVR;R((Rt?s4							>rW

	

Anon7 - 2021