a
º&c1 ã @ sÎ d dl mZ d dl mZ d dlmZ d dlmZmZ d dlZd dl Zd dl
Z
d dlZd dlZd dl
Z
d dlZd dlZdZG dd„ dejƒZG d d
„ d
ejjƒZG dd„ dejjƒZd
d„ Zdd„ Zdd„ ZdS )é )Úabsolute_import)Úunicode_literals©Úucd)Ú_ÚloggerNzdnf-debug-dump version 1
c s e Zd ZdZ‡ fdd„Z‡ ZS )ÚDebugÚdebugc sD t t| ƒ ||¡ || _|| _| jd ur@| j t¡ | j t¡ d S ©N)Úsuperr Ú__init__ÚbaseÚcliZregister_commandÚDebugDumpCommandÚDebugRestoreCommand)Úselfr
r ©Ú __class__© ú5/usr/lib/python3.9/site-packages/dnf-plugins/debug.pyr ) s
zDebug.__init__)Ú__name__Ú
__module__Ú__qualname__Únamer Ú
__classcell__r r r r r % s r c st e Zd ZdZedƒZ‡ fdd„Zdd„ Zedd„ ƒZ d d
„ Z
dd„ Zd
d„ Zdd„ Z
dd„ Zdd„ Zdd„ Z‡ ZS )r )z
debug-dumpz5dump information about installed rpm packages to filec s t t| ƒ |¡ d | _d S r
)r r r Ú dump_file)r r r r r r 7 s zDebugDumpCommand.__init__c C s d| j j_d| j j_d S ©NT)r ÚdemandsÚsack_activationÚavailable_repos©r r r r Ú configure; s
zDebugDumpCommand.configurec C s. | j dddtdƒd | j ddtdƒd d S )
Nz --noreposÚ
store_trueFz/do not attempt to dump the repository contents.)ÚactionÚdefaultÚhelpÚfilenameú?zoptional name of dump file©Únargsr% ©Úadd_argumentr ©Úparserr r r Ú
set_argparser? s þþzDebugDumpCommand.set_argparserc C sÀ | j j}|s6t dt t ¡ ¡¡}dt ¡ d |f }tj |¡}| d¡r\t
|d¡| _nt
|dƒ| _| t¡ | ¡ | ¡ | ¡ | | j j ¡ | ¡ | j ¡ ttdƒ| ƒ dS )z{create debug txt file and compress it, if no filename specified
use dnf_debug_dump-