<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
ft`s	                 @   s`   d dl mZ d dl mZ d dlmZ d dlmZ d dlZd dl	Z	e	j
dZG dd dejZdS )	    )absolute_import)unicode_literals)_)commandsNdnfc               @   sL   e Zd ZdZdZedjejj	dZ
edd Zdd Zd	d
 Zdd ZdS )SwapCommandzNA class containing methods needed by the cli to execute the swap command.
    swapz=run an interactive {prog} mod for remove and install one spec)progc             C   s,   | j ddtdd | j ddtdd d S )Nremove_specZstorezThe specs that will be removed)actionhelpinstall_specz The specs that will be installed)add_argumentr   )parser r   /usr/lib/python3.6/swap.pyset_argparser&   s    
zSwapCommand.set_argparserc             C   sH   | j j}d|_d|_d|_d|_tj| j| j  tj	| j| j
jg d S )NT)clidemandsZsack_activationZavailable_reposZ	resolvingZ	root_userr   Z_checkGPGKeybaseZ_checkEnabledRepooptsr   )selfr   r   r   r   	configure,   s    zSwapCommand.configurec             C   s@   | j jj|}|d k	r<|| j }| j jj|||g |j  d S )N)r   Zcli_commandsgetZ	optparserZparse_command_argsrun)r   Zcmd_strspecZcmd_clscmdr   r   r   _perform5   s
    
zSwapCommand._performc             C   s$   | j d| jj | j d| jj d S )NremoveZinstall)r   r   r
   r   )r   r   r   r   r   <   s    zSwapCommand.runN)r   )__name__
__module____qualname____doc__aliasesr   formatr   utilZMAIN_PROG_UPPERZsummarystaticmethodr   r   r   r   r   r   r   r   r      s   	r   )Z
__future__r   r   Zdnf.i18nr   Zdnf.clir   Zdnf.utilr   ZloggingZ	getLoggerZloggerZCommandr   r   r   r   r   <module>   s   
