a
    ˆ�Áj  ã                   @   sF   d dl mZ d dlmZ d dlmZ d dlmZ G dd„ dejƒZ	dS )é    )Úabsolute_import)Úcommands)ÚCleanCommandLock)Ú_c                   @   s8   e Zd ZdZdZedƒZedd„ ƒZdd„ Z	dd	„ Z
d
S )ÚDistroSyncCommandzZA class containing methods needed by the cli to execute the
    distro-synch command.
    )zdistro-syncZ
distrosynczdistribution-synchronizationZdsyncz?synchronize installed packages to the latest available versionsc                 C   s   | j ddtdƒd� d S )NÚpackageÚ*zPackage to synchronize)ÚnargsÚhelp)Úadd_argumentr   )Úparser© r   ú?/usr/lib/python3.9/site-packages/dnf/cli/commands/distrosync.pyÚset_argparser#   s    zDistroSyncCommand.set_argparserc                 C   sN   | j j}d|_d|_d|_d|_tj|_t	 
| j| j ¡ t	 | j| jj¡ d S )NT)ZcliÚdemandsZsack_activationZavailable_reposZ	resolvingZ	root_userr   ZREADZclean_command_lockr   Z_checkGPGKeyÚbaseZ_checkEnabledRepoÚoptsr   )Úselfr   r   r   r   Ú	configure'   s    zDistroSyncCommand.configurec                 C   s   | j  | jj¡S )N)r   Zdistro_sync_userlistr   r   )r   r   r   r   Úrun1   s    zDistroSyncCommand.runN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úaliasesr   ZsummaryÚstaticmethodr   r   r   r   r   r   r   r      s   

r   N)
Z
__future__r   Zdnf.clir   Zdnf.cli.demandr   Zdnf.i18nr   ZCommandr   r   r   r   r   Ú<module>   s   