/usr/lib/python3.9/site-packages/dnf/cli/commands/__pycache__
Edit: /usr/lib/python3.9/site-packages/dnf/cli/commands/__pycache__/reinstall.cpython-39.pyc (3069B)
a
!c] @ sl d dl mZ d dl mZ d dlmZ d dlmZ d dlmZ d dl Z
d dlZedZ
G dd d ejZdS )
)absolute_import)unicode_literals)commands)OptionParser)_Ndnfc @ s8 e Zd ZdZdZedZedd Zdd Z dd Z
d
S )ReinstallCommandzSA class containing methods needed by the cli to execute the reinstall command.
) reinstallZreizreinstall a packagec C s" | j ddtdtjtdd d S )Npackages+zPackage to reinstallZPACKAGE)nargshelpactionmetavar)add_argumentr r ZParseSpecGroupFileCallback)parser r >/usr/lib/python3.9/site-packages/dnf/cli/commands/reinstall.py
set_argparser( s zReinstallCommand.set_argparserc C sH | j j}d|_d|_d|_d|_t| j| j | j j
sDt| j dS )a 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.
TN)ZclidemandsZsack_activationZavailable_reposZ resolvingZ root_userr Z_checkGPGKeybaseopts filenamesZ_checkEnabledRepo)selfr r r r configure. s zReinstallCommand.configurec C s d}| j j| jjd| j jjdD ]N}z| j | W n4 tjj yh t
td| j jj
|j Y q 0 d}q | jjdd | jjD D ].}z| j | W n tjjy } zT|jD ]$}t
td| jj
|j qqt
td| j jj
| W Y d }~qd }~0 tjjy } z`|jD ]L}d}| j j|}|rVtd | }td
}t
|| j jj
|| q.W Y d }~qd }~0 tjj y dsJ dY q0 d}q|stjtdd S )
NF)strictprogresszNo match for argument: %sTc S s g | ]}d | qS )@r ).0xr r r
L z(ReinstallCommand.run..z(Package %s available, but not installed. z
(from %s)z%Installed package %s%s not available.z+Only the above marking errors are expected.z!No packages marked for reinstall.)r Zadd_remote_rpmsr r outputr Zpackage_reinstallr
exceptionsZMarkingErrorloggerinfor ZtermZboldlocationZ pkg_specsZ grp_specsr ZPackagesNotInstalledErrorr
nameZPackagesNotAvailableErrorhistoryZrepoError)r ZdonepkgZpkg_specerrZxmsgZpkgrepomsgr r r run= sL
zReinstallCommand.runN)__name__
__module____qualname____doc__aliasesr Zsummarystaticmethodr r r. r r r r r ! s
r )Z
__future__r r Zdnf.clir Zdnf.cli.option_parserr Zdnf.i18nr Zdnf.exceptionsr ZloggingZ getLoggerr% ZCommandr r r r r s