← Back
Editing: history.cpython-312.pyc
� �(f%F � �� � d dl mZ d dl mZ d dl mZ d dlZd dlZd dlmZmZ d dl m Z d dlmZm Z d dl Zd dlZd dlZd dlZd dlZd dlZd dlZ ej* d� Z G d � d e j. � Zy)� )�absolute_import)�print_function)�unicode_literalsN)�_�ucd)�commands)�TransactionReplay�serialize_transaction�dnfc � � � e Zd ZdZdZ ed� Zg d�Z� fd�Ze d� � Z d� Zd� Zd � Z d � Zd� Zd� Zd � Zd� Zd� Zd� Zd� Zd� Zd� Z� xZS )�HistoryCommandzUA class containing methods needed by the cli to execute the history command. )�history�histz(display, or use, the transaction history)�list�info�redo�replay�rollback�store�undo� userinstalledc �: �� t t | � |i |�� d| _ y )NF)�superr �__init__�_require_one_transaction_id)�self�args�kw� __class__s ��=/usr/lib/python3.12/site-packages/dnf/cli/commands/history.pyr zHistoryCommand.__init__4 s �� � �n�d�,�d�9�b�9�+0��(� c � � | j ddddj t j d dj t j dd � � �� | j d d d�� | j d dd t d� �� | j dd t d� �� | j dd t d� �� | j dd t d� �� | j dddd�� | j dddd�� y )N�transactions_action�?�COMMANDz$Available commands: {} (default), {}r z, � )�nargs�metavar�helpz --reverse� store_truez$display history list output reversed)�actionr) z-oz--outputz<For the store command, file path to store the transaction to)�defaultr) z--ignore-installedzXFor the replay command, don't check for installed packages matching those in transactionz--ignore-extraszRFor the replay command, don't check for extra packages pulled into the transactionz--skip-unavailablezYFor the replay command, skip packages that are not available or have missing dependencies�transactions�*�TRANSACTIONz�For commands working with history transactions, Transaction ID (<number>, 'last' or 'last-<number>' for one transaction, <transaction-id>..<transaction-id> for a range)�transaction_filename�TRANSACTION_FILEzEFor the replay command, path to the stored transaction file to replay)�add_argument�formatr �_CMDS�joinr )�parsers r � set_argparserzHistoryCommand.set_argparser9 sH � ����1��i�!G�!N�!N� .� 4� 4�Q� 7� $� � �.�*>�*>�q�r�*B� C�"E� � F� ���K��!G� � I����D�*�d�!"�#a�!b� � d����0��!"� $3� "4� � 5� ���-�l�!"� $3� "4� � 5� ���0��!"� $3� "4� � 5� ���N�#�}�"0� � 1� ���2�#�GY�">� � ?r! c �� � | j j s| j d | j _ nz| j j | j vrX| j j j d| j j � | j d | j _ t d� j | j j � | _ | j j }| j j dk( �ri| j j s(t j j t d� � �t | j j � dkD r(t j j t d� � �t j j | j j d � | j _ g | j _ d|_ d|_ d|_ d| j( j* _ d| j( j* _ t j j0 j3 | j( | j � �n�| j j d k( rFd| _ | j j �sit j j t d � � �| j j dv �r!d|_ d|_ d|_ d| _ | j j s?t d � }t6 j9 |� t j j |� �t | j j � dkD rHt6 j9 | j � t j j | j � �d|_ t j j0 j3 | j( | j � nd|_ d|_ | j( j>