ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/yum/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/yum/config.pyc

�
8M�bc@s�dZeZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZy@ddl
mZddlmZmZmZddlmZWnek
r�eZnXesddlmZmZmZddlmZnddlZddlZddlZddlZddlmZmZddlZeZ eZ!eZ"d	Z#d
Z$dZ%dZ&gZ'd
e(fd��YZ)d�Z*de)fd��YZ+de)fd��YZ,de,fd��YZ-de+fd��YZ.de+fd��YZ/de)fd��YZ0de0fd��YZ1de)fd��YZ2d e)fd!��YZ3d"e)fd#��YZ4d$e)fd%��YZ5d&e5fd'��YZ6d(e)fd)��YZ7d*e7fd+��YZ8d,e(fd-��YZ9d.e9fd/��YZ:d0e:fd1��YZ;d2e9fd3��YZ<d4e9fd5��YZ=d6�Z>dd7�Z@d8�ZAd9d:�ZBd;�ZCd<�ZDd=�ZEd>�ZFdd?�ZGdd@�ZHdS(As2
Configuration parser and default values for yum.
i����N(tConfigPreProcessort
varReplace(t	INIConfig(tNoSectionErrort
NoOptionErrortParsingError(tRawConfigParser(tConfigParser(tget_uuidtread_in_items_from_dot_dirtbesttpriorityitobjectstOptioncBs\eZdZd	ed�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Z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|j�t|_|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||jd�S(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|t�r]y|j|�}Wq]tk
rY}td|j|t|�f��q]Xnt||j|�dS(s�Called 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|j��dS(s�Initialise 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.pyttostring�sN(
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.pytInherit�s		t
ListOptioncBs/eZdZded�Zd�Zd�ZRS(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.pyR�s	cCs�|jdd�}|jdd�}g}x[|j�D]M}|jd�rw|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.pyR�s
cCs
dj|�S(s�Convert 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.pyR4�s	t	UrlOptioncBs2eZdZdd	ed�Zd�Zd�ZRS(
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.pyR�s	cCs�|j�}|j�dkr:|jr+dStd��ntj|�\}}}}}}||jkr�td|j�|f��n|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.pyR�s	!cCsbt|j�dkrdSt|j�dkr9|jdSddj|jd �|jdfSdS(s;Return a user friendly list of the allowed schemes
        itemptyis%s or %ss, i����N(tlenRGRA(R((s./usr/lib/python2.7/site-packages/yum/config.pyRM�s
N(RCRDsfileRF(R-R.R/RRRRRM(((s./usr/lib/python2.7/site-packages/yum/config.pyRB�s
	tProxyOptioncBseZdZd�ZRS(s4 Just like URLOption but accept "libproxy" too.
    cCs,|j�j�dkrdStj||�S(Ntlibproxy(RJRKRBR(Rtproxy((s./usr/lib/python2.7/site-packages/yum/config.pyR�s(R-R.R/R(((s./usr/lib/python2.7/site-packages/yum/config.pyRV�st
UrlListOptioncBs)eZdZdded�Zd�ZRS(	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.pyRscCs�g}|jdd�}|jdd�}gtj|�D]}|jdd�^q:}g}xU|D]M}|jd�r�|jdd�}|jt|��qen|j|�qeWxBtt|�j	dj
|��D]}|j|jj	|��q�W|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.pyRY�stWildListOptioncBseZdZd�ZRS(suAn option containing a list of strings that supports shell-style
    wildcard matching in membership test operations.cCs8dtfd��Y}tt|�j|�}||�S(NtWildListcBseZd�ZRS(cs-t�t�stSt�fd�|D��S(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)eZdZdddd�Zd�ZRS(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	cCs�yt|�}Wn%ttfk
r7}td��nX|jdk	re||jkretd��n|jdk	r�||jkr�td��n|S(s�Parse 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,eZdZddddd�Zd�ZRS(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
d6dd6dd6dd6Zd�ZRS(s�An 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!td��n|dks9|dkr=dS|dj�r�|d }|dj�}|jj|d
�}|s�td|��q�n|}d}yt|�}Wn%ttfk
r�}td��nX|dkr�td	��nt	||�S(s�Parse 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-1tneveri����sunknown unit '%s's
invalid valueis!seconds value may not be negativeN(
RURtisalphaRKtMULTStgetRtfloatRmRl(RR+tntunittmultR$((s./usr/lib/python2.7/site-packages/yum/config.pyRls&
ii�Qi(R-R.R/RxR(((s./usr/lib/python2.7/site-packages/yum/config.pyRr^s"t
BoolOptioncBs eZdZd�Zd�ZRS(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,tStd��dS(s�Parse 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(RR�R�(R�syesR�(RKRR0R(RR+((s./usr/lib/python2.7/site-packages/yum/config.pyR�s
cCs|r
dSdSdS(s�Convert 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*
        R�RN((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	tFloatOptioncBseZdZd�ZRS(s-An option representing a numeric float value.cCs>yt|j��SWn#ttfk
r9td��nXdS(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.pyR�s(R-R.R/R(((s./usr/lib/python2.7/site-packages/yum/config.pyR��stSelectionOptioncBs)eZdZddid�Zd�ZRS(sFHandles string values where only specific values are
    allowed.
    cCs,tt|�j|�||_||_dS(N(R5R�Rt_allowedt_mapper(RRtallowedtmapper((s./usr/lib/python2.7/site-packages/yum/config.pyR�s	cCsE||jkr|j|}n||jkrAtd|��n|S(s�Parse 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(R�R�R(RR+((s./usr/lib/python2.7/site-packages/yum/config.pyR�s
N((R-R.R/RRR(((s./usr/lib/python2.7/site-packages/yum/config.pyR��stCaselessSelectionOptioncBseZdZd�ZRS(svMainly for compatibility with :class:`BoolOption`, works like
    :class:`SelectionOption` but lowers input case.
    cCstt|�j|j��S(s�Parse 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
        (R5R�RRK(RR+((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��stBytesOptioncBs2eZdZidd6dd6dd6Zd�ZRS(	svAn option representing a value in bytes. The value may be given
    in bytes, kilobytes, megabytes, or gigabytes.
    itkRutgcCs�t|�dkr!td��n|dj�r||d }|dj�}|jj|d�}|s�td|��q�n|}d}yt|�}Wn!tk
r�td|��nX|dkr�td��nt||�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 specifiedi����sunknown 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.pyR�s"

iii@(R-R.R/RxR(((s./usr/lib/python2.7/site-packages/yum/config.pyR��s
tThrottleOptioncBseZdZd�ZRS(sjAn option representing a bandwidth throttle value. See
    :func:`parse` for acceptable input values.
    cCs�t|�dkr!td��n|ddkr�|d }yt|�}Wn!tk
rntd|��nX|dks�|dkr�td��n|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 specifiedi����t%scouldn't convert '%s' to numberiidspercentage is out of rangegY@N(RURRzR�R(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.pyR�st
BaseConfigcBs�eZdZd�Zd�Zdd�Zed�Ze	e�Zd�Z
e	e
�Z
d�Zd�Zddd�Z
dd	�Zd
�ZRS(
sgBase class for storing configuration definitions. Subclass when
    creating your own definitions.
    cCsCd|_x3|j�D]%}|j|�}|j||�qWdS(N(Rt_sectiontiterkeyst	optionobjR((RR'toption((s./usr/lib/python2.7/site-packages/yum/config.pyRAs	cCs[g}|jd|j�x1|j�D]#\}}|jd||f�q'Wdj|�S(Ns[%s]s%s: %rs
(R=R�t	iteritemsRA(RR\R'R#((s./usr/lib/python2.7/site-packages/yum/config.pyt__str__Hs
cCs�||_||_|j|�r9t|j|��}n	t�}x�|j�D]|}|j|�}d}||kr�|j||�}n!|r�|j	r�t
||�}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(tcfgR�thas_sectiontsettoptionsR�R�RRyRRR"(RtparsertsectiontparenttoptsR'R�R#((s./usr/lib/python2.7/site-packages/yum/config.pytpopulateOs				cCs<t||d�}t|t�r%|S|r4t�ndSdS(s�Return 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.pyR�ls	cCs|j|dt�dk	S(s�Return 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
        R�N(R�RR(R�R'((s./usr/lib/python2.7/site-packages/yum/config.pytisoption�sccs2x+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.pyR��sccs/x(|j�D]}|t||�fVq
WdS(s�Yield (name, value) pairs for every option in the
        instance. The value returned is the parsed, validated option
        value.
        N(R�R(RR'((s./usr/lib/python2.7/site-packages/yum/config.pyR��sc	Cs�|dkr6|jdkr*td��n|j}n|jj|�}x~|j�D]p\}}|j|�}|dks�||ks�|j|ks�||krU|jj|||j	|��qUqUW|jj
|�dS(s�Write 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(RR�RR�R�R�R�RR�R,twrite(RtfileobjR�talwayst
cfgOptionsR'R#R�((s./usr/lib/python2.7/site-packages/yum/config.pyR��s3&cCs0tjdt�t||�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(RR�R((s./usr/lib/python2.7/site-packages/yum/config.pytgetConfigOption�s
		
cCsFtjdt�t||�r2t|||�ntjd|�dS(s�Set 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(R�R�R�R�R"tErrorstConfigError(RR�R#((s./usr/lib/python2.7/site-packages/yum/config.pytsetConfigOption�s
	N((R-R.R/RR�RR�R0R�tclassmethodR�R�R�R�R�R�(((s./usr/lib/python2.7/site-packages/yum/config.pyR�<s						tStartupConfcBs�eZdZeddd�Zeddd�Zeddg�Zed�Z	ed�Z
ee�Z
ed	d
g�Zedg�Zee�Ze�Zed�Zed
�Zed�Zee�Zee�ZRS(s�Configuration 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.
    ii����i
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.pyR��s 	tYumConfcBs�eZdZedddg�Zeddd�Zee�Z	e
d�Zee�Zee�Z
e
d�Zed	d
g�Ze�Ze�Ze
e�Zededdlde�Ze
�Ze
�Ze
�Ze
�Zedddddddddddd d!g
�Zeedd"dd#d$g�Zeddddd%d d!g�Ze e!�Z"e�Z#e
�Z$ee�Z%ee�Z&ee�Z'ee�Z(ee�Z)ee�Z*ee�Z+ee�Z,ee-�Z.ee/�Z0ee-�Z1ee2�Z3ee�Z4ee�Z5ee�Z6ee�Z7ee�Z8ee�Z9ee�Z:ee�Z;ed&dg�Z<e=e>dm�Z?ee�Z@eAd*�ZBed�ZCeDd�ZEeFd�ZGeHd+dnd/id,d06d-d16�ZIeddd�ZJee�ZKed"dd2d3d4�ZLed5ddd3d6�ZMed6dd�ZNe=d7do�ZOePdq�ZQe=d=dr�ZRePdt�ZSee�ZTe�ZUee�ZVee�ZWedBg�ZXe=dCdu�ZYe=eZdv�Z[e
dF�Z\e=dGdwd/i
dHdI6dHdJ6dHdK6dHdL6d>dM6d>dN6d>d#6d>dO6dGdP6dGdQ6�Z]e
dR�Z^e
dS�Z_e
dT�Z`e
dU�Zae
dV�Zbe
dW�Zce
dX�Zde
dY�Zee
dT�Zfe
dV�Zge
dT�Zhe
dR�Zie
dT�Zje
dR�ZkedZd[g�Zle
�Zmee�Zne
�Zoe
�Zpee�Zqee�Zred\d]g�Zse
d^�Zted_d`e�Zuee�Zvee�Zwee�Zxee�Zyee�Zzee�Z{ee�Z|ee�Z}e=dadxd/idcdd6dad6�Z~ee�Zee�Z�ee�Z�ede�Z�ed6dded3d6�Z�edfd`e�Z�e=dgdy�Z�ed6ddg�Z�ee�Z�ee�Z�ee�Z�e=d#dz�Z�gZ�d{Z�dk�Z�RS(|s�Configuration 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>@R�tipv4tipv6twhateverR�t4t6i�Rki�iKidtalltnonetpackagess
lazy:packagesi<isread-only:presentRvsread-only:futuresread-only:pastisgroup:smalltsqlitetxmlR
sVhttps://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yumtautoR�tonR�R�R�toffR�R�tttysif-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?cCs�d}d}x�t|�D]�}|jd
�r4qn||krFqntt||�tj�rgqnt||�}|r�t|�tt�td�fkr�d}nt|�tjkr�d
j	|�}n|d||f}qW|S(s�Return a string representing the values of all the
        configuration options.

        :return: a string representing the values of all the
           configuration options
        s[main]
R�tuidtyumvartprogress_objtfailure_objtdisable_excludestconfig_file_ageR�t_iR8s,
   s%s = %s
(scfgsuidsyumvarR�R�sdisable_excludessconfig_file_agesconfig_file_path(
R�R;RRttypest
MethodTypettypeRtListTypeRA(Rtoutputt
excluded_varstattrtres((s./usr/lib/python2.7/site-packages/yum/config.pytdump�s"+	(shttpsftpshttpsR�R�R�R�(R�RR�(R�R�R�(R�R�salls
lazy:packagesii`T(sneversread-only:futuresread-only:presentsread-only:pastii�Q(R�R�(R
sall(R�sneversalways(ssingle-user-commandsR�scommands(sbroken-setupssnapshot-failuresanyR�(RR�N(�R-R.R/RotretriesRgtrecentR~R0t
reset_niceR
tcachedirt	keepcachet	usercachetlogfileR4treposdirR�texcludet__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_typesR�t__group_command_default__t
group_commandtupgrade_group_objects_upgradeR�ttimeouttminrateR�t	bandwidthR�tthrottleR�t
ip_resolvetmax_connectionstftp_disable_epsvtdeltarpmtdeltarpm_percentagetdeltarpm_metadata_percentagethttp_cachingRrtmetadata_expiretmetadata_expire_filtertmirrorlist_expiretrpm_check_debugR�tquery_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.pyR��s$																					

		tRepoConfcBs�eZdZe�Zd�Ze�Zee	j
�Z
ee	j�Ze�Z
e�Ze�Ze�Ze�Ze�Ze�Ze�Zee	j�Zee	j�Zee	j�Zee	j�Zee	j�Zee	j�Zee	j�Zee	j�Zee	j�Zee	j �Z ee	j!�Z!ee	j"�Z"ee	j#�Z#ee	j$�Z$ee	j%�Z%ee	j&�Z&e'd
dddd�Z)ee	j*�Z*ee	j+�Z+ee	j,�Z,ee	j-�Z-ee	j.�Z.ee	j/�Z/ee	j0�Z0ee	j1�Z1e'd�Z2ee	j3�Z3ee	j4�Z4ee	j5�Z5ee	j6�Z6ee	j7�Z7e8e9�Z:e8e;�Z<ee	j=�Z=ee	j>�Z>e'ddddd	�Z?RS(s4Option definitions for repository INI file sections.ccsf|j}t|t�s$t�}n|sI|jttj|���nx|jD]}|VqSWdS(s7Yield the names of all defined options in the instance.N(t_RepoConf__cached_keysRRoR�tupdateReR�R�(RtckR'((s./usr/lib/python2.7/site-packages/yum/config.pyR��s	RjiRkidi�iPiicN(@R-R.R/R�RpR�R
R'R3R�RR�RYtbaseurlRBt
mirrorlisttmetalinktmediaidtgpgkeytgpgcakeyR4R�tincludepkgsRXRRR�RRRRRRR"R*R+R,R)R-RgRR1R2R/R3R4R5R6R:R;tcostRORPRQRRRSR~Rtskip_if_unavailableR0tasyncRNRjtcompare_providers_priority(((s./usr/lib/python2.7/site-packages/yum/config.pyRo�sd											tVersionGroupConfcBs#eZdZe�Zee�ZRS(s&Option definitions for version groups.(R-R.R/R4tpkglistR~Rtrun_with_packages(((s./usr/lib/python2.7/site-packages/yum/config.pyR~s	cCs�y|d}tj|�}Wntk
r6g}nXx�|D]�}tjj||�r`q>ny=t||�j�}|r�|ddkr�|d }nWnttfk
r�q>nX|||<q>WdS(Ns/etc/yum/vars/i����s
(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|d�x3|jD](}|ddks�tj
d��q�q�W||_|dkrt|j|j�}n||_d|j|jf}	t|	�|_|S(s�Parse 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: %stmainiR�s(All plugin search paths must be absolutes
%s/%s/uuidN(R�R�RR�RRt
_getEnvVarR�t_varsR�treadfpRR�R�R�R�t_parserRt
_getsysverR�R�R�Rtuuid(
t
configfileR�R�tstartupconfR�t
confpp_objR�R$R�tuuidfile((s./usr/lib/python2.7/site-packages/yum/config.pytreadStartupConfig2s2									csX|j��jd|j��jd|j��jd|j��jd|j�t�}|j|jd�|j	|_
�fd�}tjj
|jkr�t�|j�nxdD]}|||�q�W�|_d
|_d
|_d
|_|j|_tjj|j�r3tj|j�d|_n	d
|_|j|_|j|_|S(s�Parse Yum's main configuration file

    :param startupconf: :class:`StartupConf` instance as returned by readStartupConfig()
    :return: Populated :class:`YumConf` instance
    R�tarchR�R�R�csQt||�}|j|}|jdd�}t|��}t|||�dS(Ns//R�(RR�R9RR"(tyumconfR�R�tir_path(R�(s./usr/lib/python2.7/site-packages/yum/config.pyt_apply_installroot{s

R�R�R�ii(scachedirslogfiles
persistdirN(R�t
setdefaultR�R�R�R�R�R�R�R�RnR�R�RR�R�R�tcacheRtprogess_objR�R�R�texistststatR�R�R�(R�R�R�R�((R�s./usr/lib/python2.7/site-packages/yum/config.pytreadMainConfigcs0
		
					s/etc/yum/version-groups.confcCs�t�}t|�}y|j|�Wn&tk
rN}tjd|��nXi}x5|j�D]'}t�||<||j||�qbW|S(s�Parse the configuration file for version groups.
    
    :param configfile: the configuration file to read
    :return: a dictionary containing the parsed options
    sParsing file failed: %s(	RRR�RR�R�tsectionsR~R�(R�R�R�R$tretR�((s./usr/lib/python2.7/site-packages/yum/config.pytreadVersionGroupsConfig�s	
cCsAy|j||�}Wnttfk
r3|jSX|j|�S(s�Convenience 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(tconfR�R'R�Rn((s./usr/lib/python2.7/site-packages/yum/config.pyt	getOption�s
cCs\i}xOtdd�D]>}d|}tjj|d�}|r|||j�<qqW|S(s�Return variable replacements from the environment variables YUM0 to YUM9

    The result is intended to be used with parser.varReplace()
    ii
sYUM%dR8(trangeR�tenvironRyRK(R�tnumtenvRn((s./usr/lib/python2.7/site-packages/yum/config.pyR��s
cCs	tjjd|�}|jtjtjB�y7x0|D](}|jd|�}|j�r7Pq7q7WWn�t	k
r�}t
jdkr�t|d�r�t
jdt|j���q�t
jdt|���nt
jdt|���n/tjk
r}t
jdt|���nX|j�dkr5d}n�y|j�}Wn tk
rgt
jd��nX|d	}|ttd
�j|�}|ttd�|}	tjj|	�}	|ttd�|}
|	d
kr�|
r�|d|kr�|
}q�n~~~|S(s�Calculate 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)
    R�tprovidesitmessagesError: is$releasevers:Error: rpmdb failed release provides. Try: rpm --rebuilddbtversiontRPMTAG_PROVIDENAMEtRPMTAG_PROVIDEFLAGStRPMTAG_PROVIDEVERSIONtEQR'(trpmUtilsttransactiontinitReadOnlyTransactiontpushVSFlagsR�t_RPMVSF_NOSIGNATURESt_RPMVSF_NODIGESTStdbMatchtcountRmtsyst
hexversionR�R�tYumBaseErrorR!R�terrortnextt
StopIterationRtindext	miscutilstflagToString(R�R�ttstdistroverpkg_provtidxR$R�thdrR�tflagtver((s./usr/lib/python2.7/site-packages/yum/config.pyR��sB
	

cCs�ts
dSt|d�s$|jr(dSytt|j��}WndSX|j}|j|jkr�xC|jj�D]+}t	||j
�|jkrw|}PqwqwWdSn||fS(Ntrepofile(t
_use_iniparseRR�R�RR�Rt	_sectionstkeysRR�(trepotinit
section_idtsect((s./usr/lib/python2.7/site-packages/yum/config.pyt_readRawRepoFiles 	c
Cs?ts
dSt|�\}}|jj|j�}x�|j�D]�\}}|dkr\q>n|dk	rz||krzq>n|j|�}|j|�}|||kr�|t	||||j
�kr�|||}n||kr�|j|kr�q>n||||<q>Wt|j
d�}	|	jt|��|	j�dS(s�Write 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(R�R�R�R�RR�RR�R,RR�RRER�R�R!tclose(
R�tonlyR�R�R�R'R#R�tovaluetfp((s./usr/lib/python2.7/site-packages/yum/config.pytwriteRawRepoFiles( cCsptt|��}|}||jkrbx8|jj�D]$}	t|	|�|kr7|	}q7q7Wn||�}
x�|�D]�\}}|dkr�qxn|dk	r�||kr�qxn||�}
|
j|�}|||kr
|t||||�kr
|||}n||
kr.|
j|kr.qxn||||<qxWt|d�}|j	t
|��|j�dS(s@
    From writeRawRepoFile, but so we can alter [main] too.
    R�N(RR�R�R�RRR,RRER�R!R�(tfilenameR�R�t
cfgoptionsR]R�R�R�tosection_idR�R�R'R#R�R�R�((s./usr/lib/python2.7/site-packages/yum/config.pyt_writeRawConfigFileDs.(IR/R0R�R�R�R�R�R&RLR[R�RRtiniparseRtiniparse.compatRRRRRtImportErrorRtrpmUtils.transactionR�trpmUtils.miscutilsR�R�tmiscRR	RaRRRR<RRR&R
tobjectR
R3R4RBRVRYR_RgRoRrR~R�R�R�R�R�R�R�R�RoR~R�RR�R�R�R�R�R�R�R�R�(((s./usr/lib/python2.7/site-packages/yum/config.pyt<module>s~

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

Zerion Mini Shell 1.0