/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 dlZe d¡Z
G dd „ d ejƒZdS )
é )Úabsolute_import)Úunicode_literals)Úcommands)ÚOptionParser)Ú_NÚdnfc @ s8 e Zd ZdZdZedƒZedd„ ƒ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 ddtdƒtjtdƒd� d S )NÚpackagesú+zPackage to reinstallZPACKAGE)ÚnargsÚhelpÚactionÚmetavar)Ú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)ZcliÚdemandsZsack_activationZavailable_reposZ resolvingZ root_userr Z_checkGPGKeyÚbaseÚoptsÚ filenamesZ_checkEnabledRepo)Úselfr r r r Ú configure. s zReinstallCommand.configurec C sÖ d}| j j| jjd| j jjd�D ]N}z| j |¡ W n4 tjj yh t
tdƒ| j jj
|j¡¡ Y q 0 d}q | jjdd„ | jjD ƒ D �].}z| j |¡ W �n tjj�y } zT|jD ]$}t
tdƒ| jj
|j¡¡ qäq¾t
tdƒ| j jj
|¡¡ W Y d }~qŠd }~0 tjj�y� } z`|jD ]L}d}| j j |¡}|�rVtd ƒ| }td
ƒ}t
|| j jj
|¡|¡ �q.W Y d }~qŠd }~0 tjj �y´ d�s°J dƒ‚Y qŠ0 d}qŠ|�sÒtj tdƒ¡‚d S )
NF)ÚstrictÚprogresszNo match for argument: %sTc S s g | ]}d | ‘qS )ú@r )Ú.0Úxr 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 Ú
exceptionsZMarkingErrorÚloggerÚinfor ZtermZboldÚlocationZ pkg_specsZ grp_specsr ZPackagesNotInstalledErrorr
ÚnameZPackagesNotAvailableErrorÚhistoryZrepoÚError)r ZdoneÚpkgZpkg_specÚerrZxmsgZpkgrepoÚmsgr r r Úrun= sL ÿ
ÿ
ÿ
ÿ
ÿzReinstallCommand.runN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úaliasesr ZsummaryÚstaticmethodr 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