a !cA @s`ddlmZddlmZddlmZddlmZddlZddl Z e dZ Gdddej Z dS) )absolute_import)unicode_literals)_)commandsNdnfc@sLeZdZdZdZedjejj dZ e ddZ ddZ d d Zd d Zd S) SwapCommandzNA class containing methods needed by the cli to execute the swap command. )Zswapz=run an interactive {prog} mod for remove and install one spec)progcCs,|jddtdd|jddtdddS)N remove_specstorezThe specs that will be removed)actionhelp install_specz The specs that will be installed) add_argumentr)parserr9/usr/lib/python3.9/site-packages/dnf/cli/commands/swap.py set_argparser&s zSwapCommand.set_argparsercCsH|jj}d|_d|_d|_d|_t|j|jt |j|j j gdS)NT) clidemandsZsack_activationZavailable_reposZ resolvingZ root_userrZ _checkGPGKeybaseZ_checkEnabledRepooptsr )selfrrrr configure,szSwapCommand.configurecCs@|jj|}|dur<||j}|jj|||g|dS)N)rZ cli_commandsgetZ optparserZparse_command_argsrun)rZcmd_strspecZcmd_clscmdrrr_perform5s  zSwapCommand._performcCs$|d|jj|d|jjdS)Ninstallremove)rrr r )rrrrr<szSwapCommand.runN)__name__ __module__ __qualname____doc__aliasesrformatrutilZMAIN_PROG_UPPERZsummary staticmethodrrrrrrrrrs  r)Z __future__rrZdnf.i18nrZdnf.clirZdnf.utilrZloggingZ getLoggerloggerZCommandrrrrrs