AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.144.30.196
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/978/cwd/usr/share/yum-cli/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /proc/978/cwd/usr/share/yum-cli/yumcommands.pyc
�
�v_c@s�dZddlZddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
ZddlZddlZddl
Z
ddlZddlmZmZmZmZddlZddlZddlZddlZddlZddlZddlmZddlmZdd	lmZm Z d
�Z!d�Z"d�Z#d
�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*gd�Z+dfd��YZ,de,fd��YZ-de,fd��YZ.de,fd��YZ/dd�Z0d�Z1d �Z2d!e,fd"��YZ3d#e3fd$��YZ4d%e,fd&��YZ5d'e,fd(��YZ6d)e,fd*��YZ7d+e,fd,��YZ8d-e,fd.��YZ9d/e,fd0��YZ:d1e,fd2��YZ;d3e,fd4��YZ<d5e,fd6��YZ=d7e,fd8��YZ>d9e,fd:��YZ?d;e,fd<��YZ@d=e,fd>��YZAd?e,fd@��YZBdAe,fdB��YZCdCe,fdD��YZDdEe,fdF��YZEdGe,fdH��YZFdIe,fdJ��YZGdKe,fdL��YZHdMe,fdN��YZIdOe,fdP��YZJeZKdQe,fdR��YZLdSe,fdT��YZMdUe,fdV��YZNdWe,fdX��YZOdS(Ys<
Classes for subcommands of the yum command line interface.
i����N(t
logginglevels(t_tP_(tmisc(t
utf8_widthtutf8_width_fillt
to_unicodet
exception2msg(t
updateinfo(t
parsePackages(tLibLVMErrort
lvmerr2strcCsj||jkr|j�dS|j|}|jdj|�}|jjtd��|jj|�dS(Nthelps
 Mini usage:
(tyum_cli_commandstusaget_makeOutputtloggertcriticalR(tbasetbasecmdtcmdttxt((s!/usr/share/yum-cli/yumcommands.pyt_err_mini_usage/s

cCs8|jjdkr4|jjtd��tj�ndS(s�Verify that the program is being run by the root user.

    :param base: a :class:`yum.Yumbase` object.
    :raises: :class:`cli.CliError`
    is,You need to be root to perform this command.N(tconftuidRRRtclitCliError(R((s!/usr/share/yum-cli/yumcommands.pytcheckRootUID8scCs�|jr
dS|j�s�xw|jj�D]c}|jsA|jr)|jr)td�}|jj	|�|jj	td�|�t
j�q)q)WndS(s�Verify that there are gpg keys for the enabled repositories in the
    rpm database.

    :param base: a :class:`yum.Yumbase` object.
    :raises: :class:`cli.CliError`
    Ns

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


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

For more information contact your distribution or package provider.
sProblem repository: %s(t_override_sigcheckstgpgKeyChecktrepostlistEnabledtgpgcheckt
repo_gpgchecktgpgkeyRRRRR(Rtrepotmsg((s!/usr/share/yum-cli/yumcommands.pytcheckGPGKeyBs	
	cCsIt|�dkrE|jjtd�|�t||�tj�ndS(s/Verify that *extcmds* contains the name of at least one package for
    *basecmd* to act on.

    :param base: a :class:`yum.Yumbase` object.
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`
    is(Error: Need to pass a list of pkgs to %sN(tlenRRRRRR(RRtextcmds((s!/usr/share/yum-cli/yumcommands.pytcheckPackageArg`s
		
cCsdd}d|krd}nt|�|kr`|jjtd�|�t||�tj�ndS(s0Verify that *extcmds* contains the name of at least two packages for
    *basecmd* to act on.

    :param base: a :class:`yum.Yumbase` object.
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`
    is--is'Error: Need at least two packages to %sN(R&RRRRRR(RRR'tmin_args((s!/usr/share/yum-cli/yumcommands.pytcheckSwapPackageArgos			
cCs�t|�dkrE|jjtd�|�t||�tj�n|jj|ddt	dt	�}|s�|jjtd�|�t||�tj�nt|�dkr�g|D]}|j
�r�|^q�}nt|�dkrJdjg|D]}|j^q��}|jjtd	�||f�t||�tj�n|dj
�s�|jj
|dj�|jjtd
�|dj�ndS(s/Verify that *extcmds* contains the name of at least one package for
    *basecmd* to act on.

    :param base: a :class:`yum.Yumbase` object.
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`
    is/Error: Need to pass a repoid. and command to %sit
name_matchtignore_cases0Error: Need to pass a single valid repoid. to %sis, sAError: Need to pass only a single valid repoid. to %s, passed: %ss'Repo %s has been automatically enabled.N(R&RRRRRRRt	findRepostTruet	isEnabledtjointui_idt
enableRepotidtverbose_loggertinfo(RRR'Rtr((s!/usr/share/yum-cli/yumcommands.pytcheckRepoPackageArg�s.		
"	
(%	
	cCsEt|�dkrA|jjtd��t||�tj�ndS(s�Verify that *extcmds* contains the name of at least one item for
    *basecmd* to act on.  Generally, the items are command-line
    arguments that are not the name of a package, such as a file name
    passed to provides.

    :param base: a :class:`yum.Yumbase` object.
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`
    isError: Need an item to matchN(R&RRRRRR(RRR'((s!/usr/share/yum-cli/yumcommands.pytcheckItemArg�s
cCsEt|�dkrA|jjtd��t||�tj�ndS(s-Verify that *extcmds* contains the name of at least one group for
    *basecmd* to act on.

    :param base: a :class:`yum.Yumbase` object.
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`
    is%Error: Need a group or list of groupsN(R&RRRRRR(RRR'((s!/usr/share/yum-cli/yumcommands.pyt
checkGroupArg�s	
cCs�d}t|�d	krG|jjtd
�dj|��tj�nxM|D]E}||krN|jjtd�|�t||�tj�qNqNWd
S(sLVerify that *extcmds* contains at least one argument, and that all
    arguments in *extcmds* are valid options for clean.

    :param base: a :class:`yum.Yumbase` object
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`
    theaderstpackagestmetadatatdbcachetpluginssexpire-cachetrpmdbtallis#Error: clean requires an option: %ss, s!Error: invalid clean argument: %rN(R:spackagesR<R=R>sexpire-cachesrpmdbsall(R&RRRR0RRR(RRR't
VALID_ARGSR((s!/usr/share/yum-cli/yumcommands.pyt
checkCleanArg�s	

cCs�t|�dkr+|jjtd��n�t|�dkr�|jjtd�|d�tjj|d�s�|jjtd�|d�|j	�t
j�q�n)|jjtd��|j	�t
j�dS(svVerify that the arguments given to 'yum shell' are valid.  yum
    shell can be given either no argument, or exactly one argument,
    which is the name of a file.

    :param base: a :class:`yum.Yumbase` object.
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`
    isNo argument to shellisFilename passed to shell: %ss2File %s given as argument to shell does not exist.s5Error: more than one file given as argument to shell.N(R&R4tdebugRtostpathtisfileRRRRR(RRR'((s!/usr/share/yum-cli/yumcommands.pyt
checkShellArg�s
		
	

cCs�|jj�rdSxE|D]=}|jd�rtjj|�sStjj|�rdSqW|j	|jj�rudSt
d�}|jj|�t
j�dS(sVerify that there is at least one enabled repo.

    :param base: a :class:`yum.Yumbase` object.
    :param basecmd: the name of the command being checked for
    :param extcmds: a list of arguments passed to *basecmd*
    :raises: :class:`cli.CliError`:
    Ns.rpms�There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>(RRtendswithtyumRt
re_remote_urlRDREtexiststpkgSackRRRRR(Rtpossible_local_filestlfileR$((s!/usr/share/yum-cli/yumcommands.pytcheckEnabledRepo�s
!t
YumCommandcBs_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
s�An abstract base class that defines the methods needed by the cli
    to execute a specific command.  Subclasses must override at least
    :func:`getUsage` and :func:`getSummary`.
    cCst|_t|_dS(N(tFalsetdone_command_oncethidden(tself((s!/usr/share/yum-cli/yumcommands.pyt__init__s	cGs2|js%|jjtj||�nt|_dS(sm Output *msg* the first time that this method is called, and do
        nothing on subsequent calls.  This is to prevent duplicate
        messages from being printed for the same command.

        :param base: a :class:`yum.Yumbase` object
        :param msg: the message to be output
        :param *args: additional arguments associated with the message
        N(RRR4R5RtINFO_2R.(RTRR$targs((s!/usr/share/yum-cli/yumcommands.pytdoneCommands		cCsgS(s�Return a list of strings that are the names of the command.
        The command can be called from the command line by using any
        of these names.

        :return: a list containing the names of the command
        ((RT((s!/usr/share/yum-cli/yumcommands.pytgetNames,scCs
t�dS(suReturn a usage string for the command, including arguments.

        :return: a usage string for the command
        N(tNotImplementedError(RT((s!/usr/share/yum-cli/yumcommands.pytgetUsage5scCs
t�dS(szReturn a one line summary of what the command does.

        :return: a one line summary of what the command does
        N(RZ(RT((s!/usr/share/yum-cli/yumcommands.pyt
getSummary<scCsdS(sVerify that various conditions are met so that the command
        can run.

        :param base: a :class:`yum.Yumbase` object.
        :param basecmd: the name of the command being checked for
        :param extcmds: a list of arguments passed to *basecmd*
        N((RTRRR'((s!/usr/share/yum-cli/yumcommands.pytdoCheckCscCsdtd�gfS(s�Execute the command

        :param base: a :class:`yum.Yumbase` object.
        :param basecmd: the name of the command being executed
        :param extcmds: a list of arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        is
Nothing to do(R(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyt	doCommandMscCstS(sEReturn whether a transaction set must be set up before the
        command can run

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (R.(RTRRR'((s!/usr/share/yum-cli/yumcommands.pytneedTs]s	cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        twrite((RTRRR'((s!/usr/share/yum-cli/yumcommands.pytcacheRequirementys(t__name__t
__module__t__doc__RURXRYR[R\R]R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyRPs		
					
		tInstallCommandcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sUA class containing methods needed by the cli to execute the
    install command.
    cCsddddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of
        these names.

        :return: a list containing the names of this command
        tinstalls	install-ns
install-nas
install-nevra((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCs
td�S(sbReturn a usage string for this command.

        :return: a usage string for this command
        s
PACKAGE...(R(RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s,Install a package or packages on your system(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCs5t|�t|�t|||�t||�dS(s�Verify that conditions are met so that this command can run.
        These include that the program is being run by the root user,
        that there are enabled repositories with gpg keys, and that
        this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%R(RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�s


cCs)|j|td��|j|d|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sSetting up Install ProcessR(RXRtinstallPkgs(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^�s(RbRcRdRYR[R\R]R^(((s!/usr/share/yum-cli/yumcommands.pyRe�s					t
UpdateCommandcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sTA class containing methods needed by the cli to execute the
    update command.
    cCs
ddgS(s�Return a list containing the names of this command.  This
        command can by called from the command line by using any of
        these names.

        :return: a list containing the names of this command
        tupdates	update-to((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCs
td�S(sbReturn a usage string for this command.

        :return: a usage string for this command
        s[PACKAGE...](R(RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s+Update a package or packages on your system(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCs%t|�t|�t||�dS(svVerify that conditions are met so that this command can run.
        These include that there are enabled repositories with gpg
        keys, and that this command is being run by the root user.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�s	

cCsB|j|td��|j|d|dk�}tj|�|S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sSetting up Update Processt	update_tos	update-to(RXRt
updatePkgsRt
remove_txmbrs(RTRRR'tret((s!/usr/share/yum-cli/yumcommands.pyR^�s
(RbRcRdRYR[R\R]R^(((s!/usr/share/yum-cli/yumcommands.pyRh�s					
tDistroSyncCommandcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sZA class containing methods needed by the cli to execute the
    distro-synch command.
    cCs
dddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        sdistribution-synchronizationsdistro-synctdistupgrade((RT((s!/usr/share/yum-cli/yumcommands.pyRYscCs
td�S(sbReturn a usage string for this command.

        :return: a usage string for this command
        s[PACKAGE...](R(RT((s!/usr/share/yum-cli/yumcommands.pyR[
scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s?Synchronize installed packages to the latest available versions(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\scCs%t|�t|�t||�dS(suVerify that conditions are met so that this command can run.
        These include that the program is being run by the root user,
        and that there are enabled repositories with gpg keys.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]s	

cCsB|j|td��d|j_|j|�}tj|�|S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        s/Setting up Distribution Synchronization Processi(RXRRt	obsoletestdistroSyncPkgsRRl(RTRRR'Rm((s!/usr/share/yum-cli/yumcommands.pyR^%s

(RbRcRdRYR[R\R]R^(((s!/usr/share/yum-cli/yumcommands.pyRn�s				
tcCs�t|j�dt|j�t|�}t|j�dt|j�}t|j�}|jdkr�|t|j�d7}nxWd|fd|fd|ffD]4\}}||j|d�|||cd7<q�WdS(sl Get the length of each pkg's column. Add that to data.
        This "knows" about simpleList and printVer. it0tnatvertridiN(R&tnametarchtversiontreleasetui_from_repotepocht
setdefault(tdatatpkgtindentRtRuRvtdtv((s!/usr/share/yum-cli/yumcommands.pyt_add_pkg_simple_list_lens9s* .cCsiid6id6id6}xJ|j|j|j|j|jfD]$}x|D]}t||�qMWq@Wt|j�dkr�x:|jD],\}}t||�t||dd�q�Wn|d|d|dg}|j	|dd	�}|d|d	|d
fS(sA Work out the dynamic size of the columns to pass to fmtColumns. RtRuRviR�t itremainder_columniis    (
t	installedt	availabletextrastupdatestrecentR�R&RptobsoletesTuplestcalcColumns(RtyplR~tlstRtnpkgtopkgtcolumns((s!/usr/share/yum-cli/yumcommands.pyt_list_cmd_calc_columnsEs

cCsU|s
|St||�\}}}t||�}g|D]}||kr9|^q9S(sE Do an extra exclude for installed packages that match the cmd line. (R	tset(tpkgstcmdline_excludestetmtutexcludedtpo((s!/usr/share/yum-cli/yumcommands.pyt_cmdline_excludeUs
tInfoCommandcBsGeZdZd�Zd�Zd�Zdd�Zd�Zd�Z	RS(sRA class containing methods needed by the cli to execute the
    info command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        R5((RT((s!/usr/share/yum-cli/yumcommands.pyRYbscCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        sO[PACKAGE|all|available|installed|updates|distro-extras|extras|obsoletes|recent]((RT((s!/usr/share/yum-cli/yumcommands.pyR[jscCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s4Display details about a package or group of packages(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\qsc Cs�|r&|ddkr&tj|�n
tj|�tr�|jjd}|dkrt|rt|ddkrtt}n|j|d|d|�}i}i}i}	d}
|d	kr�t	||�}
n|r7|j
r7x`|j|j|j
D]D}|j|jf}||ks#|j||�r�|||<q�q�Wn|r�|jr�xR|jD]D}|j|jf}||ks�|j||�rP|||<qPqPWn|r�|jr�xQt|j�D]=}
|
jjdkr�|
j�r�|
|	|
j|
jf<q�q�Wn|jj}|jj}|jj}|jj}|jj}|jjrat|j
|j �|_
n|j!|j
t"d
�|d|d|
d
i|d6|d6|d6|d6|d6�}|jj#}|jj$}|jj%}|jj&}|jj'}|j!|jt"d�|d|d|
d
i|d6|d6|d6|d6|d6�}|j!|j(t"d�|d|
�}|jj)}|jj*}|j!|jt"d�|d|	d|
d
i|d6|d6�}t+|j,�dkr=|d	kr=ddg}t"d�GHxit|j-dt.j/d��D]"}|j0|dd|
d|�qWn$|j!|j,t"d�|d|
�}|j!|j1t"d�|d|
�}t+|�r�|dr�|dr�|dr�|dr�|dr�|dr�dt"d�gfSdgfSdS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        iR�RptboldR5R�tinstalled_availabletrepoidtlistsInstalled Packagesthighlight_naR�thighlight_modest>t<tkernt=snot insAvailable PackagessExtra PackagessUpdated PackagesRrsObsoleting PackagestkeysRecently Added PackagesisNo matching Packages to listN(supdatess	obsoletes(2Rtexclude_updatestexclude_allR.ttermtMODERQtreturnPkgListstNoneR�R�thidden_availabletreinstall_availablet
old_availableRwRxtverGTR�thidden_installedR�tsortedR#R3tverifyLocalPkgRt#color_list_installed_running_kerneltcolor_list_installed_oldertcolor_list_installed_newertcolor_list_installed_reinstalltcolor_list_installed_extratquery_install_excludesR�R�tlistPkgsRt#color_list_available_running_kerneltcolor_list_available_upgradetcolor_list_available_downgradetcolor_list_available_reinstalltcolor_list_available_installR�tcolor_update_localtcolor_update_remoteR&RpR�toperatort
itemgettertupdatesObsoletesListR�( RTRRR'R�t	highlightR�tupdate_pkgst	inst_pkgst
local_pkgsR�RR�R�R�tcliotclintclirtclietriptclautcladtclartclaitraptreptcultcurtruptroptobtuptrrap((s!/usr/share/yum-cli/yumcommands.pyR^xs�
"		
 		!<cCs$t|�r |ddkr tStS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        iR�(R&RQR.(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_�s	cCsDt|�r |ddkr dSt|�r@|ddkr@d	Sd
S(
sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        iR�Rpsread-only:futureR�s
distro-extrasR�R�sread-only:pastsread-only:present(supdatess	obsoletes(s	installeds
distro-extrassextrassrecent(R&(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa�s
N(
RbRcRdRYR[R\R�R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyR�]s			x	tListCommandcBs eZdZd�Zd�ZRS(sRA class containing methods needed by the cli to execute the
    list command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        R�((RT((s!/usr/share/yum-cli/yumcommands.pyRYscCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s$List a package or groups of packages(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\s(RbRcRdRYR\(((s!/usr/share/yum-cli/yumcommands.pyR�s	tEraseCommandcBsMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(sSA class containing methods needed by the cli to execute the
    erase command.
    cCs(ddddddddd	d
ddgS(
s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        terasetremovet
autoremoveserase-nserase-naserase-nevrasautoremove-ns
autoremove-nasautoremove-nevrasremove-ns	remove-nasremove-nevra((RT((s!/usr/share/yum-cli/yumcommands.pyRY)s			cCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s
PACKAGE...((RT((s!/usr/share/yum-cli/yumcommands.pyR[4scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s-Remove a package or packages from your system(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\;scCs.t|�|dkrdSt|||�dS(s�Verify that conditions are met so that this command can
        run.  These include that the program is being run by the root
        user, and that this command is called with appropriate
        arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        R�N(RR((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]Bs

cCs�t}|jd�r�t|j_|td�}|s�t}g}xZt|jj��D]@}d|j	krtqYn|j	j
dkr�qYn|j|�qYWq�n|j|t
d��|j|d|d|�}|S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        R�tautotreasontdepsSetting up Remove ProcesstposR(RQt
startswithR.Rtclean_requirements_on_removeR&R�R?treturnLeafNodest
yumdb_infoR�tappendRXRt	erasePkgs(RTRRR'R�RRm((s!/usr/share/yum-cli/yumcommands.pyR^Qs cCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_ws	cCstS(sdReturn whether a transaction set for removal only must be
        set up before this command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a remove-only transaction set is needed, False otherwise
        (R.(RTRRR'((s!/usr/share/yum-cli/yumcommands.pytneedTsRemove�s	(
RbRcRdRYR[R\R]R^R_R�(((s!/usr/share/yum-cli/yumcommands.pyR�#s					&	t
GroupsCommandcBs�eZdZidd6dd6dd6dd6dd	6d
d6Zd�Zd
�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
RS(s; Single sub-command interface for most groups interaction. R�t	grouplistRftgroupinstallRitgroupupdateR�tgroupremovet
grouperaseR5t	groupinfocCsddg|jj�S(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tgroupstgroup(tdirect_commandstkeys(RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s7[list|info|summary|install|upgrade|remove|mark] [GROUP]((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s'Display, or use, the groups information(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCs}|j|td��|jdd�y|j�WnBtjjk
r]dtd�gfStjjk
rx}�nXdS(NsSetting up Group Processtdosackiis!No Groups on which to run command(RXRtdoRepoSetuptdoGroupSetupRItErrorstGroupsErrortYumBaseError(RTRR�((s!/usr/share/yum-cli/yumcommands.pyt_grp_setup_doCommand�scCs�||jkr|j|}n#|r<|d}|d}nd}|d
kru|rud||df}|d}nidd6d	d
6dd6}|j||�}||fS(Niitsummarytmarktunmarks%s-%stupgradeRiR�R�smark-removes
mark-erase(smarkR�(R�tget(RTRR'Rtremap((s!/usr/share/yum-cli/yumcommands.pyt_grp_cmd�s




cCsY|j||�\}}t|�g}g}|jjdkrOd}d }n|d!ksg||krzt|||�n|d"ks�||kr�t|�n|d#kr�t|�ntd$�}|jjdkr�|j|�n||kr |j	j
td�dj|��t
j�n|jjdkr5n tjjtjj|jj��s�|j	j
td��|j	j
td��n�tjtjj|jj�tj�s�|j	j
td��t
j�n�tjj|jj�s|j	j
td��|j	j
td��n=tj|jjtj�sU|j	j
td��t
j�ndS(%sYVerify that conditions are met so that this command can run.
        The exact conditions checked will vary depending on the
        subcommand that is being called.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        tobjectssmark-installsmark-removesmark-blacklists
mark-packagessmark-packages-forcesunmark-packagessmark-packages-syncsmark-packages-sync-forcesmark-groupssmark-groups-forces
unmark-groupssmark-groups-syncsmark-groups-sync-forcesmark-convertsmark-convert-whitelistsmark-convert-blacklistRfR�R5RR�R�s$Invalid groups sub-command, use: %s.s, s"There is no installed groups file.s0Maybe run: yum groups mark convert (see man yum)s(You don't have access to the groups DBs.s'You don't have access to the groups DB.N(
smark-installsmark-removesmark-blacklists
mark-packagessmark-packages-forcesunmark-packagessmark-packages-syncsmark-packages-sync-forcesmark-groupssmark-groups-forces
unmark-groupssmark-groups-syncsmark-groups-sync-force(smark-installsmark-removesmark-convertsmark-convert-whitelistsmark-convert-blacklistsmark-blacklists
mark-packagessmark-packages-forcesunmark-packagessmark-packages-syncsmark-packages-sync-forcesmark-groupssmark-groups-forces
unmark-groupssmark-groups-syncsmark-groups-sync-force(sinstallsremovesinfo(sinstallsremovesupgrade(sinstallsupgrade(slistsinfosremovesinstallsupgradessummary(RRORt
group_commandR9RR%R�RiRRRR0RRRDRERKtdirnametigroupstfilenametaccesstR_OK(RTRRR'Rt	ocmds_allt	ocmds_argtcmds((s!/usr/share/yum-cli/yumcommands.pyR]�sb	
	

$'cs2
|j||�\�}|j���dkr>�j|�S�dkrW�j|�Str.
�dkrv�j|�S�dkr��j|�S�dkr��j|dt�}tj��|S�dkr��j	|�S�dkr��j
|dt�}|\}}}}	x'|	D]}
�jj
|
j|
j�qWx]|D]U}t�}x-�jj|j�D]}
|j|
j�qcW�jj|j|�q>W�jj�d	d
dj|�gfS�dkr��j
|dt�}|\}}}}	xN|D]F}�jj|j�}
|
sq�nt�j_|jj|j �q�WxN|D]F}�jj!|j"�}|spqInt�j_|j#j|j�qIW�jj�d	d
dj|�gfS�d3kr�t$|�dkr�ddgfS�j
|d	gdt�}|\}}}}	|d2ks1t$|�dkr>ddgfS|d	}�dk}xk�jj&d|d�D]P}
|r�d|
j'kr�qnn|j"|
j'_(|j#j|
j�t�j_qnW�jj�d	ddj|d�gfS�dkrNx8�jj&d|�D]!}
d|
j'kr|
j'`(qqWd	ddj|�gfS�d4kr9�j
|dt�}|\}}}}	|s�ddgfS�dk}xY|D]Q}xH�jj|j#�D]1}
|r�d|
j'kr�q�n|j"|
j'_(q�Wq�W|rd	ddj|�gfSd	ddj|�gfSn�d5kr~t$|�dkrdddgfS�j
|d	gdt�}|\}}}}	|d2ks�t$|�dkr�dd gfS|d	}
�dk}�j
|ddt�}x.|dD]"}|jj|j|j|�q�W|rSx-|d	D]}|
j|_)t�j_q.Wn�jj�d	d!dj|d�gfS�d"kr�j
|d	gdt�}|\}}}}	|d2kr�dd#gfSx#|D]}d2|_)t�j_q�W�jj�d	d$dj|�gfS�d6kr4�j
|dt�}|\}}}}	|sddd gfS�d&k}xw|D]o}
djt*|
j��}xN�jj+|�D]:}|r�|j)d2k	r�q�n|
j|_)t�j_q�WqwW�jj�|rd	d'dj|�gfSd	d(dj|�gfSn�d7kr�	��fd,�}x*�jj j,�D]}�jj-|�qeWx,�jD]!}
d|
j'kr�|
j'`(q�q�W�jj.�jj/��d-tfd.tff}xT|D]L\}}�jj!|�}|d2kr	q�n|r(	t|_0n||�q�Wx6�jj1�D]%}|j|kra	qF	n||�qF	W�jj�d	d/gfS�d0kr.
�j
|dt�}|\}}}}	x!|D]}
�jj2|
j�q�	Wx!|D]}�jj-|j"�q�	W�jj�d	d1dj|�gfSnd2S(8s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        R�R�R5RfRR�smark-installR,isMarked install: t,smark-blacklistsMarked upgrade blacklist: s
mark-packagessmark-packages-forceiisNo group or package givensNo group matchedtpatternstgroup_membersMarked packages: sunmark-packagessUnMarked packages: smark-packages-syncsmark-packages-sync-forcesMarked packages-sync-force: sMarked packages-sync: smark-groupssmark-groups-forcesNo environment or group givensNo environment matchedsMarked groups: s
unmark-groupssNo groups matchedsUnMarked groups: smark-groups-syncsmark-groups-sync-forcesMarked groups-sync-force: sMarked groups-sync: smark-convertsmark-convert-whitelistsmark-convert-blacklistcs�|js
dSg}xQ�jj|j�D]:}d|jkrDq)n|j|j_|j|j�q)W�dkr��j	j
|j|�n�j	j
|j|j�dS(NRsmark-convert-whitelist(R�R?tsearchNamesR;R�tgroupidRR�RwRt	add_group(tgrpt	pkg_namesR(RR(s!/usr/share/yum-cli/yumcommands.pyt_convert_grp�s	tcoreRs&Converted old style groups to objects.smark-removesMarked remove: N(s
mark-packagessmark-packages-force(smark-packages-syncsmark-packages-sync-force(smark-groupssmark-groups-force(smark-groups-syncsmark-groups-sync-force(smark-convertsmark-convert-whitelistsmark-convert-blacklist(3RR�treturnGroupSummarytreturnGroupListsR.treturnGroupInfot
installGroupsRRltremoveGroupst_groupReturnGroupsRQRtadd_environmentt
environmentidt	allgroupsR�R?RR;taddRwRRtsaveR0tcompstreturn_environmenttevgidtchangedt	grp_namesRiR�treturn_grouptgidRR&R�treturnPackagesR�RtenvironmentR�t
return_groupsR�t	del_grouptcompilet
simplePkgListR�t
get_groupstdel_environment(RTRRR'RmtgRGtigrpstgrpstievgrpstevgrpstevgrpRRRtievgrptigrptforceR'RR)tspecial_gidstforce_installed((RRs!/usr/share/yum-cli/yumcommands.pyR^sJ








	




	

 



	


	

	



		




cCsN|j||�\}}|dkr(tS|jd�sF|jd�rJtStS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        R�R5R�R�R�R�(slistsinfosremovessummary(RRQR�R.(RTRRR'R((s!/usr/share/yum-cli/yumcommands.pyR_�s	cCs,|j||�\}}|dkr(tStS(sdReturn whether a transaction set for removal only must be
        set up before this command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a remove-only transaction set is needed, False otherwise
        R�(sremove(RR.RQ(RTRRR'R((s!/usr/share/yum-cli/yumcommands.pyR�s	cCsN|j||�\}}|dkr(dS|jd�sF|jd�rJdSdS(	sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        R�R5R�sread-only:pastR�R�R`(slistsinfossummary(RR�(RTRRR'R((s!/usr/share/yum-cli/yumcommands.pyRas(RbRcRdR�RYR[R\R�RR]R^R_R�Ra(((s!/usr/share/yum-cli/yumcommands.pyR��s"

						C	�		tMakeCacheCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sWA class containing methods needed by the cli to execute the
    makecache command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        t	makecache((RT((s!/usr/share/yum-cli/yumcommands.pyRY,scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        Rr((RT((s!/usr/share/yum-cli/yumcommands.pyR[4scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sGenerate the metadata cache(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\;scCst|�dS(s$Verify that conditions are met so that this command can
        run; namely that there is an enabled repository.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]Bsc	Cs�|jjtd��|jjtd��t}|rQ|ddkrQt}ntr�x2|jj�D]!}d|_|sgd|_qgqgW|j	dd�|jj
�|r�|jjddd	d
�n|jjddd	d
�idd
6dd6dd6dd6}x�|jj�D]{}xr|j
j�D]a}||krDq,n||jks,|j|rgq,ntj|j|�||d|j�q,WqWndtd�gfS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        s*Making cache files for all metadata files.s=This may take a while depending on the speed of this computeritfasts	group:allR�tmdtypeR<t	cacheonlyiR@s
groups.xmltgroup_gzspkgtags.sqlitetpkgtagssupdateinfo.xmlRsprestodelta.xmltprestodeltatcachedsMetadata Cache Created(RRCRRQR.Rtsorttmetadata_expiretmdpolicyR�tdoSetuptpopulateSackRtrepoXMLt	fileTypest	retrievedRtrepo_gen_decompresst
retrieveMDtcache(RTRRR'R?R#t	fname_maptMD((s!/usr/share/yum-cli/yumcommands.pyR^Ls:		



cCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_�s	(	RbRcRdRYR[R\R]R^R_(((s!/usr/share/yum-cli/yumcommands.pyR='s				
	;tCleanCommandcBsMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(sSA class containing methods needed by the cli to execute the
    clean command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tclean((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s<[headers|packages|metadata|dbcache|plugins|expire-cache|all]((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sRemove cached data(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCst|||�t|�dS(syVerify that conditions are met so that this command can run.
        These include that there is at least one enabled repository,
        and that this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RBRO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�s	cCsd|j_|j|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        i(RRPtcleanCli(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^�scCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_�s	cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:past((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa�s(
RbRcRdRYR[R\R]R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyRS�s						tProvidesCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sVA class containing methods needed by the cli to execute the
    provides command.
    cCs
ddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tprovidestwhatprovides((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        tSOME_STRING((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s*Find what package provides the given value(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCst|||�dS(s7Verify that conditions are met so that this command can
        run; namely that this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(R8(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�scCs*|jjd�tj|�|j|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sSearching Packages: (RRCRR�RW(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^s
cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:past((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRas(	RbRcRdRYR[R\R]R^Ra(((s!/usr/share/yum-cli/yumcommands.pyRV�s				
	tCheckUpdateCommandcBsGeZdZd�Zd�Zd�Zd�Zdd�Zd�Z	RS(sZA class containing methods needed by the cli to execute the
    check-update command.
    cCsddddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        scheck-updates
check-updatess
check-upgradescheck-upgrades((RT((s!/usr/share/yum-cli/yumcommands.pyRY'scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s[PACKAGE...]((RT((s!/usr/share/yum-cli/yumcommands.pyR[0scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s#Check for available package updates(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\7scCst|�dS(s.Verify that conditions are met so that this command can
        run; namely that there is at least one enabled repository.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]>scsTtj��dg|}�jjdd�d}trJ�j|d|�}�jjso�jj	t
j�r��j|d|�}|j|_|j|_nt
�|�}	t|j�dkr�i}
�jjd}|r3xQt|j�D]=}|jjdkr�|j�r�||
|j|jf<q�q�Wn�jj}
�jj}�j|jddd	d
|
d|	di|
d
6|d6�d}nt|j�dkr�td�GHxBt|jdtjd��D]"}�j|dd|	d|�q�Wd}n�jjrJtj �j!j"��rJ�fd�}tj#��j$|�qJn|gfS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        RpiR�R�R�R�Rrt
outputTypeR�R�R�R�R�snot inidsObsoleting PackagesR�cs�jjd|�dS(Ns%s(R4R5(tx(R(s!/usr/share/yum-cli/yumcommands.pyt_msg~s(%RR�R'tinsertR.R�RRpR4tisEnabledForRtDEBUG_3R�R�R&R�R�R�R�R#R3R�RwRxR�R�R�RR�R�R�tautocheck_running_kernelt_repos_downloadedRRt_check_running_kerneltupinfo(RTRRR'R�tobscmdstresultR�ttyplR�R�R�R�R�R�R�R]((Rs!/usr/share/yum-cli/yumcommands.pyR^HsJ

 		cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:future((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa�sN(
RbRcRdRYR[R\R]R�R^Ra(((s!/usr/share/yum-cli/yumcommands.pyRZ"s					
;t
SearchCommandcBsMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(sTA class containing methods needed by the cli to execute the
    search command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tsearch((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        RY((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s+Search package details for the given string(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCst|||�dS(s7Verify that conditions are met so that this command can
        run; namely that this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(R8(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�scCs0|jjtd��tj|�|j|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sSearching Packages: (RRCRRR�Ri(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^�s
cCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_�s	cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:present((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa�s(
RbRcRdRYR[R\R]R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyRh�s				
		tUpgradeCommandcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sUA class containing methods needed by the cli to execute the
    upgrade command.
    cCs
ddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        Rs
upgrade-to((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s
PACKAGE...((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s-Update packages taking obsoletes into account(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCs%t|�t|�t||�dS(ssVerify that conditions are met so that this command can
         run.  These include that the program is being run by the root
         user, and that there are enabled repositories with gpg.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�s	

cCsNd|j_|j|td��|j|d|dk�}tj|�|S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        isSetting up Upgrade ProcessRjs
upgrade-to(RRpRXRRkRRl(RTRRR'Rm((s!/usr/share/yum-cli/yumcommands.pyR^s

(RbRcRdRYR[R\R]R^(((s!/usr/share/yum-cli/yumcommands.pyRj�s				
tLocalInstallCommandcBsMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(sZA class containing methods needed by the cli to execute the
    localinstall command.
    cCstj|�t|_dS(N(RPRUR.RS(RT((s!/usr/share/yum-cli/yumcommands.pyRUs
cCs
ddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tlocalinstalltlocalupdate((RT((s!/usr/share/yum-cli/yumcommands.pyRY scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        tFILE((RT((s!/usr/share/yum-cli/yumcommands.pyR[(scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sInstall a local RPM(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\/scCs(t|�t|�t|||�dS(s�Verify that conditions are met so that this command can
        run.  These include that there are enabled repositories with
        gpg keys, and that this command is called with appropriate
        arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%R((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]6s


cCs8|j|td��|dk}|jd|d|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is:

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        s Setting up Local Package ProcessRmtfilelistt
updateonly(RXRtlocalInstall(RTRRR'Rp((s!/usr/share/yum-cli/yumcommands.pyR^DscCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_Ws	(
RbRcRdRURYR[R\R]R^R_(((s!/usr/share/yum-cli/yumcommands.pyRks						tResolveDepCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sXA class containing methods needed by the cli to execute the
    resolvedep command.
    cCstj|�t|_dS(N(RPRUR.RS(RT((s!/usr/share/yum-cli/yumcommands.pyRUgs
cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        t
resolvedep((RT((s!/usr/share/yum-cli/yumcommands.pyRYkscCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        t
DEPENDENCY((RT((s!/usr/share/yum-cli/yumcommands.pyR[sscCsdS(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sHrepoquery --pkgnarrow=all --whatprovides --qf '%{envra} %{ui_from_repo}'((RT((s!/usr/share/yum-cli/yumcommands.pyR\zscCs0|jjtd��tj|�|j|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        s"Searching Packages for Dependency:(RRCRRR�t
resolveDepCli(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^�s
cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:past((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa�s(	RbRcRdRURYR[R\R^Ra(((s!/usr/share/yum-cli/yumcommands.pyRrbs					tShellCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sSA class containing methods needed by the cli to execute the
    shell command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tshell((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s
[FILENAME]((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sRun an interactive yum shell(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCst|||�dS(s7Verify that conditions are met so that this command can
        run; namely that this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RG(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�scCs |j|td��|j�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sSetting up Yum Shell(RXRtdoShell(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^�scCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_�s	(	RbRcRdRYR[R\R]R^R_(((s!/usr/share/yum-cli/yumcommands.pyRv�s				
	tDepListCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sUA class containing methods needed by the cli to execute the
    deplist command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tdeplist((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s
PACKAGE...((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sList a package's dependencies(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCst|||�dS(s?Verify that conditions are met so that this command can
        run; namely that this command is called with appropriate
        arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(R((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�s	cCs0|j|td��tj|�|j|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sFinding dependencies: (RXRRR�Rz(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^s
cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:past((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRas(	RbRcRdRYR[R\R]R^Ra(((s!/usr/share/yum-cli/yumcommands.pyRy�s					tRepoListCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sVA class containing methods needed by the cli to execute the
    repolist command.
    cCsdS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        trepolisttrepoinfo(R|R}((RT((s!/usr/share/yum-cli/yumcommands.pyRY(scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s[all|enabled|disabled]((RT((s!/usr/share/yum-cli/yumcommands.pyR[0scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s,Display the configured software repositories(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\7sc1s
�fd�}�fd�}d�}t|�dkr`|dd>kr`|d}|d}nd}td	�|�}|d
kr�t}n�jjtj�}|dks�|r@y�jj��j	Wq@t
jjk
r<|r��nxL�jj
�D]7}	y�jj|	j�Wq�t
jjk
r4q�Xq�Wq@Xn�jjj�}
|
j��jj
�}�jjd�jjd}�jjd
}
�jjd}d}g}x�|
D]x}	t|�r�||	|�r�q�nd?\}}}d}d}d}d}t}|dks;|	j|ks;|	j|krXt}||
|}}}n|	|kr�t}|dkrt}n|dkr�|r�q�n|s�|r�|td�|}ttd��}|s�|d7}|d7}q�n|r�||	�}n|dks|r2|s,�jjs,|	jrDt|	jj��}nt|	j�}||�}|	jj}tg|D]\}}||	kru|^qu�}|r�||�}|s�|d|7}q�n||7}q2nZt}|dkr�t}n|dkr|rq�n|td�|}ttd��}|s|	j}|	jdkr�tj j!|	j"�r�tj#|	j"�j$} | |	jt%j%�kr�d|}q�q�n|r�|	j&r�|	j'j(j)}!|!|	j*j)kr�d|}q�n|j+||	j||f|f�q�|r|	j*}"nd@}"�j-td�|	j��j-td�|	j�g}#|se|r�|#�j-td�|�g7}#n|"r�|"j.d@k	r�|#�j-td�|"j.�g7}#n|"r|"j/dr|"j/d}$|#�j-td�dj0t1|$���g7}#n|"r�|"j/dr�xgt1|"j/d�D]O}%|"j/d|%}$|#�j-td�d|%dj0t1|$��f�g7}#q9Wn|"r�|#�j-td�t%j2|"j)���j-td �|��j-td!�|�g7}#nt3|	d"�r|	j4}&n	|	j5}&|&rB|#�j-td#�dj0|&��g7}#n|rR|	j6n|	j&r�|#�j-td$�|	j&�g7}#|r�|	j'j(j)}'|#�j-td%�t%j2|'��g7}#q�n.|	j7r�|#�j-td&�|	j7�g7}#n|rf|	j6rf|&rf|	j6d}(t|	j6�dkrD|(d't|	j6�d7}(n|#�j-td#�|(�g7}#ntj j!|	j"�s�td(�} n$tj#|	j"�j$} t%j2| �} |	jd)kr�td*�| }nA|	js�td+�| }n%||	j�}td,�|| f}|#�j-td-�|��j-td.�|	j8�g7}#|	jr	|#�j-td/�dj0|	j��g7}#n|	j9r�	|#�j-td0�dj0|	j9��g7}#n|r�	|#�j-td1�|�g7}#n|	j:r
|#�j-td2�|	j:�g7}#n�jj;d3d4j0tt<j=|#���q�W|r�|r�ttd5��})d}*d}+d},x�|D]�\}}-\}}}|)t|�kr�
t|�})n|*t|-�kr�
t|-�}*n|+|t|�kr�
|t|�}+n|,t|�krp
t|�},qp
qp
W|dkr;�jj>|)d}.nWttd6��|+krz�jj>|)ttd6��d}.n�jj>|)|+d}.|.|*kr�|.}*n*|.|*8}.|)|.d7})|*|.|.d7}*t?td5�|)�}/t?td7�|*|*�}0|dkr#�jj;d8|/|0�n�jj;d9|/|0td6��x�|D]�\}}-\}}}|dkr��jj;d8t?||)�t?|-|*|*��qIn|r�t?||,d:t�}n�jj;d;t?||)�t?|-|*|*�||�qIWndd<t=t@jAd=|t��gfS(As�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        cs:d}x$|jj�D]}||j7}qW�j|�S(Ni(tsackR*tpackagesizet
format_number(R#RmR(R(s!/usr/share/yum-cli/yumcommands.pyt
_repo_sizeLscs=x6|D].}|�jj|dtdt�krtSqWtS(NR+R,(RR-R.RQ(R#Rtpat(R(s!/usr/share/yum-cli/yumcommands.pyt_repo_matchRs

cSsttjd|t��S(Ns%d(RtlocaletformatR.(tnum((s!/usr/share/yum-cli/yumcommands.pyt_num2ui_numYsiiR@tdisabledtenabledcSs
|j�S(N(tlower(R\((s!/usr/share/yum-cli/yumcommands.pyt<lambda>asR}tgreenR�tredtnormalRrs: is+%st!t*sRepo-id      : sRepo-name    : sRepo-status  : sRepo-revision: tcontentsRepo-tags    : s, tdistrosRepo-distro-tags: s[%s]: %ssRepo-updated : sRepo-pkgs    : sRepo-size    : t
_orig_baseurlsRepo-baseurl : sRepo-metalink: s  Updated    : sRepo-mirrors : s
 (%d more)tUnknowni����sNever (last: %s)sInstant (last: %s)s%s second(s) (last: %s)sRepo-expire  : s  Filter     : sRepo-exclude : sRepo-include : sRepo-excluded: sRepo-filename: s%s
s
srepo idtstatuss	repo names%s %ss%s %s %stlefts
%s %s %s%ss
repolist: s%d(sallR�senabled(RrRrRrN(BR&tmapR.R4R_RR`RRJRLRIR�t	RepoErrorRR3tvaluesRFR�tFG_COLORR�RQRwRRRtexcludeR~R/t	_excludesR1RGRDRERKtmetadata_cookietstattst_mtimettimetmetalinkt
metalink_datatrepomdt	timestampRKR�R�t
fmtKeyValFilltrevisionttagsR0R�tctimethasattrR�tbaseurlturlst
mirrorlisttmetadata_expire_filtertincludepkgstrepofileR5RRR�RR�R�(1RTRRR'R�R�R�targtverboseR#Rt
enabled_repost	on_ehibegt	on_dhibegton_hiendttot_numtcolstehibegtdhibegthiendt
ui_enabledtui_endis_widtui_numtui_excludes_numt
force_showR�tui_sizeR�texcludesR6tpidRvtlasttmdtstmdtoutR�R�tbaseurlsttsturltid_lentnm_lentst_lentui_lentrnameR�ttxt_ridttxt_rnam((Rs!/usr/share/yum-cli/yumcommands.pyR^>s�	"

	


*	
1		
'	
		
"				 
'	

	
cCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_X	s	cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:past((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRac	s(	RbRcRdRYR[R\R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyR{#s				�	tHelpCommandcBsSeZdZd�Zd�Zd�Zd�Zed��Zd�Z	d�Z
RS(sRA class containing methods needed by the cli to execute the
    help command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        R((RT((s!/usr/share/yum-cli/yumcommands.pyRYt	scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        tCOMMAND((RT((s!/usr/share/yum-cli/yumcommands.pyR[|	scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sDisplay a helpful usage message(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�	scCsgt|�dkr(|j�tj�n;t|�dksM|d|jkrc|j�tj�ndS(s?Verify that conditions are met so that this command can
        run; namely that this command is called with appropriate
        arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        iiN(R&RRRR
(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�	s	
%
cCsX|j�d}y|j�}Wnttfk
r?d}nXy|j�}Wnttfk
rod}nXd}|dk	r�|d||f7}n|dk	r�|d|7}n|dkr�|dkr�td�|}n|j�}t|�dkrTt|�dkr$|td�7}n|td	�7}|d
j|j�d�7}n|S(NiRrs%s %ss

%ssNo help available for %siis

aliases: s	

alias: s, (	RYR[tAttributeErrorRZR�R\RR&R0(tcommandtcanonical_nameRR�thelp_outputt
command_names((s!/usr/share/yum-cli/yumcommands.pyR�	s.

 cCsJ|d|jkr@|j|d}|jj|j|��ndgfS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        i(R
R4R5R(RTRRR'R�((s!/usr/share/yum-cli/yumcommands.pyR^�	scCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_�	s	(RbRcRdRYR[R\R]tstaticmethodRR^R_(((s!/usr/share/yum-cli/yumcommands.pyR�n	s				$	tReInstallCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sWA class containing methods needed by the cli to execute the
    reinstall command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        t	reinstall((RT((s!/usr/share/yum-cli/yumcommands.pyRY�	scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s
PACKAGE...((RT((s!/usr/share/yum-cli/yumcommands.pyR[�	scCs5t|�t|�t|||�t||�dS(s�Verify that conditions are met so that this command can
        run.  These include that the program is being run by the root
        user, that there are enabled repositories with gpg keys, and
        that this command is called with appropriate arguments.


        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%R(RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�	s

cCs#|j|td��|j|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sSetting up Reinstall Process(RXRt
reinstallPkgs(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^
scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sreinstall a package(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\
scCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_
s	(	RbRcRdRYR[R]R^R\R_(((s!/usr/share/yum-cli/yumcommands.pyR��	s					tDowngradeCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sWA class containing methods needed by the cli to execute the
    downgrade command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        t	downgrade((RT((s!/usr/share/yum-cli/yumcommands.pyRY(
scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s
PACKAGE...((RT((s!/usr/share/yum-cli/yumcommands.pyR[0
scCs5t|�t|�t|||�t||�dS(s�Verify that conditions are met so that this command can
        run.  These include that the program is being run by the root
        user, that there are enabled repositories with gpg keys, and
        that this command is called with appropriate arguments.


        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%R(RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]7
s

cCs#|j|td��|j|�S(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        sSetting up Downgrade Process(RXRt
downgradePkgs(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR^G
scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sdowngrade a package(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\X
scCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR__
s	(	RbRcRdRYR[R]R^R\R_(((s!/usr/share/yum-cli/yumcommands.pyR�#
s					tVersionCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sUA class containing methods needed by the cli to execute the
    version command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        Ry((RT((s!/usr/share/yum-cli/yumcommands.pyRYp
scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s[all|installed|available]((RT((s!/usr/share/yum-cli/yumcommands.pyR[x
scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s9Display a version for the machine and/or available repos.(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\
scCs!d}|r|d}n|d.kr2|d}nd}d�}|jjtj�}i}|d/kr�g}|dkr�d}q�|td�}ntjj�}xI|D]A}	t||	j	�||	<||	j
r�||	j|j�q�q�W|dkr5t
d�GHxt|�D]}	dG|	GHqWddgfS|dkrJx�|D]�}	|	|kr`qHnt
d�G|	GHt
d�GH|s�x�t||	�D]}
dG|
GHq�WqHiid6id6}||	}|j|�}
|j|||
�|d|dg}|j|�}|d|df}|j|t|
d|�qHWddgfS|jd�rt|rtx|D]}d|kr�d|kr�t�|d<n|dj|�qgtjj|�s�|jjt
d�|�qgt|�j�}td�|D��}tjj|�}||krcxCtdd�D]/}|t|�}||krUq-n|}Pq-Wn|||<qgWn|j j!d }|j j!d!}g}|d0krtr|j"j#|d"|�}|j$j%�}|d1k	r�|j'}n|d1k	r!|d|kr!|j(d#|d1k	�n|d2krq|j)d$t
d%�||ft|d�f�|||d�n|rx�t|d&�D]s}|jd�r�|r�||kr�q�n|j)d't
d(�|ft|d&|�f�|||d)|�q�Wqqn|d3kr,tr,|j*j#|d"|�}|d4kr�|j)d$t
d*�||ft|d�f�|r�|||d�q�n|r)x�t|d&�D]|}|jd�r�|r�||kr�q�n|j)d't
d+�|ft|d&|�f�|r�|||d)|�q�q�Wq)q,niid6id,6}xq|D]i\}}xZdt|�fd,t|�ffD]4\}}||j+|d�|||cd7<qxWqGW|d|d,g}|j|�}|d|df}x%|D]}|j,t-||��GHq�Wdd-gfS(5s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        R�iR�R�tnogroupssnogroups-installedsnogroups-availablesnogroups-allR@sgroup-installeds	group-allR�sgroup-availableicSs�x�t|�D]�}||}g}d}xWt|�D]I}|dkrNq6n||}|jd||ft||�f�q6Wd|kr�|s�|d|kr�|jd|t|d�f�n|j|�q
WdS(Ns	    %s/%ss    %s(R�R�R�tstrtextend(R�t	repo_dataR�R�tncolstlast_revtrev((s!/usr/share/yum-cli/yumcommands.pyt
_append_repos�
s

+#$s	nogroups-s Yum version groups:s   sversion grouplists
 Group   :s
 Packages:tenvraRvR�sversion groupinfosgroup-t/s
<cmd line>s File doesn't exist: %scss|]}|j�VqdS(N(tstrip(t.0tn((s!/usr/share/yum-cli/yumcommands.pys	<genexpr>�
sidt
releasevertbasearchR�twarns%s %s/%ss
Installed:is%s %ssGroup-Installed:is
Available:sGroup-Available:RuRy(s	grouplists	groupinfoR�snogroups-installedsnogroups-availablesnogroups-alls	installedsallsgroup-installeds	group-alls	availablesallsgroup-availables	group-all(R�snogroups-installedsnogroups-availablesnogroups-all(s	installedsallsgroup-installeds	group-allN(sgroup-installeds	group-all(s	availablesallsgroup-availables	group-all(sgroup-availables	group-all(.R4R_RR`R&RItconfigtreadVersionGroupsConfigR�tpkglisttrun_with_packagesRitrun_with_package_namesRR�t_group_names2aipkgst_calcDataPkgColumnsR�t_displayPkgsFromNamesR.R�R!RDRERKRR�topent	readlinestbasenametrangeR�RtyumvarR?t
simpleVersionthistoryR�R�tend_rpmdbversiont_rpmdb_warn_checksR�RLR}t
fmtColumnstzip(RTRRR'tvcmdR�R�R�tgconfR�tpkgnameR~Rtpkg_names2pkgsR�tdgrpR�tndgrptreltbaR�tlastdbvRRvRuR�R�tline((s!/usr/share/yum-cli/yumcommands.pyR^�
s�
	
			







"%1
cCsNd}|r|d}n|jjtj�}|dkrD|rDtS|dkS(	sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        R�iR�R�R@sgroup-availables	group-all(s	availablesallsgroup-availables	group-all(R4R_RR`R.(RTRRR'RR�((s!/usr/share/yum-cli/yumcommands.pyR_,s	
cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:present((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa=s(	RbRcRdRYR[R\R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyR�k
s				�	tHistoryCommandcBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(sUA class containing methods needed by the cli to execute the
    history command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        R�((RT((s!/usr/share/yum-cli/yumcommands.pyRYMscCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        sC[info|list|packages-list|summary|addon-info|redo|undo|rollback|new]((RT((s!/usr/share/yum-cli/yumcommands.pyR[UscCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s(Display, or use, the transaction history(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\\sc
CsYitd6td6}idd6dd6dd6dd6}x�t|�dkr�t}x\|djdd	�jd	�D];}||kr�qqnt}||d}||||<qqW|s�Pn|d
g|d}q9W|j|�}|dkr�ddgfStj|j	�}	d
|j
|	fGH|j|�|j||�rUdd|j
fgfSdS(Ntforce_reinstalltforce_changed_removalR�sforce-reinstallR�sforce-removeiR�RiisFailed history redos!Repeating transaction %u, from %ssRepeating transaction %u(
RQR&treplacetsplitR.t_history_get_transactionR�R�R�t
beg_timestampttidthistoryInfoCmdPkgsAlteredthistory_redo(
RTRR'tkwargst
kwargs_maptdoneR�R�toldttm((s!/usr/share/yum-cli/yumcommands.pyt
_hcmd_redocs2



&

cCs�|j|�}|dkr(ddgfStj|j�}d|j|fGH|j|�|j|�rdd|jfgfSdS(NisFailed history undosUndoing transaction %u, from %sisUndoing transaction %u(RR�R�R�RRRthistory_undo(RTRR'RR((s!/usr/share/yum-cli/yumcommands.pyt
_hcmd_undo�s

c
Cs�t}t|�dkrE|ddkrEt}|}|jd�n|j|�}|dkrmddgfS|jj�}|dkr�ddgfS|j|jkr�ddgfSd}x�|jj	t
|jd|jd��D]�}|r9|js|jr9|jrd}nd}||jGHd	GHdd
gfS|dkrZt
jj|�}q�|j|�q�Wtj|j�}	d|j|	fGH|jdd
jd�|jD���GH|j|�|j|�r�dd|jfgfSdS(NiR:is'Failed history rollback, no transactions!Failed history rollback, no last?s"Rollback to current, nothing to dos-Transaction history is incomplete, before %u.s,Transaction history is incomplete, after %u.s5 You can use 'history rollback force', to try anyway.s#Failed history rollback, incompletes#Rollback to transaction %u, from %ss&  Undoing the following transactions: s, css|]}t|�VqdS(N(R�(R�R\((s!/usr/share/yum-cli/yumcommands.pys	<genexpr>�sisRollback to transaction %u(RQR&R.tpopRR�R�R�RRR�taltered_lt_rpmdbtaltered_gt_rpmdbRItYumMergedHistoryTransactiontmergeR�R�RR�R0RR(
RTRR'R:RR�tmobjRR$R((s!/usr/share/yum-cli/yumcommands.pyt_hcmd_rollback�s@"


0		
	
cCs|jj�dS(N(R�t_create_db_file(RTRR'((s!/usr/share/yum-cli/yumcommands.pyt	_hcmd_new�scCs�dG|jjGHtj|jj�j}dGtjd|t�GH|jj�}|dkrmt
d�GdGHdS|jj�}|jjd�d}t
d�G|j
GHt
d�Gtj|j�GHt
d�Gtj|j�GHt
d	�GHt
d
�Gtjd|dt�GHt
d
�Gtjd|dt�GHt
d�Gtjd|dt�GHt
d�Gtjd|dt�GHt
d�Gtjd|dt�GHt
d�Gtjd|dt�GHdS(Ns
File        :s
Size        :s%ds
Transactions:it1s
Begin time  :s
End time    :s
Counts      :s
  NEVRAC :s%6dtnevracs
  NEVRA  :tnevras
  NA     :Rts
  NEVR   :tnevrs
  rpm DB :R?s
  yum DB :tyumdb(R�t_db_fileRDR�tst_sizeR�R�R.R�R�Rt
_pkg_statsRRR�R�Rt
end_timestamp(RTRR'R�ttrans_Ntcountsttrans_1((s!/usr/share/yum-cli/yumcommands.pyt_hcmd_stats�s&"""""cCs�|d}|sd}nxrt|jjd|��D]U}|jj|dt�dkr_q5ndG|GdG|jj|�r�dGHq5dGHq5WdS(NiRtcreatesSyncing rpm/yum DB data for:s...sDone.sFAILED.(R�R�R?R*R�tpkg2pidRQt
sync_alldb(RTRR'tipkg((s!/usr/share/yum-cli/yumcommands.pyt
_hcmd_sync�s
	"cCs�d}|rJ|d|krJ|jjtd�dj|��tj�n|rw|dd krwt|�t|�nI|jj	o�t
j|jj	t
j�s�|jjtd��tj�ndS(!sZVerify that conditions are met so that this command can
        run.  The exact conditions checked will vary depending on the
        subcommand that is being called.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        R�R5R�trepeattredotundotnewtrollbacktaddons
addon-infotstatst
statisticstsynctsynchronizepkgR�spkg-lists	pkgs-listtpackagespackage-listR;s
packages-listspkg-infos	pkgs-infospackage-infos
packages-infois%Invalid history sub-command, use: %s.s, s(You don't have access to the history DB.N(slistsinfossummarysrepeatR;R<snewR>R?s
addon-infoR@RARBRCspkgsspkg-lists	pkgs-listRDspackage-listspackagess
packages-listspkg-infos	pkgs-infospackage-infos
packages-info(srepeatR;R<R>snew(
RRRR0RRRR%R�R-RDR	R
(RTRRR'R
((s!/usr/share/yum-cli/yumcommands.pyR]�s"	

'c	Cs�d}|r|d}ntr"nz|dkr@|j|�}n\|dkr^|j|�}n>|dkr||j|�}n |dkr�|j|�}n|dkr�|j|�}n�|dkr�|j||�}n�|dkr�|j||�}n�|dkr|j||�}n�|dkr<|j	||�}n`|d kr]|j
||�}n?|d!kr~|j||�}n|d"kr�|j|�}n|d#kr�dd|fgfS|S($s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        R�iR5R�R?s
addon-infoRR�spkg-lists	pkgs-listRDspackage-listR;s
packages-listR<R;R:R>R=R@RARBtsynchronizespkg-infos	pkgs-infospackage-infos
packages-infos
history %s(saddons
addon-info(spkgspkgsspkg-lists	pkgs-listspackagespackage-listspackagess
packages-list(sredosrepeat(sstatss
statistics(ssyncRE(spkg-infos	pkgs-infospackage-infos
packages-infoN(RQthistoryListCmdthistoryInfoCmdthistorySummaryCmdthistoryAddonInfoCmdthistoryPackageListCmdRRR%R'R4R9thistoryPackageInfoCmdR�(RTRRR'RRm((s!/usr/share/yum-cli/yumcommands.pyR^�sB
	cCs#d}|r|d}n|dkS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        R�iR:R;R<R>(srepeatsredosundosrollback((RTRRR'R((s!/usr/share/yum-cli/yumcommands.pyR_'s	
cCs-d}|r|d}n|d	kr)dSdS(
sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        R�iR:R;R<R>R`sread-only:past(srepeatsredosundosrollback((RTRRR'R((s!/usr/share/yum-cli/yumcommands.pyRa5s
(RbRcRdRYR[R\RRR%R'R4R9R]R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyR
Hs				 	
	(					1	tCheckRpmdbCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sYA class containing methods needed by the cli to execute the
    check-rpmdb command.
    cCs
ddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tcheckscheck-rpmdb((RT((s!/usr/share/yum-cli/yumcommands.pyRYJscCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s[dependencies|duplicates|all]((RT((s!/usr/share/yum-cli/yumcommands.pyR[RscCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sCheck for problems in the rpmdb(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\Ysc	Cskd}|r|}nd�}d}|jd|dtd|dd��rTd	}n|d
||fgfS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        R@cSst|j��GHdS(N(Rt__str__(R\((s!/usr/share/yum-cli/yumcommands.pyt_outrsiR�R�tchkcmdtheadercSsdS(N(R�(R\((s!/usr/share/yum-cli/yumcommands.pyR�wsis%s %s(RRQ(RTRRR'RPROtrc((s!/usr/share/yum-cli/yumcommands.pyR^`s			cCstS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        (RQ(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_{s	cCsdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        sread-only:past((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa�s(	RbRcRdRYR[R\R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyRLEs					tLoadTransactionCommandcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s^A class containing methods needed by the cli to execute the
    load-transaction command.
    cCs
dddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        sload-transactionsload-tssts-load((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        R((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s&load a saved transaction from filename(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�scs��fd�}d�}|s0tj�g}n|d}tjj|�rI|j�td�|�ttjd|��}d}t
}	x�|D]�}
�j|
�}|ddk	r�q�n|d}|dj�}|dkrt
�jjdt�d�}n||kr td�}
nd	}
yDt|d
j��}d|}t||j��}|d7}Wn
q�nXidd6dd
6}x+||D]}|j�}|||�q�Wd	}x7||D]+}|j�}||�r�q�nd}Pq�Wd||
f}
|	s�td�}t|�}|dkr<d}nt||�}td�}t|�}|dkrxd}nt||�}dG|GdG|GdGtd�GHt}	ntjd|dt�}d||f}tjd|d
t�}d||f}d|
||tjj|
�fGHq�Wdtd�|t|�fgfS|j�td�|��j|�d
td�|t�jj��fgfS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        cs�|jd�stSy�|jd�dj�jd�\}}t|j��}t|j�jd��}|tjkr��j|�}n%|tj	kr��j
|�}ntSWntSXtS(Nsmbr:t:iR�R(R�R.RR�tintttupleRIt
TS_INSTALLtgetInstalledPackageObjecttTS_AVAILABLEtgetPackageObjectRQ(tltpkgtupt
current_stateR�(R(s!/usr/share/yum-cli/yumcommands.pyt
_pkg_avail�s(cSse|jd�sdS|td�}|d
krB|dcd7<n|dkra|d	cd7<ndS(Ns  ts_state: R�todtudR�itiR�Rf(R�R_R`(RaR�(R�R&(R[R2tstate((s!/usr/share/yum-cli/yumcommands.pyt_pkg_counts�sis!showing transaction files from %ss
%s/*.yumtxit	main_onlytyR�iiRfR�R�s%s%stInstallitRemoves?? |t|tFilenames%ds%*ss%s | %s | %s | %ss.Saved transactions from %s; looked at %u filessloading transaction from %ss*Transaction loaded from %s with %s membersN(ttempfilet
gettempdirRDREtisdirRXRR�tglobR�RQt
_load_ts_dataR�R�R?R�R.RUtrstripRRR�R�R�R&tload_tsttsInfot
getMembers(RTRRR'R^Rct	load_filetyumtxstcurrpmvRtyumtxR~trpmvtcurrenttnumrepostpkgstarttnumpkgsR2R[tbadt	pkgititletpkgilent	pkgetitletpkgelentnumipkgstnumepkgs((Rs!/usr/share/yum-cli/yumcommands.pyR^�s�		


"
			
cCs%|stjj|d�r!tStS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        i(RDRERlRQR.(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR_'
s	cCs%|stjj|d�r!dSdS(sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        isread-only:pastR`(RDRERl(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyRa5
s(	RbRcRdRYR[R\R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyRS�s				{	tSwapCommandcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sRA class containing methods needed by the cli to execute the
    swap command.
    cCsdgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        tswap((RT((s!/usr/share/yum-cli/yumcommands.pyRYH
scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        s7[remove|cmd] <pkg|arg(s)> [-- install|cmd] <pkg|arg(s)>((RT((s!/usr/share/yum-cli/yumcommands.pyR[P
scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        s3Simple way to swap packages, instead of using shell(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\W
scCs5t|�t|�t|||�t||�dS(s�Verify that conditions are met so that this command can run.
        These include that the program is being run by the root user,
        that there are enabled repositories with gpg keys, and that
        this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%R*RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]^
s


cCsid|kr6|jd�}|| }||d}n|d }|d}|oS|scddgfS|d|jkr�dg|}n|d|jkr�dg|}n|j}|j}xy||fD]k}	dj|	�|_|	|_|j�|j�}
|
ddkr�|
dd	|dj|	�fgfSq�W||_||_dd	|dj|�fgfS(
s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        s--iR�iR�RfR�is%s %s(tindexR
R
t	cmdstringR0t
parseCommandst
doCommands(RTRRR'tofftrextcmdstiextcmdstocmdstolineR
tcmdret((s!/usr/share/yum-cli/yumcommands.pyR^m
s0



			
(		(RbRcRdRYR[R\R]R^(((s!/usr/share/yum-cli/yumcommands.pyR�C
s				tRepoPkgsCommandcBsMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(sRA class containing methods needed by the cli to execute the
    repo command.
    cCsddddgS(s�Return a list containing the names of this command.  This
        command can be called from the command line by using any of these names.

        :return: a list containing the names of this command
        s	repo-pkgss
repo-packagessrepository-pkgssrepository-packages((RT((s!/usr/share/yum-cli/yumcommands.pyRY�
scCsdS(sbReturn a usage string for this command.

        :return: a usage string for this command
        sK<repoid> <list|info|install|remove|upgrade|reinstall*|remove-or-*> [pkg(s)]((RT((s!/usr/share/yum-cli/yumcommands.pyR[�
scCs
td�S(shReturn a one line summary of this command.

        :return: a one line summary of this command
        sJTreat a repo. as a group of packages, so we can install/remove all of them(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\�
scCs5t|�t|�t|||�t||�dS(s�Verify that conditions are met so that this command can run.
        These include that the program is being run by the root user,
        that there are enabled repositories with gpg keys, and that
        this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%R7RO(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�
s


cCs�d�}|d}|d}|d}t}|sEt}dg}nd}	idd6dd	6d
d6d
d6d
d
6d
d6d
d6dd6dd6dd6dd6dd6}
|
j||�}tr�n�|dkr�t�j|||d|�S|dkrt�j|||d|�S|dkr8t�j|||d|�S|dkr�xC|D];}|jd|d|�}|||�|	t|�7}	qKW|	r�dt	dd|	�fSn�|dkr'xC|D];}|j
d|d|�}|||�|	t|�7}	q�W|	r�tj|�dt	dd |	�fSns|dkr�xI|D]A}|j
d|d!td|�}|||�|	t|�7}	q:W|	r�tj|�dt	dd |	�fSn�|d6krL|r�|j
j�}
nxI|D]A}|jd|d|d$|�}|||�|	t|�7}	q�W|r-|
|_
n|	r�dt	d%d&|	�fSnN|d7kr�|rp|j
j�}
nxC|D];}|jd|d$|�}|||�|	t|�7}	qwW|r�|
|_
n|	r�dt	d*d+|	�fSn�|d,kr#|r|j
j�}
nxj|D]b}y"|jd|d|d$|�}Wntjjk
rVqnX|||�|	t|�7}	qW|r�|
j�|_
n|	r�dt	d%d&|	�fSxC|D];}|jd|d$|�}|||�|	t|�7}	q�W|r|
|_
n|	r�dt	d*d+|	�fSnw|dkr�xC|D];}|jd|d|�}|||�|	t|�7}	q6W|	r�dt	d-d.|	�fSn|dkrox�|D]�}|jd|d|�}xg|D]^}|jj|j�}x@t|�D]2}|j|krq�n||jd/|�7}Pq�Wq�W|||�|	t|�7}	q�W|	r�dt	d0d1|	�fSn+|d
kr�x�|D]�}|jd|d|�}x�|D]�}|jj|jg�}d8}x[t|�D]M}|j|kr�q�n|r|j|d�r|j|�q�|g}q�W|r�x0|D](}|j|jkrUq7n|g}Pq7Wt|�dkr�|j|�}q�nx�|D]�}|j\}}}}}|j|j �r�||jd/|�7}q�|j!|j �r||j
d/|�7}q�|j"j|j�|j|�||j#d/|�7}q�Wq�W|||�|	t|�7}	q�W|	r�dt	d2d3|	�fSndt$d4�|gfSdt$d5�gfS(9s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        cSsx|D]}||_qWdS(N(trepopkg(ttxmbrsR�ttxmbr((s!/usr/share/yum-cli/yumcommands.pyt_add_repopkg2txmbrs�
s
iiiR�R�R�sremove-or-reinstallserase-or-reinstallsremove-or-syncs
erase-or-syncserase-or-distro-syncsremove-or-distro-syncs%erase-or-distribution-synchronizations&remove-or-distribution-synchronizationRiRs	update-tos
upgrade-toscheck-updates
check-upgradescheck-upgradess
check-updatesR�R�R5Rftpatterns%d package to installs%d packages to installs%d package to updates%d packages to updateRjs
reinstall-oldsreinstall-installedtrepoid_installs%d package to reinstalls%d packages to reinstalls
reinstall-newsreinstall-availablesmove-tos%d package to move tos%d packages to move toR�s%d package to removes%d packages to removeR�s%d package to remove/reinstalls%d packages to remove/reinstalls%d package to remove/syncs%d packages to remove/syncsNot a valid sub-command of %ss
Nothing to do(s
reinstall-oldsreinstall-installed(s
reinstall-newsreinstall-availablesmove-toN(%RQR.RR�R^R�RZRfR&RRiRRlt_not_found_atcopyR�RIR�tReinstallRemoveErrorR�RLtsearchPkgTupleR\R�R�RRwR�tverEQR�RxtbestPackagesFromListR�R�RqR�R(RTRRR'R�R�RRWtnoargsR�RR�R�tonot_found_aR�R�RtapkgsttoinstR�taR�R�R6((s!/usr/share/yum-cli/yumcommands.pyR^�
sJ	

















	

	

	


	



	
	


	


	cCsOd}t|�dkr%|d}n|dkrKt�j|||d�StS(sGReturn whether a transaction set must be set up before this
        command can run.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: True if a transaction set is needed, False otherwise
        RfiR5R�i(sinfoslist(R&R�R_R.(RTRRR'R((s!/usr/share/yum-cli/yumcommands.pyR_�s	
cCsud}t|�dkr%|d}n|dkrKt�j|||d�S|dkrqt�j|||d�Sd
S(
sAReturn the cache requirements for the remote repos.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: a list of arguments passed to *basecmd*
        :return: Type of requirement: read-only:past, read-only:present, read-only:future, write
        RfiR5R�ischeck-updates
check-upgrades
check-updatesscheck-upgradesR`(sinfoslist(scheck-updates
check-upgrades
check-updatesscheck-upgrades(R&R�RaRZ(RTRRR'R((s!/usr/share/yum-cli/yumcommands.pyRa�s
	(
RbRcRdRYR[R\R]R^R_Ra(((s!/usr/share/yum-cli/yumcommands.pyR��
s						�	tUpdateinfoCommandcBs#eZidd6dd6dd6dd6dd6dd6dd	6Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Z	d�Z
idd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6Zxej
D]Zeee<q�Wd�Zd �Zd!�Zd"�ZRS(#R�slist-updateinfos
list-securityslist-secR5sinfo-updateinfos
info-securitysinfo-secR�ssummary-updateinfocCsdgt|jj��S(NR(R�tdirect_cmdsR�(RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(NsB[info|list|...] [security|...] [installed|available|all] [pkgs|id]((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCsdS(Ns%Acts on repository update information((RT((s!/usr/share/yum-cli/yumcommands.pyR\�scCsdS(N((RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]�sc
Cs]d}d}	d}
x�|D]�\}}}
tt|d�|�}|d}|dkrr|drr|dd}ntt|�|
�}
|rxStj|d�D];}|d|kr�q�nttt|d��|	�}	q�WqqWxo|D]g\}}}
d	}|d
krQd}|d|krQtj||d|�dkrQd}qQn|d}|dkr�|dr�|dd}n|r�tj||�r�x�tj|d�D]F}|d|kr�q�n|d
||	t|d�|
||
f�q�Wq�t|
d�r1|jd|
j	|j
|
j��GHq�|d|||d|
||
f�q�WdS(Nit	update_idttypetsecuritytseveritys/Sec.t
referencesR3RrR@s  si s%s %-*s %-*s %sRws%s: s%s%-*s %-*s %s(tmaxR&t_upit_ysp_safe_refsR�t_rpm_tup_vercmpt_ysp_has_info_mdR�R�Rwt_encR�(RTRtmd_infot	list_typet	show_typet	iname2tupR~R$t	n_maxsizet	r_maxsizet	t_maxsizetnoticeR\RttntrefR�((s!/usr/share/yum-cli/yumcommands.pytlist_show_pkgs�sD
*0
cCsi}x�|D]�\}	}
}|	d|kr2q
n|	||	d<t|	d�r�tjj}|j}
|
j|�r�|	jdg�}q�|	j�}n|	j�}|dkr�|
d|kr�tj	||
d|
�dkr�|d}q�|d}n||�q
WdS(NR�ttextt	skip_dataR@is
  Installed : trues
  Installed : false(
R�RIRR`R4R_R�RNR�R�(RTRR�R�R�R�R~R$tshow_pkg_info_doneR�R\Rt
debug_log_lvltvlogtobj((s!/usr/share/yum-cli/yumcommands.pytinfo_show_pkgss"	0

c
s��fd�}i}	i}
i}x�|D]�\}}
}|d|krMq(n|||d<|	j|dd�d|	|d<|ddkr(|d}|dkr�d}n|
j|d�d|
|<q(q(Wd}xKdD]C}||	kr�q�ntt|	|��}||kr�|}q�q�W|sM�jjrItj�||�ndSidd	6d
d6dd
6dd6}dG|GHx�dD]�}||	kr�qn||}|dkr�t|
�dkr�|
j�d}|dkr�|d|}q�nd||	||fGH|dkrt|
�dkrd�}xFt	|
d|�D]/}||
||pXd|df}d|GHq?WqqW�jjr�tj�||�ni|_
dS(Ncs�jjd|�dS(Ns%s(R4R5(R\(R(s!/usr/share/yum-cli/yumcommands.pyR]1sR�R�iiR�R�Rrt
newpackagetbugfixtenhancementsNew PackagetSecuritytBugfixtEnhancementsUpdates Information Summary:R�s    %*u %s notice(s)cSs,idd6dd6dd6dd6j||�S(	Ntzz1tCriticaltzz2t	Importanttzz3tModeratetzz4tLow(R(R�((s!/usr/share/yum-cli/yumcommands.pyt
_sev_sort_key\s


R�t?s        %*u %s %s notice(s)(R�ssecurityR�R�(R�ssecurityR�R�(RR�R&R�RRaR�RcR�R�R�(RTRR�R�R�R�R~R$R]R2t
sev_countsR�R�R\RtsevtmaxsizetTtsizetoutTR�tsnR�RW((Rs!/usr/share/yum-cli/yumcommands.pytsummary_show_pkgs/s^"
	!



	

		 c
cs�x�|jD]�}|ddkr&q
nxa|dD]U}xL|dD]@}|d|d|dpcd|d	|d
f}||fVqBWq1Wq
WdS(NR�R�R�R;RwRxR|RsRyRz(tnotices(RTR�R�tupkgRR\((s!/usr/share/yum-cli/yumcommands.pyt
_get_new_pkgslstbugzillat	bugzillastbzstbzR�tsectcvetcvesR�tnewpackagessnew-packagessnew-packageR=c	s9||jkr|j|}nd|rL|ddkrL|d}|d	}n7|rn|d|jkrnd}n|r}d}nd}|dkr�|j�d
||j�S|dkr�|j�d||j�S|dkr�|j�d||j�S|dkrEd}|rtj|�}ntj	�|�d|d
|dgfS|dkr�d}|rotj|�}ntj
�|�d|d
|dgfS|dkr�d}|r�tj|�}ntj�|�d|d
|dgfS|dkr5�fd�}tj��j
|�d|d
|dgfSdS(NiR�R5R�sremove-pkgs-tssexclude-updatessexclude-allscheck-running-kernelisupdateinfo listsupdateinfo infosupdateinfo summaryR�s donecs�jjd|�dS(Ns%s(R4R5(R\(R(s!/usr/share/yum-cli/yumcommands.pyR]�s(slistsinfossummarysremove-pkgs-tssexclude-updatessexclude-allscheck-running-kernel(R�t	_cmd2filttdoCommand_liR�R�R�R�Rt
_args2filtersRlR�R�RcRd(RTRRR't
subcommandtfiltersR]((Rs!/usr/share/yum-cli/yumcommands.pyR^�sX
	

		


c
Cs�t�}g}	x[t|j|�dd��D];\}
}|r`tj||d|
�r`q.n|d}||kr|q.nttt|jj|g����}
|dkr�|
r�|j	|�q.n|dkr�|
r�|j	|�q.n|j
j|�}|sq.n|dkrB|dj|
d�rB|j	|�q.n|j	|�|	j
|
||df�q.W||||d||	|�dS(NR�cSs|ddS(Nii((R\((s!/usr/share/yum-cli/yumcommands.pyR��siR�R�R�(s	installedsupdates(R�R�R�R�t_match_sec_cmdR�treversedR?RR!RLR�tverLER�R�(RTRR�R'R�R$t	show_pkgsR�t	done_pkgsR~R�R\R�tipkgsR�((s!/usr/share/yum-cli/yumcommands.pytdoCommand_li_new�s2	 
'

#

cCs�d}d}t|�dkrwd}|d|jkrP|j|jd�}n|}|rw|tjkrwd}qwn|||fS(Nii(R�R&R�RR�t_update_info_types_(RTR't	filt_typeR�((s!/usr/share/yum-cli/yumcommands.pyt_parse_extcmds�sc
s�|j�d�}|j|�\}}�d�d�|r�|ddkr�|jd���dkr�|j|�\}}�q�ntj|j|��tj|j��i�tr�nx�dkr�tj	|�}tj
|��nK�dkrtj|�}n-�dkr3tj|�}tj
|��n�dkro|j
|�|�||��d|dgfS������fd	�}g}	x�t|�D]�}
x�|||
�D]�\}}i}
|\|
d
<|
d<|
d<|
d
<|
d<|
ddkrd|
d<nd|
d|
d<|	j||d|
f�q�Wq�W||��|�|	|�tj�|�d|dgfS(NcSs	|GHdS(N((R\((s!/usr/share/yum-cli/yumcommands.pyR$�sR�R�iR�R@R�s	 new donec3s�|d}t�j|��}x�|D]�\}}�rQtj�|�rQq&n�dkr�tj�||�dkr�q&q�n�dkr�|�kr�tj�||�dkr�q&q�ntj�||��r&||fVq&q&WdS(NiR�R�(R�tget_applicable_noticesR�R�R�t_ysp_should_filter_pkg(R\RwR�R�(R�R�R�R�toptstused_map(s!/usr/share/yum-cli/yumcommands.pyt_show_pkgtup
s
	(	R�R�R�R�R6RsRrR|s%s:s %(n)s-%(epoch)s%(v)s-%(r)s.%(a)ss done(supdatess	availables	installedsall(s	availablesall(RdR�RR�R�t
_ysp_gen_optstupdateinfo_filterst_ysp_gen_used_mapRQt_get_name2allpkgtupt_get_name2instpkgtupt_get_name2oldpkgtupt_get_name2aallpkgtupR�R�R�t_ysp_chk_used_map(RTRRR'R�R$R�tname2tupR�R~RR\R�R�((R�R�R�R�R�R�s!/usr/share/yum-cli/yumcommands.pyR��sP		
)
(RbRcR�RYR[R\R]R�R�R�R�R�R�R�R�R^R�R�R�(((s!/usr/share/yum-cli/yumcommands.pyR��sB

					(		=	


	6		
tUpdateMinimalCommandcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs
ddgS(Nsupdate-minimalsupgrade-minimal((RT((s!/usr/share/yum-cli/yumcommands.pyRY0scCsdS(Ns[PACKAGE-wildcard]((RT((s!/usr/share/yum-cli/yumcommands.pyR[3scCs
td�S(NsiWorks like upgrade, but goes to the 'newest' package match which fixes a problem that affects your system(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\6scCst|�t|�dS(s�Verify that conditions are met so that this command can run.
        These include that the program is being run by the root user,
        that there are enabled repositories with gpg keys, and that
        this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(RR%(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]9s

cCsft|j�}tj||�t|j�|}|dkrUd|}d|gfSddgfSdS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        is%%d packages marked for minimal Updateis%No Packages marked for minimal UpdateN(R&RqR�tupdate_minimal(RTRRR'R�R$((s!/usr/share/yum-cli/yumcommands.pyR^Fs

(RbRcRYR[R\R]R^(((s!/usr/share/yum-cli/yumcommands.pyR/s
				
tFSSnapshotCommandcBsDeZd�Zd�Zd�Zd�Zed��Zd�ZRS(cCs
ddgS(Nt
fssnapshottfssnap((RT((s!/usr/share/yum-cli/yumcommands.pyRYascCsdS(Ns[]((RT((s!/usr/share/yum-cli/yumcommands.pyR[dscCs
td�S(NsACreates filesystem snapshots, or lists/deletes current snapshots.(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\gscCst|�dS(s�Verify that conditions are met so that this command can run.
        These include that the program is being run by the root user,
        that there are enabled repositories with gpg keys, and that
        this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        N(R(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]js
cCsxt|dd��}ttd��}ttd��}x@|D]8}t|t|d��}t|t|d��}q@Wt}x�|D]�}|sdttd�|�ttd�d	d
t�ttd�d	d
t�ttd�d	d
t�ttd�|�td
�fGHt}nd||d|j|d�|d|j|d�||ddj	|d�fGHq�WdS(NR�cSs|dS(Ntdev((R\((s!/usr/share/yum-cli/yumcommands.pyR�xstSnapshottOriginRtorigins%s %s %s %s %s %stSizeiR�tUsedtFreetTagss%*s %6s %5.1f%% %6s %*s %sR�tusedtfreeRR�(
R�RRR�R&RQRR.R�R0(Rtsnapstmax_devtmax_oriR~R((s!/usr/share/yum-cli/yumcommands.pyt	_li_snapsvs*

!	cCs�|r-|dd#kr-|d}|d}nd}|jjs�td	�}|jjd
g�sw|dtd�7}n|jjd
g�s�|dtd�7}n|GHd|d|dgfS|dkr8y|jj�}Wn-tk
r}dtd�t|�gfSXtd�t|�GH|j	||�n|dkr�td�}y|jj�}Wn'tk
r�}d|t|�gfSXg|D]}|d^q�}	t
�}x`|	D]X}
|
|kr�q�nx=|D]5}|
|ks�tj|
|�r�|j|
�Pq�q�Wq�Wy|jj
d|�}Wn'tk
rX}d|t|�gfSXtd�t|�GH|j	||�n|d$kr|jj}y|jj|�}
Wn-tk
r�}dtd�t|�gfSX|
r�td�GHqtd�GHn|dkr�idgd6}|jj}td�}y|jj|d|�}Wn-tk
r�}|dt|�7}g}nX|s�|GHnx,|D]!\}}td�||fGHq�Wn|dkr�y|jj�}Wn-tk
r}dtd�t|�gfSX|sAtd�G|jjGHd|d|dgfSd}t
�}x-|D]%}||d 7}|j|d!�qWWtd"�}|t|�|j|�t|�fGHnd|d|dgfS(%s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        iR�tdeleteR5R�s
have-spaces	has-spaceisCSnapshot support not available, please check your lvm installation.tlvm2R�sNo lvm2 package installed.slvm2-python-libss&No lvm2-python-libs package installed.s donesFailed to list snapshots: sList of %u snapshosts:sFailed to delete snapshots: RtdevicessDeleted %u snapshosts:s3Could not determine free space on logical volumes: s#Space available to take a snapshot.sANot enough space available on logical volumes to take a snapshot.s
reason=manualR�sFailed to create snapshotsR�s: s(Created snapshot from %s, results is: %ssNo snapshots, LVM version:R
t
origin_devs3Have %u snapshots, using %s space, from %u origins.(slistRscreatessummarys
have-spaces	has-space(s
have-spaces	has-space(RR�RR?Rt
old_snapshotsR
RR&RR�tfnmatchR!t
del_snapshotsRtfssnap_percentaget	has_spacetsnapshotRyR�(RTRRR'R�R$RR�R\tdevsRtextcmdtpcRR�todevtndevR
tdev_oristsnap((s!/usr/share/yum-cli/yumcommands.pyR^�s�
	

	



	
*(	RbRcRYR[R\R]R�RR^(((s!/usr/share/yum-cli/yumcommands.pyR`s				t	FSCommandcBszeZd�Zd�Zd�Zd�Zeed�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�ZRS(cCsdgS(Ntfs((RT((s!/usr/share/yum-cli/yumcommands.pyRY�scCsdS(Ns[]((RT((s!/usr/share/yum-cli/yumcommands.pyR[�scCs
td�S(Ns]Acts on the filesystem data of the host, mainly for removing docs/lanuages for minimal hosts.(R(RT((s!/usr/share/yum-cli/yumcommands.pyR\scCsN|r|dd	krdSt|�dkr@|dd
kr@dSt|�dS(s�Verify that conditions are met so that this command can run.
        These include that the program is being run by the root user,
        that there are enabled repositories with gpg keys, and that
        this command is called with appropriate arguments.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        itduR�tdiffNiR�tfilter(R&sstatusR'(sfilterssfilter(R&R(RTRRR'((s!/usr/share/yum-cli/yumcommands.pyR]s

"csliid6id6id6id6id6���fd�}�fd������fd�}||�S(	Ntnormtmodtghosttmisstnotcs�x�|D]{}x;|j|jD])}|j��s9qn|�d|<qWx4|jD])}|j��spqUn|�d|<qUWqW�S(NR)R+(RotdirlistR�t	ghostlist(R�Rtfname(tpfrtprefix(s!/usr/share/yum-cli/yumcommands.pytquick_match"s
c3s�x�|D]�}t}x/|jD]$}|j��r|Vt}PqqW|rQqnx/|jD]$}|j��r[|Vt}Pq[q[W|r�qnx)|jD]}|j��r�|VPq�q�WqWdS(N(RQR.R�R.RoR/(R�RtfoundR0(R2(s!/usr/share/yum-cli/yumcommands.pyt_quick_match_iter.s(
c
s+g���fd�}�dkr3�|�}nx�|D]�}g�|jd�dgdtd|dt�}x��dD]�}|j|kr�|�d	|j<q||jd
kr�|�d|j<q|d|jkr�|�d|j<q|d
|jkr|�d|j<q||�d|j<q|Wq:W�S(Ncs�j|��sgS|S(N(R�(tpfs(t_pfstmodified(s!/usr/share/yum-cli/yumcommands.pyt	scoop_pfsGs
R�RR�t
fake_problemstcallbacktfailfastiR*s
not installedR-R+s
missing okR,R)(tverifyRQR.Rt
rpmfile_statet
rpmfile_types(R�R9Rtprobstpf(R5R8R1R2(R7s!/usr/share/yum-cli/yumcommands.pytverify_matchEs&
((RTR�R2R8R�R3RB((R5R8R1R2s!/usr/share/yum-cli/yumcommands.pyt_fs_pkg_walks

cs�d��d�}iid6id6id6id6id6id6id	6id
6dd6dd
6dd6dd6dd6dd6�d��t����fd�}d}|r�|d}|d}ntjj|�s�dtd|�gfSd�|ryt|d��WqqXn�jjtj	�}|j
�j|d|���j�d}tjj
|�r�|d7}||�nx}tj|�D]l\}}	}
xZ|
D]R}|d7}tjj|d|�}tjj|�r�q�n||d|�q�Wq�WdG||�GHd}
|
�d7}
|
�d7}
|
�d
7}
|
�d7}
|
�d7}
|
�d7}
dG�j|
�GH|
s�dS�d}|s�|�d7}|�d7}|�d7}ndGd�j|�Gd|d |
GH|r�x�td!��dftd"��d
ftd#��dftd$��dffD]>\}}|sYqAn|Gd�j|�Gd|d |
GHqAWn�d}|s�|�d
7}ntd%�Gd�j|�Gd|d |
GH|r|d&GHtd'�G|t�d��GHtd(�G|t�d��GHtd)�G|t�d��GHtd*�G|t�d��GHtd+�G|t�d��GHn��fd,�}|r!|�dtd-��|�dtd.��|�dtd/��|�dtd0��|�dtd1��|�dtd2��n�i}|j�d�x*�dD]}�||�d|�qCWx*�dD]}�||�d|�qpWx*�dD]}�||�d|�q�W||td-��d&GH|r��d	�n(i��j�d	��j�d
�t�t���}
|
r?td3�|
GHnd}x}t�d4�fd5�d6t�D]Z}|d7}�|}td7�tt|
��||�j|�fGH||
krgPqgqgWdS(8Ncss.x'|dkr)tjj|�}|VqWdS(NR�(RDRER(RE((s!/usr/share/yum-cli/yumcommands.pyt
_dir_prefixesgscSstjdt|�t�S(s5 String of a number in the readable "locale" format. s%d(R�R�RUR.(R\((s!/usr/share/yum-cli/yumcommands.pytloc_numlst	pkgs_sizet
pkgs_not_sizetpkgs_ghost_sizetpkgs_miss_sizet
pkgs_mod_sizet	pres_sizet	data_sizet
data_not_sizeit
pkgs_counttpkgs_not_counttpkgs_ghost_counttpkgs_miss_counttpkgs_mod_countt
data_countcSs-||krd||<n||c|7<dS(Ni((R�R�R�((s!/usr/share/yum-cli/yumcommands.pyt	_add_size�s
cs�tjj|�}|�dkrQ�dc|7<��d�d||�n�|�dkr��dc|7<��d�d||�nX|�dkr��dc|7<��d	�d||�|�d
|<n|�dkr�dc|7<��d
�d||�n�|�dkr[�dc|7<��d�d||�n�|r�tr�x?�|�D]1}|tkr�qtn��dt||�PqtW�dc|7<|�d|<n�dc|7<|�d|<dS(NR)RNRFR+RPRHR-RORGRMR,RQRIR*RRRJRKRSRL(RDREtgetsizeRQt	pkg_files(tfpathtneed_prefixR�t	fpre_path(RTRDR~R1(s!/usr/share/yum-cli/yumcommands.pytdeal_with_file�s6t.isNo such file or directory: iR�R�RXsFiles            :sTotal size       :s       Pkgs size :s%-5ss	(%3.0f%%)gY@s Ghost pkgs size :s Not pkgs size :s Miss pkgs size :s Mod. pkgs size :s       Data size :RrsPkgs       :sGhost Pkgs :sNot Pkgs   :sMiss. Pkgs :sMod. Pkgs  :cs�t�t���}|r,dGH||GHnd}xwt�d�fd�dt�D]T}|d7}td�tt|��||�j�|�fGH||krTPqTqTWdS(NRriR�cs�|S(N((R\(tp_size(s!/usr/share/yum-cli/yumcommands.pyR��streverseis%*d. %60s %-5s(tminR&R�R.RR�R�(R\R$ttotR�R(Rtmax_show_len(R\s!/usr/share/yum-cli/yumcommands.pyt_pkgs�s(
sTop %d packages:sTop %d ghost packages:sTop %d not. packages:sTop %d miss packages:sTop %d mod. packages:sTop %d prefix packages:sTop %d non-package files:R�cs�|S(N((R\(RL(s!/usr/share/yum-cli/yumcommands.pyR�"sR]s%*d. %60s %-5s(R.RDRERKRRUR4R_RR`RCR?t
closeRpmDBRFtwalktnormpathtislinkR�R&RiR^R�R�(RTRR'RERZR2R�R�troottdirstfilesR0RWR_ttitleRattmpR�tdsznum((RTRDRR~RLR`R1s!/usr/share/yum-cli/yumcommands.pyt_fs_dufs�		

	








	
	
	
"




c
	sK�fd�}|su�jj}|s=dtjd�}ntd�GHtd�Gd�jjkGHtd�G|GHn�|dd%krbd�jjk}|djd�}||kr�|r�td
�GHntd�GHdS|r�td�GHntd�GH�jj}|r|dg}n%g|D]}|dkr"|^q"}dj|��j_|d�n�|dd&kr4|djd�s�t|�dks�d|kr�d}	ndj|d�}	|	�jjkr�|	r�td�|	GHntd �GHdS|	rtd!�|	GHntd"�GH|	�j_|d#�ndtd$�gfSdS('Nc	s�tjj}tjj�jjd�sBtj�jjd�n�jjd}tjj|�s��jjd}tjj|�r�|}q�t	j
�jj|�n�j}||d|j|j
j|j|jd|g�dS(Ns/etc/yums/etc/yum/yum.confs
/etc/yum.conftmaintonly(RIR�t_writeRawConfigFileRDRERKRtinstallroottmakedirstshutiltcopy2tconfig_file_pathR�tcfgtoptionst	iteritemst	optionobj(tconfkeytwriteRawConfigFiletfntnfntybc(R(s!/usr/share/yum-cli/yumcommands.pyt_save,s			srpm: s%_install_langssFile system filters:s	  Nodocs:tnodocss  Languages:itdocst
documentationtnodocumentationtnos%Already enabled documentation filter.s&Already disabled documentation filter.sEnabling documentation filter.sDisabling documentation filter.R�ttsflagstlangstnolangstlangtnolangt	languagestnolanguagestlanguaget
nolanguageiR@RTis"Already filtering languages to: %ss!Already disabled language filter.sSetting language filter to: %ssDisabling language filter.toverride_install_langss$Not a valid sub-command of fs filter(R�RR�R�(R�R�R�R�R�R�R�R�(	RR�trpmtexpandMacroRR�R�R0R&(
RTRR'R~toiltc_ftn_ftntsR\tval((Rs!/usr/share/yum-cli/yumcommands.pyt_fs_filters+sV	%
	1	
c	Csvd|jjk}|jj}|s6tjd�}n|dkrKd}n'|rrdjt|jd���}nt}d}x�|j	j
d|�D]�}tr�q�||jjdd�kr�|j
d	|�}|t|�7}q�|d
|jjd�kkr&|j
d	|�}|t|�7}q�t}q�W|rLdtd
d|�fS|srdtd�dj|�gfSdS(NRs%_install_langsR@RrRTiRtts_install_langsR�ttruet
tsflag_nodocsis%d package to reinstalls%d packages to reinstallisNo valid packages: %sR�(RR�R�R�R�R0R�RRQR?R*R�RR�R&R.RR(	RTRR'R�R�R4R�RR�((s!/usr/share/yum-cli/yumcommands.pyt_fs_refilter|s2	!

cCs�|jjd|�}|jjtj�}|j|dd|dt�}|j�x�t	|d�D]r}t
d�G|GHytj|�Wqct
k
r�}|jtjkr�ytj|�Wq�q�Xq�qcqcXqcWdS(NRR�R�R8R-s	Removing:(R?R*R4R_RR`RCR.RbR�RRDtunlinktOSErrorterrnotEISDIRtrmdir(RTRR'R�R�R1R0R�((s!/usr/share/yum-cli/yumcommands.pyt_fs_refilter_cleanup�s 

cs~���fd�}tjjd�s?tjjtd��ntjjd�sitjjtd��ntjjd�s�tjjtd��nd}|r�|d	}|d
}n|jjd|�}|j	j
tj�}|j
||d|d
t��|j�i�g}x*t�dj��D]}|j}	d|	kr�|	j|jjkr�|jj|	j�}
|
j�s�|jj|
j�q�q�nxw|jj|j�D]`}d|	kr�d|	kr�|	j|jkr�|	j|jkr�|�|j<|j|�Pq�q�W|j�kr+tjjtd�|�q+q+W|r�t j!��|j"|d|j#�}t$|�d	kr�d}
|
td�7}
xI|D]A}tj%j&||�}x"|D]}|
d||f7}
q�Wq�Wtjj|
�q�nxmt'j(|�D]\\}}}xJ|D]B}t'j)j*|d|�}t'j)j+|�rRqn||�qWqW|rzt,j-��ndS(Ncs|�dkrn�|�dkr&n�|�dkrRtjtd�I|IJn�|�dkren�|�dkr���d|j}tjj�d}|�|j�|f}tj|�d�||f}|GHtjj�tj|�ntjtd	�I|IJdS(
NR)R+R-sNot installed:R,R*s)cd %s; rpm2cpio %s | cpio --quiet -id .%ssdiff -ru %s %ssNot packaged?:(	tsyststderrRR\tstdouttflushtlocalPkgRDtsystem(RWRtextract_cmdtdiff_cmd(R�R1ttmpdir(s!/usr/share/yum-cli/yumcommands.pyRZ�s&


R'sCan't find diff commandtcpiosCan't find cpio commandtrpm2cpiosCan't find rpm2cpio commandR[iiRR�R8R*t	from_repot
checksum_typet
checksum_datasCan't find package: %stcallback_totalRrsError downloading packages:
s	  %s: %s
R�(.t	distutilstspawntfind_executableRIR�R�RR?R*R4R_RR`RCR.RbR�R�R�R�RtgetRepoR/R2R3RLR�R\R�R�tpkgIdR�RjtmkdtemptdownloadPkgstdownload_callback_total_cbR&RtuniqueRDRcRERdReRrtrmtree(RTRR'RZR2R�R�tdownloadpkgsR8tiyiR#tapkgtproblemst	errstringR�terrorsterrorRfRgRhR0RW((R�R1R�s!/usr/share/yum-cli/yumcommands.pyt_fs_diff�sj


	

 


cs��fd�}d}|r2|d}|d}n|jjd|�}|jjtj�}|j||d|dt��|j�xmt	j
|�D]\\}}}	xJ|	D]B}
t	jj|d|
�}t	jj
|�r�q�n||�q�Wq�WdS(	Ncs�|�dkrny|�dkr&nf|�dkrHtd�G|GHnD|�dkr[n1|�dkr}td�G|GHntd�G|GHdS(	NR)R+R-sNot installed:R,R*s	Modified:sNot packaged?:(R(RW(R1(s!/usr/share/yum-cli/yumcommands.pyRZsR[iiRR�R8R�(R?R*R4R_RR`RCR.RbRDRcRERdRe(RTRR'RZR2R�R�RfRgRhR0RW((R1s!/usr/share/yum-cli/yumcommands.pyt
_fs_status
s



c
Csi|r-|ddkr-|d}|d
}nd}tr<n|dkr]|j||�}n�|dkr~|j||�}n�|dkr�|j||�}n�|dkr�|j||�}n�|dkr�|j||�}n_|dkr|j||�}n>|d	kr)t�j|dt	�}nd
t
d�|gfS|dk	rP|Sd|d
|dgfS(s�Execute this command.

        :param base: a :class:`yum.Yumbase` object
        :param basecmd: the name of the command
        :param extcmds: the command line arguments passed to *basecmd*
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        iR�R(trefiltersrefilter-cleanupR&R�R'R#isfs snapsNot a valid sub-command of %sR�s done(sfilterssfilterR�srefilter-cleanupsdusstatussdiffssnap(sfiltersfiltersN(RQRlR�R�R�R�R�RR^RWRR�(RTRRR'R�Rm((s!/usr/share/yum-cli/yumcommands.pyR^.s4
	

(RbRcRYR[R\R]RQRCRlR�R�R�R�R�R^(((s!/usr/share/yum-cli/yumcommands.pyR$�s				M	�	Q			Y	$(PRdRDR�RR�RIRRRRt
yum.ErrorsR�R�RR�tyum.i18nRRRRRjRrtdistutils.spawnR�RmR�t
yum.configRtyum.packagesR	tyum.fssnapshotsR
RRRR%R(R*R7R8R9RBRGRORPReRhRnR�R�R�R�R�R�R�R=RSRVRZRhRjRkRrRvRyR{R�R�R�R�R
RLRSR�R�R�R�RRR$(((s!/usr/share/yum-cli/yumcommands.pyt<module>s�"			
				&				o=<<		�k��kNBlM<K<BC�LnGH��L�^�2�]1�

Anon7 - 2022
AnonSec Team