MINI MINI MANI MO

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


[c@sdZeZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZy@ddl
mZddlmZmZmZddlmZWnek
reZnXesddlmZmZmZddlmZnddlZddlZddlZddlZddlmZmZddlZeZ eZ!eZ"d	Z#d
Z$dZ%dZ&gZ'd
e(fdYZ)dZ*de)fdYZ+de)fdYZ,de,fdYZ-de+fdYZ.de+fdYZ/de)fdYZ0de0fdYZ1de)fdYZ2d e)fd!YZ3d"e)fd#YZ4d$e)fd%YZ5d&e5fd'YZ6d(e)fd)YZ7d*e7fd+YZ8d,e(fd-YZ9d.e9fd/YZ:d0e:fd1YZ;d2e9fd3YZ<d4e9fd5YZ=d6Z>dd7Z@d8ZAd9d:ZBd;ZCd<ZDd=ZEd>ZFdd?ZGdd@ZHdS(As2
Configuration parser and default values for yum.
iN(tConfigPreProcessort
varReplace(t	INIConfig(tNoSectionErrort
NoOptionErrortParsingError(tRawConfigParser(tConfigParser(tget_uuidtread_in_items_from_dot_dirtbesttpriorityitobjectstOptioncBs\eZdZd	edZdZdZdZdZ	dZ
dZdZRS(
s
    This class handles a single Yum configuration file option. Create
    subclasses for each type of supported configuration option.
    Python descriptor foo (__get__ and __set__) is used to make option
    definition easy and concise.
    cCs8|jt|_|r+|j|}n||_dS(N(t_setattrnametFalsetinherittparsetdefault(tselfRt
parse_default((s./usr/lib/python2.7/site-packages/yum/config.pyt__init__As

	cCsdt||_dS(smCalculate the internal attribute name used to store option state in
        configuration instances.
        s__opt%dN(tidt	_attrname(R((s./usr/lib/python2.7/site-packages/yum/config.pyRHscCs#|dkr|St||jdS(sBCalled when the option is read (via the descriptor protocol). 

        :param obj: The configuration instance to modify.
        :param objtype: The type of the config instance (not used).
        :return: The parsed option value or the default value if the value
           wasn't set in the configuration file.
        N(tNonetgetattrR(Rtobjtobjtype((s./usr/lib/python2.7/site-packages/yum/config.pyt__get__Ns	cCstt|tr]y|j|}Wq]tk
rY}td|j|t|fq]Xnt||j|dS(sCalled when the option is set (via the descriptor protocol). 

        :param obj: The configuration instance to modify.
        :param value: The value to set the option to.
        sError parsing "%s = %r": %sN(t
isinstancet
basestringRt
ValueErrort_optnametstrtsetattrR(RRtvaluete((s./usr/lib/python2.7/site-packages/yum/config.pyt__set__\scCs,||_t||jtj|jdS(sInitialise the option for a config instance. 
        This must be called before the option can be set or retrieved. 

        :param obj: :class:`BaseConfig` (or subclass) instance.
        :param name: Name of the option.
        N(R R"RtcopyR(RRtname((s./usr/lib/python2.7/site-packages/yum/config.pytsetupls	cCstj|}|j|S(s|Return a safe copy of this :class:`Option` instance.

        :return: a safe copy of this :class:`Option` instance
        (R&R(Rtnew((s./usr/lib/python2.7/site-packages/yum/config.pytclonevs
cCs|S(sParse the string value to the :class:`Option`'s native value.

        :param s: raw string value to parse
        :return: validated native value
        :raise: ValueError if there was a problem parsing the string.
           Subclasses should override this
        ((Rts((s./usr/lib/python2.7/site-packages/yum/config.pyRscCs
t|S(s
Convert the :class:`Option`'s native value to a string value.  This
        does the opposite of the :func:`parse` method above.
        Subclasses should override this.

        :param value: native option value
        :return: string representation of input
        (R!(RR#((s./usr/lib/python2.7/site-packages/yum/config.pyttostringsN(
t__name__t
__module__t__doc__RRRRRR%R(R*RR,(((s./usr/lib/python2.7/site-packages/yum/config.pyR
9s				
			
cCs|j}t|_|S(sClone an :class:`Option` instance for the purposes of inheritance. The returned
    instance has all the same properties as the input :class:`Option` and shares items
    such as the default value. Use this to avoid redefinition of reused
    options.

    :param option_obj: :class:`Option` instance to inherit
    :return: New :class:`Option` instance inherited from the input
    (R*tTrueR(t
option_objt
new_option((s./usr/lib/python2.7/site-packages/yum/config.pytInherits		t
ListOptioncBs/eZdZdedZdZdZRS(s'An option containing a list of strings.cCs2|dkrg}ntt|j||dS(N(RtsuperR4R(RRR((s./usr/lib/python2.7/site-packages/yum/config.pyRs	cCs|jdd}|jdd}g}x[|jD]M}|jdrw|jdd}|jt|q7n|j|q7W|S(sConvert a string from the config file to a workable list, parses
        globdir: paths as foo.d-style dirs.

        :param s: The string to be converted to a list. Commas and
           whitespace are used as separators for the list
        :return: *s* converted to a list
        s
t t,sglob:t(treplacetsplitt
startswithtextendR	tappend(RR+tresultstitemtthisglob((s./usr/lib/python2.7/site-packages/yum/config.pyRs
cCs
dj|S(sConvert a list of to a string value.  This does the
        opposite of the :func:`parse` method above.

        :param value: a list of values
        :return: string representation of input
        s
 (tjoin(RR#((s./usr/lib/python2.7/site-packages/yum/config.pyR,sN(R-R.R/RRRRR,(((s./usr/lib/python2.7/site-packages/yum/config.pyR4s	t	UrlOptioncBs2eZdZdd	edZdZdZRS(
sMThis option handles lists of URLs with validation of the URL
    scheme.
    thttptftptfilethttpscCs,tt|j|||_||_dS(N(R5RBRtschemest
allow_none(RRRGRH((s./usr/lib/python2.7/site-packages/yum/config.pyRs	cCs|j}|jdkr:|jr+dStdntj|\}}}}}}||jkrtd|j|fn|S(sParse a url to make sure that it is valid, and in a scheme
        that can be used.

        :param url: a string containing the url to parse
        :return: *url* if it is valid
        :raises: :class:`ValueError` if there is an error parsing the url
        t_none_s"_none_" is not a valid valuesURL must be %s not "%s"(tstriptlowerRHRturlparseRGt_schemelist(RturlR+tbtptqtfto((s./usr/lib/python2.7/site-packages/yum/config.pyRs	!cCsbt|jdkrdSt|jdkr9|jdSddj|jd |jdfSdS(s;Return a user friendly list of the allowed schemes
        itemptyis%s or %ss, iN(tlenRGRA(R((s./usr/lib/python2.7/site-packages/yum/config.pyRMs
N(RCRDsfileRF(R-R.R/RRRRRM(((s./usr/lib/python2.7/site-packages/yum/config.pyRBs
	tProxyOptioncBseZdZdZRS(s4 Just like URLOption but accept "libproxy" too.
    cCs,|jjdkrdStj||S(Ntlibproxy(RJRKRBR(Rtproxy((s./usr/lib/python2.7/site-packages/yum/config.pyRs(R-R.R/R(((s./usr/lib/python2.7/site-packages/yum/config.pyRVst
UrlListOptioncBs)eZdZddedZdZRS(	sMOption for handling lists of URLs with validation of the URL
    scheme.
    RCRDRERFcCs/tt|j||td||_dS(NRG(R5RYRRBt
_urloption(RRRGR((s./usr/lib/python2.7/site-packages/yum/config.pyRscCsg}|jdd}|jdd}gtj|D]}|jdd^q:}g}xU|D]M}|jdr|jdd}|jt|qen|j|qeWxBtt|j	dj
|D]}|j|jj	|qW|S(s,Parse a string containing multiple urls into a list, and
        ensure that they are in a scheme that can be used.

        :param s: the string to parse
        :return: a list of strings containing the urls in *s*
        :raises: :class:`ValueError` if there is an error parsing the urls
        s
R6R7s%20sglob:R8(R9tshlexR:R;R<R	R=R5RYRRARZ(RR+toutR?titemsttmpR@RN((s./usr/lib/python2.7/site-packages/yum/config.pyRs.
(N(shttpsftpsfileshttps(R-R.R/RRRR(((s./usr/lib/python2.7/site-packages/yum/config.pyRYstWildListOptioncBseZdZdZRS(suAn option containing a list of strings that supports shell-style
    wildcard matching in membership test operations.cCs8dtfdY}tt|j|}||S(NtWildListcBseZdZRS(cs-ttstStfd|DS(Nc3s!|]}tj|VqdS(N(tfnmatch(t.0RP(R?(s./usr/lib/python2.7/site-packages/yum/config.pys	<genexpr>)s(RRRtany(RR?((R?s./usr/lib/python2.7/site-packages/yum/config.pyt__contains__&s(R-R.Rd(((s./usr/lib/python2.7/site-packages/yum/config.pyR`%s(tlistR5R_R(RR+R`tpatterns((s./usr/lib/python2.7/site-packages/yum/config.pyR$s(R-R.R/R(((s./usr/lib/python2.7/site-packages/yum/config.pyR_ st	IntOptioncBs)eZdZddddZdZRS(s(An option representing an integer value.cCs,tt|j|||_||_dS(N(R5RgRt
_range_mint
_range_max(RRt	range_mint	range_max((s./usr/lib/python2.7/site-packages/yum/config.pyR1s	cCsyt|}Wn%ttfk
r7}tdnX|jdk	re||jkretdn|jdk	r||jkrtdn|S(sParse a string containing an integer.

        :param s: the string to parse
        :return: the integer in *s*
        :raises: :class:`ValueError` if there is an error parsing the
           integer
        sinvalid integer valuesout of range integer valueN(tintRt	TypeErrorRiRRh(RR+tvalR$((s./usr/lib/python2.7/site-packages/yum/config.pyR6sN(R-R.R/RRR(((s./usr/lib/python2.7/site-packages/yum/config.pyRg.stPositiveIntOptioncBs,eZdZdddddZdZRS(sdAn option representing a positive integer value, where 0 can
    have a special representation.
    icCs)tt|j|||||_dS(N(R5RoRt_names0(RRRjRkt
names_of_0((s./usr/lib/python2.7/site-packages/yum/config.pyRLscCs)||jkrdStt|j|S(sParse a string containing a positive integer, where 0 can
           have a special representation.

        :param s: the string to parse
        :return: the integer in *s*
        :raises: :class:`ValueError` if there is an error parsing the
           integer
        i(RpR5RoR(RR+((s./usr/lib/python2.7/site-packages/yum/config.pyRQs	N(R-R.R/RRR(((s./usr/lib/python2.7/site-packages/yum/config.pyRoHs	t
SecondsOptioncBs9eZdZid
d6dd6dd6dd6ZdZRS(sAn option representing an integer value of seconds, or a human
    readable variation specifying days, hours, minutes or seconds
    until something happens. Works like :class:`BytesOption`.  Note
    that due to historical president -1 means "never", so this accepts
    that and allows the word never, too.

    Valid inputs: 100, 1.5m, 90s, 1.2d, 1d, 0xF, 0.1, -1, never.
    Invalid inputs: -10, -0.1, 45.6Z, 1d6h, 1day, 1y.

    Return value will always be an integer
    i<itdthtmiR+cCst|dkr!tdn|dks9|dkr=dS|djr|d }|dj}|jj|d
}|std|qn|}d}yt|}Wn%ttfk
r}tdnX|dkrtd	nt	||S(sParse a string containing an integer value of seconds, or a human
        readable variation specifying days, hours, minutes or seconds
        until something happens. Works like :class:`BytesOption`.  Note
        that due to historical president -1 means "never", so this accepts
        that and allows the word never, too.
    
        Valid inputs: 100, 1.5m, 90s, 1.2d, 1d, 0xF, 0.1, -1, never.
        Invalid inputs: -10, -0.1, 45.6Z, 1d6h, 1day, 1y.
    
        :param s: the string to parse
        :return: an integer representing the number of seconds
           specified by *s*
        :raises: :class:`ValueError` if there is an error parsing the string
        isno value specifieds-1tneverisunknown unit '%s's
invalid valueis!seconds value may not be negativeN(
RURtisalphaRKtMULTStgetRtfloatRmRl(RR+tntunittmultR$((s./usr/lib/python2.7/site-packages/yum/config.pyRls&
iiQi(R-R.R/RxR(((s./usr/lib/python2.7/site-packages/yum/config.pyRr^s"t
BoolOptioncBs eZdZdZdZRS(shAn option representing a boolean value.  The value can be one
    of 0, 1, yes, no, true, or false.
    cCs<|j}|d	krtS|d
kr,tStddS(sParse a string containing a boolean value.  1, yes, and
        true will evaluate to True; and 0, no, and false will evaluate
        to False.  Case is ignored.
        
        :param s: the string containing the boolean value
        :return: the boolean value contained in *s*
        :raises: :class:`ValueError` if there is an error in parsing
           the boolean value
        t0tnotfalset1tyesttruesinvalid boolean valueN(RRR(RsyesR(RKRR0R(RR+((s./usr/lib/python2.7/site-packages/yum/config.pyRs
cCs|r
dSdSdS(sConvert a boolean value to a string value.  This does the
        opposite of the :func:`parse` method above.
        
        :param value: the boolean value to convert
        :return: a string representation of *value*
        RRN((RR#((s./usr/lib/python2.7/site-packages/yum/config.pyR,s(R-R.R/RR,(((s./usr/lib/python2.7/site-packages/yum/config.pyR~s	tFloatOptioncBseZdZdZRS(s-An option representing a numeric float value.cCs>yt|jSWn#ttfk
r9tdnXdS(sParse a string containing a numeric float value.

        :param s: a string containing a numeric float value to parse
        :return: the numeric float value contained in *s*
        :raises: :class:`ValueError` if there is an error parsing
           float value
        sinvalid float valueN(RzRJRRm(RR+((s./usr/lib/python2.7/site-packages/yum/config.pyRs(R-R.R/R(((s./usr/lib/python2.7/site-packages/yum/config.pyRstSelectionOptioncBs)eZdZddidZdZRS(sFHandles string values where only specific values are
    allowed.
    cCs,tt|j|||_||_dS(N(R5RRt_allowedt_mapper(RRtallowedtmapper((s./usr/lib/python2.7/site-packages/yum/config.pyRs	cCsE||jkr|j|}n||jkrAtd|n|S(sParse a string for specific values.

        :param s: the string to parse
        :return: *s* if it contains a valid value
        :raises: :class:`ValueError` if there is an error parsing the values
        s"%s" is not an allowed value(RRR(RR+((s./usr/lib/python2.7/site-packages/yum/config.pyRs
N((R-R.R/RRR(((s./usr/lib/python2.7/site-packages/yum/config.pyRstCaselessSelectionOptioncBseZdZdZRS(svMainly for compatibility with :class:`BoolOption`, works like
    :class:`SelectionOption` but lowers input case.
    cCstt|j|jS(sParse a string for specific values.

        :param s: the string to parse
        :return: *s* if it contains a valid value
        :raises: :class:`ValueError` if there is an error parsing the values
        (R5RRRK(RR+((s./usr/lib/python2.7/site-packages/yum/config.pyRs(R-R.R/R(((s./usr/lib/python2.7/site-packages/yum/config.pyRstBytesOptioncBs2eZdZidd6dd6dd6ZdZRS(	svAn option representing a value in bytes. The value may be given
    in bytes, kilobytes, megabytes, or gigabytes.
    itkRutgcCst|dkr!tdn|djr||d }|dj}|jj|d}|std|qn|}d}yt|}Wn!tk
rtd|nX|dkrtdnt||S(	sFParse a friendly bandwidth option to bytes.  The input
        should be a string containing a (possibly floating point)
        number followed by an optional single character unit. Valid
        units are 'k', 'M', 'G'. Case is ignored. The convention that
        1k = 1024 bytes is used.
       
        Valid inputs: 100, 123M, 45.6k, 12.4G, 100K, 786.3, 0.
        Invalid inputs: -10, -0.1, 45.6L, 123Mb.

        :param s: the string to parse
        :return: the number of bytes represented by *s*
        :raises: :class:`ValueError` if the option can't be parsed
        isno value specifiedisunknown unit '%s'scouldn't convert '%s' to numberisbytes value may not be negativeN(	RURRwRKRxRyRRzRl(RR+R{R|R}((s./usr/lib/python2.7/site-packages/yum/config.pyRs"

iii@(R-R.R/RxR(((s./usr/lib/python2.7/site-packages/yum/config.pyRs
tThrottleOptioncBseZdZdZRS(sjAn option representing a bandwidth throttle value. See
    :func:`parse` for acceptable input values.
    cCst|dkr!tdn|ddkr|d }yt|}Wn!tk
rntd|nX|dks|dkrtdn|d	Stj||Sd
S(s(Get a throttle option. Input may either be a percentage or
        a "friendly bandwidth value" as accepted by the
        :class:`BytesOption`.

        Valid inputs: 100, 50%, 80.5%, 123M, 45.6k, 12.4G, 100K, 786.0, 0.
        Invalid inputs: 100.1%, -4%, -500.

        :param s: the string to parse
        :return: the bandwidth represented by *s*. The return value
           will be an int if a bandwidth value was specified, and a
           float if a percentage was given
        :raises: :class:`ValueError` if input can't be parsed
        isno value specifiedit%scouldn't convert '%s' to numberiidspercentage is out of rangegY@N(RURRzRR(RR+R{((s./usr/lib/python2.7/site-packages/yum/config.pyRs

(R-R.R/R(((s./usr/lib/python2.7/site-packages/yum/config.pyRst
BaseConfigcBseZdZdZdZddZedZe	eZdZ
e	e
Z
dZdZdddZ
dd	Zd
ZRS(
sgBase class for storing configuration definitions. Subclass when
    creating your own definitions.
    cCsCd|_x3|jD]%}|j|}|j||qWdS(N(Rt_sectiontiterkeyst	optionobjR((RR'toption((s./usr/lib/python2.7/site-packages/yum/config.pyRAs	cCs[g}|jd|jx1|jD]#\}}|jd||fq'Wdj|S(Ns[%s]s%s: %rs
(R=Rt	iteritemsRA(RR\R'R#((s./usr/lib/python2.7/site-packages/yum/config.pyt__str__Hs
cCs||_||_|j|r9t|j|}n	t}x|jD]|}|j|}d}||kr|j||}n!|r|j	rt
||}n|dk	rOt|||qOqOWdS(sCSet option values from an INI file section.

        :param parser: :class:`ConfigParser` instance (or subclass)
        :param section: INI file section to read use
        :param parent: Optional parent :class:`BaseConfig` (or
            subclass) instance to use when doing option value
            inheritance
        N(tcfgRthas_sectiontsettoptionsRRRRyRRR"(RtparsertsectiontparenttoptsR'RR#((s./usr/lib/python2.7/site-packages/yum/config.pytpopulateOs				cCs<t||d}t|tr%|S|r4tndSdS(sReturn the :class:`Option` instance for the given name.

        :param cls: the class to return the :class:`Option` instance from
        :param name: the name of the :class:`Option` instance to return
        :param exceptions: defines what action to take if the
           specified :class:`Option` instance does not exist. If *exceptions* is
           True, a :class:`KeyError` will be raised. If *exceptions*
           is False, None will be returned
        :return: the :class:`Option` instance specified by *name*, or None if
           it does not exist and *exceptions* is False
        :raises: :class:`KeyError` if the specified :class:`Option` does not
           exist, and *exceptions* is True
        N(RRRR
tKeyError(tclsR't
exceptionsR((s./usr/lib/python2.7/site-packages/yum/config.pyRls	cCs|j|dtdk	S(sReturn True if the given name refers to a defined option.

        :param cls: the class to find the option in
        :param name: the name of the option to search for
        :return: whether *name* specifies a defined option
        RN(RRR(RR'((s./usr/lib/python2.7/site-packages/yum/config.pytisoptionsccs2x+t|D]}|j|r
|Vq
q
WdS(s7Yield the names of all defined options in the instance.N(tdirR(RR'((s./usr/lib/python2.7/site-packages/yum/config.pyRsccs/x(|jD]}|t||fVq
WdS(sYield (name, value) pairs for every option in the
        instance. The value returned is the parsed, validated option
        value.
        N(RR(RR'((s./usr/lib/python2.7/site-packages/yum/config.pyRsc	Cs|dkr6|jdkr*tdn|j}n|jj|}x~|jD]p\}}|j|}|dks||ks|j|ks||krU|jj|||j	|qUqUW|jj
|dS(sWrite out the configuration to a file-like object.

        :param fileobj: File-like object to write to
        :param section: Section name to use. If not specified, the section name
            used during parsing will be used
        :param always: A sequence of option names to always write out.
            Options not listed here will only be written out if they are at
            non-default values. Set to None to dump out all options
        s!not populated, don't know sectionN(RRRRRRRRRR,twrite(RtfileobjRtalwayst
cfgOptionsR'R#R((s./usr/lib/python2.7/site-packages/yum/config.pyRs3&cCs0tjdtt||r,t||S|S(sCReturn the current value of the given option.

        :param option: string specifying the option to return the
           value of
        :param default: the value to return if the option does not exist
        :return: the value of the option specified by *option*, or
           *default* if it does not exist
        sxgetConfigOption() will go away in a future version of Yum.
Please access option values as attributes or using getattr().(twarningstwarntDeprecationWarningthasattrR(RRR((s./usr/lib/python2.7/site-packages/yum/config.pytgetConfigOptions
		
cCsFtjdtt||r2t|||ntjd|dS(sSet the value of the given option to the given value.

        :param option: string specifying the option to set the value
           of
        :param value: the value to set the option to
        susetConfigOption() will go away in a future version of Yum.
Please set option values as attributes or using setattr().sNo such option %sN(RRRRR"tErrorstConfigError(RRR#((s./usr/lib/python2.7/site-packages/yum/config.pytsetConfigOptions
	N((R-R.R/RRRRR0RtclassmethodRRRRRR(((s./usr/lib/python2.7/site-packages/yum/config.pyR<s						tStartupConfcBseZdZedddZedddZeddgZedZ	edZ
eeZ
ed	d
gZedgZeeZeZedZed
ZedZeeZeeZRS(sConfiguration option definitions for yum.conf's [main] section
    that are required early in the initialisation process or before
    the other [main] options can be parsed.
    iii
issystem-release(releasever)sredhat-releaset/s/etc/yum/yum.confs/usr/share/yum-pluginss/usr/lib/yum-pluginss/etc/yum/pluginconf.dtLOG_USERs/dev/logs/var/lib/yum(R-R.R/Rgt
debuglevelt
errorlevelR4tdistroverpkgR
tinstallroottconfig_file_pathR~Rtpluginst
pluginpathtpluginconfpatht
gaftonmodetsyslog_identtsyslog_facilityt
syslog_devicet
persistdirR0tskip_missing_names_on_installtskip_missing_names_on_update(((s./usr/lib/python2.7/site-packages/yum/config.pyRs 	tYumConfcBseZdZedddgZedddZeeZ	e
dZeeZeeZ
e
dZed	d
gZeZeZe
eZededdldeZe
Ze
Ze
Ze
Zedddddddddddd d!g
Zeedd"dd#d$gZeddddd%d d!gZe e!Z"eZ#e
Z$eeZ%eeZ&eeZ'eeZ(eeZ)eeZ*eeZ+eeZ,ee-Z.ee/Z0ee-Z1ee2Z3eeZ4eeZ5eeZ6eeZ7eeZ8eeZ9eeZ:eeZ;ed&dgZ<e=e>dmZ?eeZ@eAd*ZBedZCeDdZEeFdZGeHd+dnd/id,d06d-d16ZIedddZJeeZKed"dd2d3d4ZLed5ddd3d6ZMed6ddZNe=d7doZOePdqZQe=d=drZRePdtZSeeZTeZUeeZVeeZWedBgZXe=dCduZYe=eZdvZ[e
dFZ\e=dGdwd/i
dHdI6dHdJ6dHdK6dHdL6d>dM6d>dN6d>d#6d>dO6dGdP6dGdQ6Z]e
dRZ^e
dSZ_e
dTZ`e
dUZae
dVZbe
dWZce
dXZde
dYZee
dTZfe
dVZge
dTZhe
dRZie
dTZje
dRZkedZd[gZle
ZmeeZne
Zoe
ZpeeZqeeZred\d]gZse
d^Zted_d`eZueeZveeZweeZxeeZyeeZzeeZ{eeZ|eeZ}e=dadxd/idcdd6dad6Z~eeZeeZeeZedeZed6dded3d6Zedfd`eZe=dgdyZed6ddgZeeZeeZeeZe=d#dzZgZd{ZdkZRS(|sConfiguration option definitions for yum.conf's [main] section.

    Note: see also options inherited from :class:`StartupConf`
    i
Rqs	<forever>iRjis/var/cache/yums/var/log/yum.logs/etc/yum/repos.ds/etc/yum.repos.dRRGRCRDRFtsocks4tsocks4atsocks5tsocks5hRHtkernels
kernel-bigmemsinstallonlypkg(kernel)sinstallonlypkg(kernel-module)sinstallonlypkg(vm)skernel-enterprises
kernel-smpskernel-debugskernel-unsupporteds
kernel-sourceskernel-devels
kernel-PAEskernel-PAE-debugiRs<off>skernel-BOOTt	mandatorytcompatRtsimpleg>@Rtipv4tipv6twhateverRt4t6iRkiiKidtalltnonetpackagess
lazy:packagesi<isread-only:presentRvsread-only:futuresread-only:pastisgroup:smalltsqlitetxmlR
sVhttps://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yumtautoRtonRRRtoffRRtttysif-ttytboldsbold,yellowtnormalsbold,redsbold,underlines	bold,bluesdim,cyansbold,underline,greent
releasevertbasearchtyumtrpmtinfos%yum, glob:/etc/yum/protected.d/*.confRssingle-user-commandstuserstcommandstcmdsis0!*/swap !*/lv_swap glob:/etc/yum/fssnap.d/*.confRcsbroken-setupssnapshot-failuret?cCsd}d}xt|D]}|jd
r4qn||krFqntt||tjrgqnt||}|rt|tttdfkrd}nt|tjkrd
j	|}n|d||f}qW|S(sReturn a string representing the values of all the
        configuration options.

        :return: a string representing the values of all the
           configuration options
        s[main]
Rtuidtyumvartprogress_objtfailure_objtdisable_excludestconfig_file_ageRt_iR8s,
   s%s = %s
(scfgsuidsyumvarRRsdisable_excludessconfig_file_agesconfig_file_path(
RR;RRttypest
MethodTypettypeRtListTypeRA(Rtoutputt
excluded_varstattrtres((s./usr/lib/python2.7/site-packages/yum/config.pytdumps"+	(shttpsftpshttpsRRRR(RRR(RRR(RRsalls
lazy:packagesii`T(sneversread-only:futuresread-only:presentsread-only:pastiiQ(RR(R
sall(Rsneversalways(ssingle-user-commandsRscommands(sbroken-setupssnapshot-failuresanyR(RRN(R-R.R/RotretriesRgtrecentR~R0t
reset_niceR
tcachedirt	keepcachet	usercachetlogfileR4treposdirRtexcludet__main_failovermethod_default__tfailovermethodRVRRXtproxy_usernametproxy_passwordtusernametpasswordtinstallonlypkgst"__main_installonly_limit_default__tinstallonly_limittkernelpkgnamesR_t__exactarchlist_default__t
exactarchlistttsflagstoverride_install_langst	assumeyestassumenotalwayspromptt	exactarchttoleranttdiskspacechecktoverwrite_groupst	keepalivet__pkgs_gpgcheck_default__tgpgcheckt__repo_gpgcheck_default__t
repo_gpgchecktlocalpkg_gpgcheckt__payload_gpgcheck_default__tpayload_gpgcheckt	obsoletestshowdupesfromrepostenabledtremove_leaf_onlytrepopkgsremove_leaf_onlytenablegroupstenable_group_conditionalstgroupremove_leaf_onlytgroup_package_typesRt__group_command_default__t
group_commandtupgrade_group_objects_upgradeRttimeouttminrateRt	bandwidthRtthrottleRt
ip_resolvetmax_connectionstftp_disable_epsvtdeltarpmtdeltarpm_percentagetdeltarpm_metadata_percentagethttp_cachingRrtmetadata_expiretmetadata_expire_filtertmirrorlist_expiretrpm_check_debugRtquery_install_excludestskip_brokentmdpolicytmddownloadpolicyt __main_multilib_policy_default__tmultilib_policytbugtracker_urltcolortcolor_list_installed_oldertcolor_list_installed_newertcolor_list_installed_reinstalltcolor_list_installed_extrat#color_list_installed_running_kerneltcolor_list_available_upgradetcolor_list_available_downgradetcolor_list_available_reinstalltcolor_list_available_installt#color_list_available_running_kerneltcolor_update_installedtcolor_update_localtcolor_update_remotetcolor_search_matchtui_repoid_varst	sslcacertt	sslverifyt
sslclientcerttsslclientkeytssl_check_cert_permissionsthistory_recordthistory_record_packagestrpmverbositytprotected_packagestprotected_multilibtexit_on_locktloadts_ignoremissingtloadts_ignorerpmtloadts_ignorenewrpmt
autosavetstclean_requirements_on_removetupgrade_requirements_on_installthistory_list_viewtrecheck_installed_requirestfssnap_automatic_pretfssnap_automatic_posttfssnap_automatic_keeptfssnap_percentagetfssnap_devicestfssnap_abort_on_errorstdepsolve_loop_limittautocheck_running_kerneltcheck_config_file_agetusr_w_checktshell_exit_statust
_reposlistRt_pristine_cachedirR(((s./usr/lib/python2.7/site-packages/yum/config.pyRs$																					

		tRepoConfcBseZdZeZdZeZee	j
Z
ee	jZeZ
eZeZeZeZeZeZeZee	jZee	jZee	jZee	jZee	jZee	jZee	jZee	jZee	jZee	j Z ee	j!Z!ee	j"Z"ee	j#Z#ee	j$Z$ee	j%Z%ee	j&Z&e'd
ddddZ)ee	j*Z*ee	j+Z+ee	j,Z,ee	j-Z-ee	j.Z.ee	j/Z/ee	j0Z0ee	j1Z1e'dZ2ee	j3Z3ee	j4Z4ee	j5Z5ee	j6Z6ee	j7Z7e8e9Z:e8e;Z<ee	j=Z=ee	j>Z>e'ddddd	Z?RS(s4Option definitions for repository INI file sections.ccsf|j}t|ts$t}n|sI|jttj|nx|jD]}|VqSWdS(s7Yield the names of all defined options in the instance.N(t_RepoConf__cached_keysRRoRtupdateReRR(RtckR'((s./usr/lib/python2.7/site-packages/yum/config.pyRs	RjiRkidiiPiicN(@R-R.R/RRpRR
R'R3RRRRYtbaseurlRBt
mirrorlisttmetalinktmediaidtgpgkeytgpgcakeyR4RtincludepkgsRXRRRRRRRRRR"R*R+R,R)R-RgRR1R2R/R3R4R5R6R:R;tcostRORPRQRRRSR~Rtskip_if_unavailableR0tasyncRNRjtcompare_providers_priority(((s./usr/lib/python2.7/site-packages/yum/config.pyRosd											tVersionGroupConfcBs#eZdZeZeeZRS(s&Option definitions for version groups.(R-R.R/R4tpkglistR~Rtrun_with_packages(((s./usr/lib/python2.7/site-packages/yum/config.pyR~s	cCsy|d}tj|}Wntk
r6g}nXx|D]}tjj||r`q>ny=t||j}|r|ddkr|d }nWnttfk
rq>nX|||<q>WdS(Ns/etc/yum/vars/is
(tostlistdirtOSErrortpathtislinktopentreadlinetIOError(tyumvarstroott
dir_fsvarstfsvarstfsvarRn((s./usr/lib/python2.7/site-packages/yum/config.pyt
_read_yumvars s



c
Cs=|tj_t}||_t}t|}t}t||j||_||_	y|j
|Wn&tk
r}tj
d|nX|j|dx3|jD](}|ddkstj
dqqW||_|dkrt|j|j}n||_d|j|jf}	t|	|_|S(sParse Yum's main configuration file and return a
    :class:`StartupConf` instance.  This is required in order to
    access configuration settings required as Yum starts up.

    :param configfile: the path to yum.conf
    :param root: the base path to use for installation (typically '/')
    :return: A :class:`StartupConf` instance

    :raises: :class:`Errors.ConfigError` if a problem is detected with while parsing.
    sParsing file failed: %stmainiRs(All plugin search paths must be absolutes
%s/%s/uuidN(RRRRRRt
_getEnvVarRt_varsRtreadfpRRRRRt_parserRt
_getsysverRRRRtuuid(
t
configfileRRtstartupconfRt
confpp_objRR$Rtuuidfile((s./usr/lib/python2.7/site-packages/yum/config.pytreadStartupConfig2s2									csX|jjd|jjd|jjd|jjd|jt}|j|jd|j	|_
fd}tjj
|jkrt|jnxdD]}|||qW|_d
|_d
|_d
|_|j|_tjj|jr3tj|jd|_n	d
|_|j|_|j|_|S(sParse Yum's main configuration file

    :param startupconf: :class:`StartupConf` instance as returned by readStartupConfig()
    :return: Populated :class:`YumConf` instance
    RtarchRRRcsQt||}|j|}|jdd}t|}t|||dS(Ns//R(RRR9RR"(tyumconfRRtir_path(R(s./usr/lib/python2.7/site-packages/yum/config.pyt_apply_installroot{s

RRRii(scachedirslogfiles
persistdirN(Rt
setdefaultRRRRRRRRRnRRRRRRtcacheRtprogess_objRRRtexistststatRRR(RRRR((Rs./usr/lib/python2.7/site-packages/yum/config.pytreadMainConfigcs0
		
					s/etc/yum/version-groups.confcCst}t|}y|j|Wn&tk
rN}tjd|nXi}x5|jD]'}t||<||j||qbW|S(sParse the configuration file for version groups.
    
    :param configfile: the configuration file to read
    :return: a dictionary containing the parsed options
    sParsing file failed: %s(	RRRRRRtsectionsR~R(RRRR$tretR((s./usr/lib/python2.7/site-packages/yum/config.pytreadVersionGroupsConfigs	
cCsAy|j||}Wnttfk
r3|jSX|j|S(sConvenience function to retrieve a parsed and converted value from a
    :class:`ConfigParser`.

    :param conf: ConfigParser instance or similar
    :param section: Section name
    :param name: :class:`Option` name
    :param option: :class:`Option` instance to use for conversion
    :return: The parsed value or default if value was not present
    :raises: :class:`ValueError` if the option could not be parsed
    (RyRRRR(tconfRR'RRn((s./usr/lib/python2.7/site-packages/yum/config.pyt	getOptions
cCs\i}xOtddD]>}d|}tjj|d}|r|||j<qqW|S(sReturn variable replacements from the environment variables YUM0 to YUM9

    The result is intended to be used with parser.varReplace()
    ii
sYUM%dR8(trangeRtenvironRyRK(RtnumtenvRn((s./usr/lib/python2.7/site-packages/yum/config.pyRs
cCs	tjjd|}|jtjtjBy7x0|D](}|jd|}|jr7Pq7q7WWnt	k
r}t
jdkrt|drt
jdt|jqt
jdt|nt
jdt|n/tjk
r}t
jdt|nX|jdkr5d}ny|j}Wn tk
rgt
jdnX|d	}|ttd
j|}|ttd|}	tjj|	}	|ttd|}
|	d
kr|
r|d|kr|
}qn~~~|S(sCalculate the release version for the system.

    @param installroot: The value of the installroot option.
    @param distroverpkg: The value of the distroverpkg option.
    @return: The release version as a string (eg. '4' for FC4)
    RtprovidesitmessagesError: is$releasevers:Error: rpmdb failed release provides. Try: rpm --rebuilddbtversiontRPMTAG_PROVIDENAMEtRPMTAG_PROVIDEFLAGStRPMTAG_PROVIDEVERSIONtEQR'(trpmUtilsttransactiontinitReadOnlyTransactiontpushVSFlagsRt_RPMVSF_NOSIGNATURESt_RPMVSF_NODIGESTStdbMatchtcountRmtsyst
hexversionRRtYumBaseErrorR!Rterrortnextt
StopIterationRtindext	miscutilstflagToString(RRttstdistroverpkg_provtidxR$RthdrRtflagtver((s./usr/lib/python2.7/site-packages/yum/config.pyRsB
	

cCsts
dSt|ds$|jr(dSytt|j}WndSX|j}|j|jkrxC|jjD]+}t	||j
|jkrw|}PqwqwWdSn||fS(Ntrepofile(t
_use_iniparseRRRRRRt	_sectionstkeysRR(trepotinit
section_idtsect((s./usr/lib/python2.7/site-packages/yum/config.pyt_readRawRepoFiles 	c
Cs?ts
dSt|\}}|jj|j}x|jD]\}}|dkr\q>n|dk	rz||krzq>n|j|}|j|}|||kr|t	||||j
kr|||}n||kr|j|krq>n||||<q>Wt|j
d}	|	jt||	jdS(sWrite changes in a repo object back to a .repo file.

    :param repo: the Repo Object to write back out
    :param only: list of attributes to work on. If *only* is None, all
       options will be written out   
    Ntw(RRRRRRRRR,RRRRERRR!tclose(
RtonlyRRRR'R#Rtovaluetfp((s./usr/lib/python2.7/site-packages/yum/config.pytwriteRawRepoFiles( cCsptt|}|}||jkrbx8|jjD]$}	t|	||kr7|	}q7q7Wn||}
x|D]\}}|dkrqxn|dk	r||krqxn||}
|
j|}|||kr
|t||||kr
|||}n||
kr.|
j|kr.qxn||||<qxWt|d}|j	t
||jdS(s@
    From writeRawRepoFile, but so we can alter [main] too.
    RN(RRRRRRR,RRERR!R(tfilenameRRt
cfgoptionsR]RRRtosection_idRRR'R#RRR((s./usr/lib/python2.7/site-packages/yum/config.pyt_writeRawConfigFileDs.(IR/R0RRRRRR&RLR[RRRtiniparseRtiniparse.compatRRRRRtImportErrorRtrpmUtils.transactionRtrpmUtils.miscutilsRRtmiscRR	RaRRRR<RRR&R
tobjectR
R3R4RBRVRYR_RgRoRrR~RRRRRRRRRoR~RRRRRRRRRRR(((s./usr/lib/python2.7/site-packages/yum/config.pyt<module>s~

Z	
'-$6#
0"Q	1	>		
	3	(

OHA YOOOO