MOON
Server: Apache
System: Linux server2.shieldcogroup.com 3.10.0-1160.119.1.el7.tuxcare.els12.x86_64 #1 SMP Fri Nov 8 05:49:38 UTC 2024 x86_64
User: jacom (1029)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python2.7/site-packages/dnf/cli/output.pyo
�
�[/\c@@sKdZddlmZddlmZddlmZddlZddlmZddl	m
Z
mZddlm
Z
mZmZmZmZmZmZdd	lmZmZmZmZdd
lmZddlmZddlZddlZddl Zddl!Zddl"Zddl#ZddlZddl$Zddl%Zddl&Zddl'Z'ddl(Z(ddl)Z)ddl*Z*ddl+Z+ddl,Z,ddl-Z-ddl.Z.e*j/d�Z0d
�Z1d�Z2de3fd��YZ4dej5j6fd��YZ7dej5j8fd��YZ9defd��YZ:e;d�Z<dS(u"Handle actual output from the cli.i(tabsolute_import(tprint_function(tunicode_literalsN(tdeepcopy(t
format_numbertformat_time(t_tC_tP_tucdtfill_exact_widtht
textwrap_filltexact_width(txranget
basestringtlongtunicode(tLoggingTransactionDisplay(tMergedTransactionWrapperudnfcC@s,tjjigd6gd6gd6gd6gd6gd6gd6gd6gd	6gd
6gd6�}x�|D]�}|jtjjkr�|jj|�qf|j	tjj
kr�|jj|�qf|j	tjjkr\|j
tjjkr�|jj|�q$|j
tjjkr!|jj|�q$|j
tjjkrI|jj|�q$|jj|�qf|j	tjjkr�|jj|�qf|j	tjjkr�|j
tjjkr�|jj|�q$|j
tjjkr�|jj|�q$|jj|�qf|j	tjjkrf|jj|�qfqfW|S(Nu
downgradedueraseduerased_cleanu
erased_depu	installeduinstalled_groupu
installed_depuinstalled_weakureinstalleduupgradedufailed(tdnftutiltBunchtstatetlibdnfttransactiontTransactionItemState_ERRORtfailedtappendtactiontTransactionItemAction_DOWNGRADEt
downgradedtTransactionItemAction_INSTALLtreasontTransactionItemReason_GROUPtinstalled_groupt TransactionItemReason_DEPENDENCYt
installed_dept%TransactionItemReason_WEAK_DEPENDENCYtinstalled_weakt	installedtTransactionItemAction_REINSTALLtreinstalledtTransactionItemAction_REMOVEtTransactionItemReason_CLEANterased_cleant
erased_depterasedtTransactionItemAction_UPGRADEtupgraded(Rtgoaltbttsi((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_make_lists5sH

cC@s�tj|ftjd��}t|�}|d}||}|sZtjd|�}n|rt|jd|�nt|�}tt||g|��S(Nui(u(t	itertoolstchaintrepeattlentextendtitertlisttzip(t
cols_counttlabeltlsttleftt
lst_lengthtright_countt
missing_itemstlst_iter((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_spread_in_columnsbs
tOutputcB@s�eZdZddZd�Zd�Zd�Zd�Zd�Ze	d��Z
ed	��Zed
��Z
ededd
�Ze	d��Zd�Zddd�Zedeed�Zedeed�Zd�Zd�Zd�Zdd�Zed�Zed�Zieid�Zeed�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#eeed"�Z$ed#�Z%ed$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.ed-�Z/e	d.��Z0d/�Z1d0�Z2d1�Z3ge4�d2�Z5gd3�Z6ie7d4�d56e7d4�d46e7d6�d66e7d7�d76e7d8�d86e7d9�d96e7d:�d:6e7d;�d;6e7d<�d<6e7d=�d>6e7d?�d@6Z8gdA�Z9dB�Z:RS(Cu+Main output class for the yum command line.u icC@s4||_||_tjjj�|_d|_dS(N(tconftbaseRtclittermtTermtNonetprogress(tselfRHRG((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt__init__ts		cC@s>|jj}d|}|jt||�d�}|||fS(Nu%su=u u=(RJtcolumnst
fmtColumnsR<(RNtcol_datatrowt
term_widthtruletheader((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_bannerzs
c
C@s�g|dD]}t�^q}x[|D]S}xJt|�D]<\}}||}t|�}|j|d�d||<q:Wq'W|j|ddd�}	tttj	|	��S(Niitindentu  (
tdictt	enumerateR8tgettcalcColumnsRLR;tmaptoperatortneg(
RNtrowsRRRRStitvaltcol_dcttlengthtcols((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_col_widths�s 

"cC@s�d}d}|snHt|t�s1|dkrD|jjd}n|dkrSn
x|jdd�j�D]�}|dkr�d}ql||jjkr�||jj|7}ql||jjkr�||jj|7}ql|jd�r|d|jjkr||jj|d7}ql|jd�rl|d|jjkrl||jj|d7}qlqlW|rv|jjd}n||fS(	Nuuboldunormalu,u ufg:iubg:(	t
isinstanceRRJtMODEtreplacetsplittFG_COLORt
startswithtBG_COLOR(RNt	highlightthibegthiendthigh((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
_highlight�s0	cK@s1|j|�\}}|jj|||||�S(N(RrRJtsub(RNthaystackRntneedlestkwdsRoRp((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_sub_highlight�scC@sAd}x4|D],}||d|kr+Pn||d7}q
W|S(u; Spaces left on the current field will help how many pkgs? ii((tcurrentt	data_tupsR@tretttup((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_calc_columns_spaces_helps�s
cC@s
|jjS(N(RHthistory(RN((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR}�scC@s
|jjS(N(RHtsack(RN((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR~�siucC@sgt|�}|}dg|}x1td|�D] }t||j��||<q/W|dkrn|jj}n|s�g}	x9|D]1}
|
r�|	j|
dd�q�|	jd�q�W|	dct|�7<|jj}t	|	�|kr�|	S|}n|dkr$dg|d}|jd�n|t	|�|dt
|�8}|ds]|d7}nx|dkrbd}d}
x�td|�D]y}|j|||||�}|s�q�n|r�||dkr�|d|kr�q�n||kr�q�n|}|}
q�W|rr||
j
d�d||
}||
rR|
|dkrR|d8}n||
c|7<||8}q`nd}x1td|�D] }||s�q�n|d7}q�W|r||}xDtd|�D]0}||s�q�n||c|7<||8}q�Wn|d8}||}x'td|�D]}||c|7<q'W||c|||7<d}q`W|S(u�Dynamically calculate the widths of the columns that the
        fields in data should be placed into for output.

        :param data: a list of dictionaries that represent the data to
           be output.  Each dictionary in the list corresponds to a
           column of output. The keys of the dictionary are the
           lengths of the items to be output, and the value associated
           with a key is the number of items of that length.
        :param columns: a list containing the minimum amount of space
           that must be allocated for each row. This can be used to
           ensure that there is space available in a column if, for
           example, the actual lengths of the items being output
           cannot be given in *data*
        :param remainder_column: number of the column to receive a few
           extra spaces that may remain after other allocation has
           taken place
        :param total_width: the total width of the output.
           self.term.real_columns is used by default
        :param indent: string that will be prefixed to a line of
           output to create e.g. an indent
        :return: a list of the widths of the columns that the fields
           in data should be placed into for output
        ii����iiN(R8RLtrangetsortedtitemsRJtreal_columnsRRPtsumRR
R|tpop(RNtdataRPtremainder_columnttotal_widthRXRetpdatatdtfull_columnstcolt
default_widththelpsRbtthelpstdifftoverflowed_columnstnorm((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR\�s�

	
"

	&








cC@s!|dkrt|fSt|fS(u$Returns tuple of (align_left, width)i(tTruetFalse(twidth((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_fmt_column_align_width=scC@szt|�dkr+|\}}d}}nt|�dkrd|\}}}|j|�\}}nt|�|||fS(Niui(R8RrR	(RNRRRbR�RoRpRn((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt	_col_dataDs
c
	C@s�t|�}t|�}g}x|d D]
}|j|�\}}}	}
|sm|d7}|j|�q)n|j|�\}}t|�}||kr�|d7}|r�|j|	|d|||
g�q"|j|	d||||
g�n0|dd||d7}|j|	||
g�||7}|d7}q)W|j|d�\}}}	}
|j|�\}}t||d|d|	d	|
�}|d
|7}|j|�|t|�S(u.Return a row of data formatted into a string for output.
        Items can overflow their columns.

        :param columns: a list of tuples containing the data to
           output.  Each tuple contains first the item to be output,
           then the amount of space allocated for the column, and then
           optionally a type of highlighting for the item
        :param msg: a string to begin the line of output with
        :param end: a string to end the line of output with
        :return: a row of data formatted into a string for output
        i����u%su	%s%s%s%s u u%s%s%s
iR@tprefixtsuffixu%%s%s(	R;R8R�RR�RR9R
ttuple(
RNRPtmsgtendR�R�RRRbR�RoRpt
align_leftt	val_width((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRQNs6


$$

cC@su|dkrd}nd||j|jf}|ddg}t||j|jf||�}t|j|��dS(u�Print a package as a line.

        :param pkg: the package to be printed
        :param ui_overflow: unused
        :param indent: string to be prefixed onto the line to provide
           e.g. an indent
        :param highlight: highlighting options for the name of the
           package
        :param colums: tuple containing the space allocated for each
           column of output.  The columns are the package name, version,
           and repository
        i���i��i�u%s%s.%sunormalN(i���i��i�(RLtnametarchR<tevrt
_from_repotprintRQ(RNtpkgtui_overflowRXRnRPtnathi_cols((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
simpleList}s	!c	C@sr|dkrd}nd|t|�f}|ddg}|j}t||f||�}t|j|��dS(u'Print a package as a line, with the package itself in envra
        format so it can be passed to list/install/etc.

        :param pkg: the package to be printed
        :param ui_overflow: unused
        :param indent: string to be prefixed onto the line to provide
           e.g. an indent
        :param highlight: highlighting options for the name of the
           package
        :param colums: tuple containing the space allocated for each
           column of output.  The columns the are the package envra and
           repository
        i����i�u%s%sunormalN(i����i�(RLR	tui_from_repoR<R�RQ(	RNR�R�RXRnRPtenvraR�trid((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytsimpleEnvraList�s		cC@stt|j��dS(u.Print a package as a line containing its name.N(R�R	R�(RNR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytsimple_name_list�scC@stt|��dS(u/Print a package as a line containing its NEVRA.N(R�R	(RNR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytsimple_nevra_list�sc	C@s�t|�}|jj}d|dd}|s4|St|�}t|d|d|d|�}|jd�dkr�||d	kr�t|d|d|dd
�}n|S(u�Return a key value pair in the common two column output
        format.

        :param key: the key to be formatted
        :param val: the value associated with *key*
        :return: the key value pair formatted in two columns for output
        u iu: R�tinitial_indenttsubsequent_indentu
iiu
     ...: (RRJRPR	Rtcount(RNtkeyRbtkeylenRetnxtRz((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
fmtKeyValFill�s	%u=cC@s�t|�}|jjd}t|�}||dkrI|d}}n*|||d}|||t|�}d|||fS(u�Format and return a section header.  The format of the
        header is a line with *name* centred, and *fill* repeated on
        either side to fill an entire line on the terminal.

        :param name: the name of the section
        :param fill: the character to repeat on either side of *name*
          to fill an entire line.  *fill* must be a single character.
        :return: a string formatted to be a section header
        iiu%s %s %s(R	RJRPRR8(RNR�tfillRetname_lentbegR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
fmtSection�s
c@s1d�}�fd�}g}�j|�\}}|j|td�d||j|f��|jr�|j|td�|j��n|j|td�|j��|j|td�|j��|j|td�|j��|j|td	�tt	|j
����|j|td
�|j��|j|td�|j��|j
r��jj|�}|r�|j|td�|��q�n�jjr�|j|td
�|j��|j|td�tjj|j���|jr |j|td�tjj|j���n�jj|�}	|	r�yt|	jj��}
Wntk
rjd}
nX|j|td��j|
���q�n|j|td�|j��|j r�|j|td�t!|j ���n|j|td�|j"��|j|td�|j#��dj$|�S(u�Print information about the given package.

        :param pkg: the package to print information about
        :param hightlight: highlighting options for the name of the
           package
        cS@s(djt|dd�dt|�g�S(Nu iu:(tjoinR
tstr(R�Rb((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytformat_key_val�sc@s&�jt|dd�d|p"d�S(Niu : u(R�R
(R�Rb(RN(s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytformat_key_val_fill�suNameu%s%s%suEpochuVersionuReleaseuArchuSizeuSourceuRepou	From repouPackageru	BuildtimeuInstall timeuInstalled byuSummaryuURLuLicenseuDescriptionu
N(%RrRRR�tepochtversiontreleaseR�Rtfloatt_sizet	sourcerpmtrepoidt_from_systemR}trepoRGtverbosetpackagerRRtnormalize_timet	buildtimetinstalltimetpackage_datatintt_itemtgetInstalledByt
ValueErrorRLt_pwd_ui_usernametsummaryturlR	tlicensetdescriptionR�(RNR�RnR�R�toutput_listRoRpthistory_repothistory_pkgtuid((RNs2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
infoOutput�sJ	,	"+	"	

+	(c
C@s�|\}}|dk	r�|jj}|jtjkrE|jj}n|j|d|d|�|j|d|dd	d|jj�dS|j	�}d|j
|jf}|j}	t
d||	||f�dS(
u{Print a simple string that explains the relationship
        between the members of an update or obsoletes tuple.

        :param uotup: an update or obsoletes tuple.  The first member
           is the new package, and the second member is the old
           package
        :param changetype: a string indicating what the change between
           the packages is, e.g. 'updates' or 'obsoletes'
        :param columns: a tuple containing information about how to
           format the columns of output.  The absolute value of each
           number in the tuple indicates how much space has been
           allocated for the corresponding column.  If the number is
           negative, the text in the column will be left justified,
           and if it is positive, the text will be right justified.
           The columns of output are the package name, version, and repository
        RPRnRXu iNu%s.%su%-35.35s [%.12s] %.10s %-20.20su    (RLRGtcolor_update_remotetreponamethawkeytSYSTEM_REPO_NAMEtcolor_update_localR�tcolor_update_installedtcompactPrintR�R�R�R�(
RNtuotupt
changetypeRPt	changePkgtinstPkgtchit	c_compactt	i_compacttc_repo((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytupdatesObsoletesLists
	c	C@s�|dkr�d}t|�dkrd}td|�xDt|�D]3}|j|jf}	t}
|	|kr�|jdd	�}
nb|j||	�r�|jd
d	�}
n:|j||	�r�|jdd�}
n|jd
d	�}
|dkr|j	|dt
d|
d|�qE|dkr@t|j|d|
�d�qE|dkr\|j|�qE|dkrE|j
|�qEqEWn|dkr�ddgfSdgfSdS(u�Prints information about the given list of packages.

        :param lst: a list of packages to print information about
        :param description: string describing what the list of
           packages contains, e.g. 'Available Packages'
        :param outputType: The type of information to be printed.
           Current options::

              'list' - simple pkg list
              'info' - similar to rpm -qi output
              'name' - simple name list
              'nevra' - simple nevra list
        :param highlight_na: a dictionary containing information about
              packages that should be highlighted in the output.  The
              dictionary keys are (name, arch) tuples for the package,
              and the associated values are the package objects
              themselves.
        :param columns: a tuple containing information about how to
           format the columns of output.  The absolute value of each
           number in the tuple indicates how much space has been
           allocated for the corresponding column.  If the number is
           negative, the text in the column will be left justified,
           and if it is positive, the text will be right justified.
           The columns of output are the package name, version, and
           repository
        :param highlight_modes: dictionary containing information
              about to highlight the packages in *highlight_na*.
              *highlight_modes* should contain the following keys::

                 'not_in' - highlighting used for packages not in *highlight_na*
                 '=' - highlighting used when the package versions are equal
                 '<' - highlighting used when the package has a lower version
                       number
                 '>' - highlighting used when the package has a higher version
                       number
        :return: (exit_code, [errors])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string

        ulistuinfounameunevraiiu%sunot inunormalu=u>uboldu<R�RnRPu
uNo packages to listN(ulistuinfounameunevra(R8R�R�R�R�R�R[tevr_eqtevr_ltR�R�R�R�R�(RNR?R�t
outputTypethighlight_naRPthighlight_modestthingslistedR�R�Rn((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytlistPkgs7s8- 
cC@s�ttd��ttd��f}ttd��ttd��f}||}xBtr�|d	krvtd�}nd}|jjr�|d	kr�td�}q�|}nytjj|�}Wn+t	k
r�nt
k
r�|d}nXt|�j�}t|�dkr7|jjr*|dn|d}n||krGPnd|krmd|krm|d}Pnd|krUd|krU|d}PqUqUW||kr�tSt
S(
u�Get a yes or no from the user, and default to No

        :msg: String for case with [y/N]
        :defaultyes_msg: String for case with [Y/n]
        :return: True if the user selects yes, and False if the user
           selects no
        uyuyesununouIs this ok [y/N]: uuIs this ok [Y/n]: iN(R	RR�RLRGt
defaultyesRti18nt	ucd_inputtEOFErrortKeyboardInterrupttlowerR8R�(RNR�tdefaultyes_msgtyuitnuitauitchoice((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytuserconfirm�s>$$
		

#

cC@s�|jj�j�j�}|jj�j�j�}i}xitjtt|��d�D]H}||kr�||d||<q\||kr\||d||<q\q\W|S(Nii(	R~tqueryR't
_name_dictt	availableR5R6R;R<(RNtsectionsR'R�R�tpkg_name((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_pkgs2name_dict�s&c	C@s�i}i}x�tjtt|��d�D]�}|j|�}|dkrSq,ntt|��t|j�}tt|j	��}|j|d�d||<|j|d�d||<q,W||fS(Nii(
R5R6R;R<R[RLRR	tGRP_PACKAGE_INDENTR�(	RNRt	name_dictt
nevra_lengthstrepo_lengthsRR�tnevra_ltrepo_l((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_pkgs2col_lengths�s&cC@s,x%|D]}td|j|f�qWdS(Nu%s%s(R�R(RNt	pkg_namesR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_display_packages�s
cC@s�x�|D]�}y||}Wn+tk
rHtd|j|f�qnXt}|jsg|jj}n|j|dtd|jd|d|�qWdS(Nu%s%sR�RXRnRP(	tKeyErrorR�RR�R�RGtcolor_list_available_installR�R�(RNR
RRPR�R�Rn((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_display_packages_verbose�s

		c
C@s�d�}tdtd�|j�|jj}|rVttd�t|j��n|jr�ttd�t|j�p~d�n|jr�ttd�|j�ntd�||j	�ftd	�||j
�ftd
�||j�ftd�||j�ff}|r�|j
|�}|j||�}|j|�}|d|d
f}x�|D]A\}}	t|	�d
kr�qant|�|j|	||�qaWnFxC|D];\}}	t|	�d
kr�q�nt|�|j|	�q�WdS(u�Output information about the packages in a given group

        :param group: a Group object to output information about
        cS@std�|D��S(Ncs@s|]}|jVqdS(N(R�(t.0R�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pys	<genexpr>�s(R�(tpackages((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytnames�su
u	Group: %su
 Group-Id: %su Description: %suu
 Language: %su Mandatory Packages:u Default Packages:u Optional Packages:u Conditional Packages:iiN(R�Rtui_nameRGR�R	tidtui_descriptiont	lang_onlytmandatory_packagestdefault_packagestoptional_packagestconditional_packagesRR	R\R8RR(
RNtgroupRR�RRtcol_lengthsRPtsection_nameR((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytdisplay_pkgs_in_groups�s8	 	&	

cC@sd�}ttd�|j�|jjrLttd�t|j��n|jr�t|j�pgd}ttd�|�ntd�||j�ftd�||j	�ff}xC|D];\}}t
|�dkr�q�nt|�|j|�q�Wd	S(
u�Output information about the packages in a given environment

        :param environment: an Environment object to output information about
        cS@std�|D��S(Ncs@s|]}|jVqdS(N(R�(RR((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pys	<genexpr>s(R�(tgroups((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRsuEnvironment Group: %su Environment-Id: %suu Description: %su Mandatory Groups:u Optional Groups:iN(R�RRRGR�R	RRtmandatory_groupstoptional_groupsR8R(RNtenvironmentRR�RRR((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytdisplay_groups_in_environments	 	
c	@s5t���fd����fd�}�jjrCd�}nd�j�jf}�j|�jpnd�}�r��dkr��jj�n�j	|��dt
�}nt|�|dkr��jj}n|s�dStt
d��j�t}t}	x�t|�D]�}
�j|
kr3t
}	qn�j|
krmt
d	�}�||
|d
t
�t
}q�j|
kr�t
d�}�||
|d
t�t
}q�j|
kr�t
d�}�||
|d
t�t
}q||
|�r�t
}qt
d
�}x��jD]�}t|�}tj||
�rR�|||d
t�t
}q|j�d}
td��t�fd�|
D��r�|
j�d}n|
}tj|
|�r�|||d
t�t
}qqWqWt||	g�s*x9t|�D](}
t
d�}�||
|d
t�q�Wnt�dS(u�Output search/provides type callback matches.

        :param po: the package object that matched the search
        :param values: the information associated with *po* that
           matched the search
        :param matchfor: a list of strings to be highlighted in the
           output
        :param verbose: whether to output extra verbose information
        :param highlight: highlighting options for the highlighted matches
        c@s�|sttd��nt|�p(d}|dkr;dS�r_�j|��dt�}n|r~t�j||��nt||�dS(Nu
Matched from:utignore_case(R�RR	RwR�R�(R�titemtprinted_headlinetcan_overflow(RntmatchforRN(s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytprint_highlighted_key_item*sc@s�t|jd�|jd�g�s(tStd�}t}xB�jD]7}tj||�rDt}�|||dt�qDqDW|S(Nu/u*/uFilename    : %sR&(tanyRlR�RtfilestfnmatchR�(R$t
printed_matchR�t
file_matchtfilename(tpoR((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytprint_file_provides7s$u%s : u%s.%s : uR#NuRepo        : %suDescription : R&uURL         : %suLicense     : %suProvide    : %siu=<>c3@s|]}|�kVqdS(N((Rtchar(tpossible(s2/usr/lib/python2.7/site-packages/dnf/cli/output.pys	<genexpr>rsuOther       : %s(R�RGtshowdupesfromreposR�R�R�R�RLtcolor_search_matchRwR�R�R�RR�tsetR�R�R�tprovidesR�R+RjR)(RNR/tvaluesR'R�RnR0R�R,t
name_matchR$R�tprovidet
first_providetitem_new((RnR'R/R2R(RNs2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
matchcallbacksp


					cC@s|j|||dt�S(uqOutput search/provides type callback matches.  This will
        output more information than :func:`matchcallback`.

        :param po: the package object that matched the search
        :param values: the information associated with *po* that
           matched the search
        :param matchfor: a list of strings to be highlighted in the
           output
        R�(R<R�(RNR/R7R'((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytmatchcallback_verbose�s
c
C@snd}d}d}t}x�|D]�}y�t|j�}||7}y|j�r]||7}nWntk
rqnX|s~wnyt|j�}Wntk
r�nX||7}Wqtk
r�t}td�}	tj	|	�PqXqW|sj|rtj
td�t|��n||krBtj
td�t||��n|rjtj
td�t|��qjndS(u�Report the total download size for a set of packages

        :param packages: a list of package objects
        :param installonly: whether the transaction consists only of installations
        iu2There was an error calculating total download sizeuTotal size: %suTotal download size: %suInstalled size: %sN(R�R�R�tverifyLocalPkgt	ExceptiontinstallsizeR�RtloggerterrortinfoR(
RNRtinstallonlyttotsizetlocsizetinsizeRBR�tsizeR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytreportDownloadSize�sD





	cC@s�d}t}xY|D]Q}y|j}||7}Wqtk
rct}td�}tj|�PqXqW|s�tjtd�t|��ndS(umReport the total size of packages being removed.

        :param packages: a list of package objects
        iu-There was an error calculating installed sizeuFreed space: %sN(	R�R�R?R�RRARBRCR(RNRRERBR�RHR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytreportRemoveSize�s
	

	cC@s�|s
dSg}g}|jr5|jtd��nxg|jD]\}t|j|��}|j|�}|rx|jn|}	|jt	dd|	|��q?W|j
r�|jtd��nxX|j
D]M}t|j|��}|jj
|�j}	|jt	dd|	|��q�W|r�|j|�}
x0|D](}|j|jt||
�d��q5W|j|
td�td�ddf�|d	d	+nd
j|�S(Nu+Marking packages as installed by the group:iu@u)Marking packages as removed by the group:u uGroupuPackagesuiu
(RLt
new_groupsRRR;tadded_packagest_group_by_idRR9REtremoved_groupstremoved_packagesRR[RfRQR<RWR�(RNtcompsR}R�toutR`tgrp_idtpkgstgroup_objecttgrp_nameRRRS((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytlist_group_transaction�s.	!	!
&4c	C@s�|jjjtjtjBtjB@r-t}nt}t	|jj�}i|jj
d6|d6td6}|j|�}|r�|r�tj
j|j��}tj|�nt|jdt��}t|jdt��|}||fS(u�returns set of conflicting packages and set of packages with broken dependency that would
        be additionally installed when --best and --allowerasinguallow_uninstallu
force_bestuignore_weakR�(RHt_goaltactionsR�tINSTALLtUPGRADEtUPGRADE_ALLR�R�Rt_allow_erasingtrunRRt_format_resolve_problemst
problem_rulesRAtwarningR5tproblem_conflictstproblem_broken_dependency(	RNtreport_problemstbesttngtparamsRzR�Ratproblem_dependency((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_skipped_packages�s$	

cG@smtjtjBtjBtjBtjBtjB}t�}t�}|dHkrSg}nt	|�j
j�}g}iid6id6id6}d}g�fd�}	tj
j
r�td�n	td�}
x�tdd	�|jftdd
�|jftdd�|jf|
|jftd�|jftd
�|jftd�|jftd�|jftd�|jftdd�|jfg
D]�\}}g}
i}x_|D]W}|jtjjkr�q�nx3|jj�D]"}|j |t��j!|�q�Wq�Wxl|D]d}|jtjj"tjj#gkr5qnt$|j%|jg��}|	|
|||j&|�}qW|j'||
f�q�Wt$t(�j
j)j*��j+��}|r,d}g}
xW|D]O\}}x@t,|�D]2}|
j'd||fddddddf�q�Wq�W|j'||
f�nt$t(�j
j)j-��j+��}|r�d}g}
xW|D]O\}}x@t,|�D]2}|
j'd||fddddddf�q�WqiW|j'||
f�nt$t(�j
j)j.��j+��}|rWd}g}
x6|D].\}}|
j'|d|ddddf�qW|j'||
f�nt$t(�j
j)j/��j+��}|r�d}g}
xH|D]@\}}|
j'|dd|d|dfddddf�q�W|j'||
f�nt$t(�j
j)j0��j+��}|rsd}g}
x6|D].\}}|
j'|d|ddddf�q+W|j'||
f�nt$t(�j
j)j1��j+��}|r�d}g}
x6|D].\}}|
j'|d|ddddf�q�W|j'||
f�n�j
j2r��j
j2j3j4}|r}d}g}
x<|j5�D].}|
j'|j6�ddddddf�q5W|j'||
f�n�j
j2j3j7}|r�d}g}
x<|j5�D].}|
j'|j6�ddddddf�q�W|j'||
f�n�j
j2j3j8}|rod}g}
x<|j5�D].}|
j'|j6�ddddddf�q'W|j'||
f�n�j
j2j9j4} | r�d}g}
x<| j5�D].}|
j'|j6�ddddddf�q�W|j'||
f�n�j
j2j9j7}!|!rad }g}
x<|!j5�D].}|
j'|j6�ddddddf�qW|j'||
f�n�j
j2j9j8}"|"r�d!}g}
x<|"j5�D].}|
j'|j6�ddddddf�q�W|j'||
f�q�n�j:j;r
�j
jj<|@r
g}
�j=d"t>�\}}x,t$|�D]}#|	|
|||#g�}q(	Wd#g}$�j
j?so	|$j'd$�ntd%�d&j@|$�}%|j'|%|
f�g}
x,t$|�D]}#|	|
|||#g�}q�	Wtd'�}%�j
j:jAr�	|%d}%n|%td(�}%|j'|%|
f�n|drk
�j
j)jB�rk
�j
j2oc
�j
j2j9pc
�j
j2j3rk
dS|di|d|dig}d|ddd)g}&�jC|d*d+d,|&d-d.�}&|&\}'}}(})}*d/d0�jDjE�jFtGd1d2d�|'ftd3�|ftd4�|(ftd5�|)ftd6�|*ffd&�d0�jDjEfg}+x.|D]&\}}
|
r�d7|},nx�|
D]�\}-}.}/}0}1}2}3|-|'|3f|.|f|/|(f|0|)f|1|*ff}&�jF|&d&d8�}4�jH�j:jI�\}5}6xTt$|2�D]F}7d9td:�d;}8|8|5|7jJ|6|7jK|7jLf;}8|4|87}4q!W|,|4},q�W|
ri|+j'|,�qiqiW|+j'td<�d0�jDjE�td=�tM|j�tM|j�tM|j�tM|j�dftd>�tM|j�dftd?�tM|j�tM|j�tM|j�dftd@�tM|j�dftdA�tM|�tM|�dff}9d}:d};d}<d}=x�|9D]�\}}>}?|>r�
|?r�
q�
ntGd1d2|>�}@tN|�}AtNtO|>��}BtN|@�}C|?r"tNtO|?��}Dnd}DtP|A|:�}:tP|B|;�};tP|C|<�}<tP|D|=�}=q�
Wx�|9D]�\}}>}?tGd1d2|>�}@|?r'tGdBdC|?�}EtQ||:�}F|>r�dD}4|+j'|4|F|;|>dE|<|@f|=|?|Ef�q\dF}4|+j'|4|F|;|<d&|=|?|Ef�qo|>rodG}4|+j'|4tQ||:�|;|>|@f�qoqoWdj@|+�S(Iu]Return a string representation of the transaction in an
        easy-to-read format.
        unuvuric@s1|j\}}}}}	|j}
|j}t|j�}|dkrNd}n|jrf�jj}
n$|j	r~�jj
}
n�jj}
|j|||
||||
f�xidt
|�fdt
|
�fdt
|�ffD]4\}}||j|d�|||cd7<q�Wt|t
|��}|S(Nunoarchunuvurii(tpkgtupR�R�RR�RLR�RGR�t
_from_cmdlineR�R�RR8t
setdefaulttmax(tlinesR�ta_widR/t	obsoletestntatetvtrR�R�RHthiR�(RN(s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt	_add_lines"					"@u Installing group/module packagesuInstalling group packagesusummaryu
Installingu	UpgradinguReinstallinguInstalling dependenciesuInstalling weak dependenciesuRemovinguRemoving dependent packagesuRemoving unused dependenciesuDowngradinguInstalling module profilesu%s/%suuRemoving module profilesuEnabling module streamsuSwitching module streamsu%s -> %siuDisabling module streamsuResetting module streamsuInstalling Environment GroupsuUpgrading Environment GroupsuRemoving Environment GroupsuInstalling GroupsuUpgrading GroupsuRemoving GroupsRcu--bestu--allowerasinguSSkipping packages with conflicts:
(add '%s' to command line to force their upgrade)u u,Skipping packages with broken dependencies%su or part of a groupiRXu  RPR�iu	%s
%s
%s
u=uPackageuPackagesuArchuVersionu
RepositoryuSizeu%s:
u
u     u	replacingu  %s%s%s.%s %s
u
Transaction Summary
%s
uInstalluUpgradeuRemoveu	DowngradeuSkipuDependent packageuDependent packagesu%s  %*d %s (+%*d %s)
u%-*su%s  %s  ( %*d %s)
u%s  %*d %s
N(RR�RZR[tDISTUPGRADEtDISTUPGRADE_ALLt	DOWNGRADERYR5RLR4RHRWRtWITH_MODULESRRR'R0R)R"R$R&R.R-R,RRRRtTransactionItemAction_OBSOLETEDR�t
getReplacedByRktaddtFORWARD_ACTIONSR*R�R[R�RRYt_moduleContainertgetInstalledProfilesR�R;tgetRemovedProfilestgetEnabledStreamstgetSwitchedStreamstgetDisabledStreamstgetResetStreamst_historytenvt
_installedR7tgetNamet	_upgradedt_removedRRGRdRXRhR�R\R�tupgrade_group_objects_upgradet	isChangedR\RJRPRQRRrR�R�R�R�R8RRRlR
(GRNRtforward_actionstskipped_conflictstskipped_brokent
list_buncht
pkglist_linesR�RnRvt
ins_group_msgRtpkglistRmtreplacesR3Rat	obsoletedtinstalledProfilesR�tprofilestprofiletremovedProfilestenabledStreamststreamtswitchedStreamstdisabledStreamstresetStreamstinstall_env_groupRtupgrade_env_grouptremove_env_groupt
install_groupt
upgrade_grouptremove_groupR�trecommendationstskip_strRPtn_widtv_widtr_widts_widRQttotalmsgRpRqR�R�RHRoRuR�RoRptobspotappendedtsummary_datatmax_msg_actiont
max_msg_counttmax_msg_pkgstmax_msg_depcountR�tdepcounttmsg_pkgstlen_msg_actiont
len_msg_counttlen_msg_pkgstlen_msg_depcounttmsg_deppkgst
action_msg((RNs2/usr/lib/python2.7/site-packages/dnf/cli/output.pytlist_transactions�,			%
$
"$4$4$&$8$&$&,,,,,, 		
+!	
"#"		&"(		
c@s�fd�}d}t|�jj�}�jdt�\}}|j|�}ttg|D]}t|�^q^��}x�t	d�|j
ft	d�|jft	d�|j|j
|j|jft	d�|jft	d�|ft	d	�|j|j|jft	d
�|jfgD]�\}	}
|
s9q!ng}|d|	7}x!|
D]}|jt|��qTWx'dD]}
|||
�}|rxPqxqxW|s��jjdg}nxV|r|t|� }|d7}|�jt||�dd�7}|t|�}q�Wq!W|S(u�Returns a human-readable summary of the results of the
        transaction.

        :return: a string containing a human-readable summary of the
           results of the transaction
        c@st|�|krgS�jj|dd}|dkr>gSdg|}d}x|D]w}t|�||kr�t|�||}||kr�gS||8}t|�||<n|d7}|t|�;}qXWx>tt|��D]*}||c||7<||cd9<q�W|S(ub Work out how many columns we can use to display stuff, in
                the post trans output. iiii����(R8RJRPR(tmsgstnumR@tcol_lensR�R�R�(RN(s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
_fits_in_cols1s(



uRcuUpgradedu
Downgradedu	InstalleduReinstalleduSkippeduRemoveduFailedu
%s:
iiiiiiiu  R�u
(iiiiiii(R4RHRWRhR�tunionR�R5R�RR0RR'R"R&R$R)R.R-R,RRRJRPR8RQR<(RNRR�RQR�R�R�tskippedR�RttsisR�R3R�Retcurrent_msgs((RNs2/usr/lib/python2.7/site-packages/dnf/cli/output.pytpost_transaction_output(sF	+	
	

"

	
"cC@sad}|jjdkrTtjjjdtj�}tjjjdtj�|_n|t	�fS(u_Set up the progress callbacks and various
           output bars based on debug level.
        itfoN(
RLRGt
debuglevelRRIRMtMultiFileProgressMetertsyststdouttDepSolveProgressCallBack(RNtprogressbar((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytsetup_progress_callbacksrs
!cC@s�|dkrdS|jj}tjd|�tdtj�|�}dt||�t|�t|�f}tt	d�|t
|��|}tj|�dS(u!Outputs summary information about the download process.

        :param remote_size: the total amount of information that was
           downloaded, in bytes
        :param download_start_timestamp: the time when the download
           process started, in seconds since the epoch
        iNu-g{�G�z�?u %5sB/s | %5sB %9s     uTotal(RJRPRARCRlttimeRRR
RR8(RNtremote_sizetdownload_start_timestampR�tdl_timeR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytdownload_callback_total_cb~s
	#cC@s�t�}t�}d}x_|D]W}|jtjjtjjfkrLqn|j|j�|j|j�|d7}qWt	|�dkr�|dj
t|��fS|dj
t|��fS(Niiu, u(
R5RRRtTransactionItemAction_UPGRADEDt TransactionItemAction_DOWNGRADEDR}taction_nametaction_shortR8R�R�R;(RNthpkgsRXt
actions_shortR�R�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_history_uiactions�s		
!c
C@spt|t�r2g|D]}|j||�^qS|dksJ|dkr�td�}td�d|}|dk	r�t|�|kr�|}nt|�Sd�}y�tjt	|��}|t|j
�dd�}t|j�}	d	||	f}|dk	rLt|�|krLd
||�|	f}t|�|krLd|	}qLn|SWntk
rkt|�SXdS(
Nl��i���u<unset>uSystemu cW@s!|j|�}|sdS|dS(uf Split gives us a [0] for everything _but_ '', this function
                returns '' in that case. ui(Rj(ttexttargsRz((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt
_safe_split_0�su;iu%s <%s>u%s ... <%s>u<%s>(l��i���(
RgR;R�RLRR8R	tpwdtgetpwuidR�tpw_gecostpw_nameR(
RNR�tlimittutloginidR�R�tusertfullnamet	user_name((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR��s*#	
	
c@s��fd�}d|krdS|jdd�\}}||�}|�jkrVdS|dkrfdS||�}|�jkr�dS|dks�|dkr�dS||kr�||}}n||fS(u3 Convert a user "TID" string of 2..4 into: (2, 4). c@s�y�|dks|jd�rv�j}|jd�rrt|td��}|dkretd�n||8}n|St|�SWntk
r�dSXdS(Nu--lastu--last-iuz(RlttidR�R8R�RL(txR�toff(told(s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytstr2int�s	


u..iiN(RLRjR�(R�R�R�tbtidtetid((R�s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_historyRangeRTIDs�s"cC@s�t�}d}x�t|�D]�}|d|kr_td�}tj||d|d�qn|d}x0t|d|dd�D]}|j|�q�WqW|S(uu Convert a list of ranged tid typles into all the tids needed, Eg.
            [(2,4), (6,8)] == [2, 3, 4, 6, 7, 8]. i����iu4Skipping merged transaction %d to %d, as it overlapsi(R5R�RRAR`RR}(RNtrtidsttidstlast_endtmtidR�R�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_historyRangeTIDs�s	
"cC@s|jj�}|dkr2tjtd��dSt�}g}|}x�|D]y}yt|�|j|�WqNt	k
r�|j
||�}|r�|j|j|g��qNn|j
|�qNXqNW|r�|j|jj|��n|r|rtjtd��dS|S(NuNo transactionsu)Bad transaction IDs, or package(s), given(R}tlastRLRAtcriticalRR5R�R}R�R�tupdateR�Rtsearch(RNtextcmdsR�R�tpatstusertidsR�trtid((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_history_list_transactions�s.	



c
C@s�|j|�}|dk	r�|jj|�}|jjdkrNddg}nz|jjdkrldg}n\t�}d}d}xD|D]<}|d7}|jdkr�|d7}n|j|j	�q�Wd}t
|�dkr�td�}	ntd�}	t|t
td	�d
d
�t
|	dd�t
td�d
d
�t
td�dd�t
td�dd�f�tdd�d}xV|D]K}t
|�dkr�|jp�d}	n|j|j	d�}	t|	�}	tjdtj|j��}
|j|j��\}}t
|	dd�}	t
|dd�}d}
}|jdkrUd}
}n,|jrkd}
}n|jr�d}
}n|jr�d}
n|jr�d}nt||j|	|
||fd||
f�q�WndS(u)Output a list of information about the history of yum
        transactions.

        :param extcmds: list of extra command line arguments
        :return: (exit_code, [errors])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
        uusersiiucommandsiu%s | %s | %s | %s | %suCommand lineu	User nameuIDiiu
Date and timeiu	Action(s)iuAlterediu-iOu%6u | %s | %-16.16s | %s | %4uuu%Y-%m-%d %H:%Mu u*u#uEu<u>u%s%sN(R�RLR}R�RGthistory_list_viewR5tcmdlineR}tloginuidR8RR�R
R�R	R�tstrftimet	localtimet
beg_timestampR�R�treturn_codet	is_outputtaltered_lt_rpmdbtaltered_gt_rpmdbR�(RNR�R�told_tidstuidstdonetblanksR�tfmtR�ttmR�tuiactstrmarktlmark((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pythistoryListCmds`	



	

	
	
				cC@s�t|�}|jj�}|d
krGtjtd��ddgfS|j}|j}g}|r�t	|�dkr�|jjdt
�}|d
k	r�|j|j�|j|�q�n|jj
|�}|s�tjtd��ddgfSd\}	}
d
}t
}|r3t|�}|j�\}	}
nxf|D]^}
|d
k	r�|
j|kr�|jj�}|
jt|��nd
}t
}|
j|	kr�|
j|
kr�|d
kr�t|
�}n
|j|
�t}n�|d
k	rb|r�tdd	�nt}|j|�d
}|rb|j�\}	}
|
j|	kr_|
j|
kr_|
}t}q_qbn|s:|rtdd	�nt}|j|
|�q:q:W|d
k	r�|r�tdd	�n|j|�nd
S(uOutput information about a transaction in history

        :param extcmds: list of extra command line arguments
        :return: (exit_code, [errors])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
        uNo transactionsiuFailed history infoitcomplete_transactions_onlyu$No transaction ID, or package, giveni����u-iON(i����i����(R5R}R�RLRAR�RR�tend_rpmdb_versionR8R�R}RR�R�R�R~t_rpmdb_versiontcompare_rpmdbvR�RtmergeR�R�t_historyInfoCmd(RNR�R�tmtidsR�R�tlasttidtlastdbvttransactionstbmtidtemtidtmobjR	ttranstrpmdbvtmerged((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pythistoryInfoCmd[sl
		


	
c@sY|j}t|t�r$|g}ng|D]}�j|�^q+}itd�d6td�d6td�d6td�d6�itd�d6td	�d6td
�d6td�d6�tgt�j��t�j��D]}t|�^q��}|�d<|�d<t	t	d
t
���fd�}|j�}	t|	�dkrvttd�d|	d
|	df�nttd�|	d
�t
|j�}
tjdtj|
��}ttd�|�|jdk	r|jr�ttd�|jd�qttd�|j�n|jdk	r�|j}tjdtj|��}
||
}|d3krstd�|}nZ|d5kr�td�|d}n7|d8kr�td�|d9}ntd�|d;}ttd�|
|�n|jdk	r3|jrttd�|jd�q3ttd�|j�nt|ttf�r�t�}xV|D]8}||krpqXn|j|�ttd �|�qXWnttd �|�t|jttf�ry|j}|d
dkrttd!�dtd"�d�|d}q�t|�s/ttd!�td#��q�|r�ttd!�td$�d%jg|D]}t|�^qW��q�nu|jdkr�ttd!�dtd"�d�nD|jr�ttd!�td&�|j�nttd!�td#��t|jttf�rXt�}x0|jD]%}||kr1qn|j|�qWttd'�|�nttd'�|j�|j dk	r�t|j ttf�r�x=|j D]}ttd(�|�q�Wq�ttd(�|j �nd)}|r�ttd*�|�n|j!�}|rttd+��nd
}x5|D]-}tt|��}||kr,|}q,q,Wx'|D]}||d,d-t
d.|�qdWttd/���j"||�|j#�}|r�ttd0��d
}x,|D]!}|d7}td1||�q�Wn|j$�}|rUttd2��d
}x,|D]!}|d7}td1||�q-WndS(<Nu	InstalleduiuErasedueuUpgradeduou
Downgradedunu
Not installeduOlderuNewerumaxlenic	@sTd|}|r�}n�}|d}�jj�j�jd|j�j�}	|	sf|d}n`�jj|	d�}
|
r�|j|
�}|dkr�q�|dkr�|d}q�|d}n|r��j	d�\}}
n�j	d	�\}}
t
||d
�}d}|r'|j�}ntd||||
|t
|�|f�dS(
Nu uiR�ueiuounuboldunormalumaxlenuu%s%s%s%s %-*s %s(R~R�R'tfiltermR�R]R}tpackagetcompareRrR
R�R�R�(R�t
prefix_lent
was_installedRntpkg_max_lent	show_repoR�t_pkg_statesRtipkgstinst_pkgtresRoRptui_repo(t_pkg_states_availablet_pkg_states_installedRN(s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_simple_pkg�s2
	
*


iuTransaction ID :u%u..%ui����u%cuBegin time     :uBegin rpmdb    :u**ii<u(%u seconds)u(%u minutes)iu
(%u hours)u	(%u days)uEnd time       :uEnd rpmdb      :uUser           :uReturn-Code    :uAborteduSuccessu	Failures:u, uFailure:uReleasever     :uCommand Line   :uuComment        :uTransaction performed with:iR&R'uPackages Altered:uScriptlet output:u%4duErrors:i,i,iPFi,iPFi��iii�Q(%R�RgR�R�RRlR;R7R8R�R�R�R�R�RR�RRtbeg_rpmdb_versionRLRt
end_timestampRRR�R5R}RtallR�R�t
releaseverR�tperformed_withthistoryInfoCmdPkgsAlteredtoutputRB(RNR�R�R�R�R�R�tmaxlenR0R�tbegttbegtmtendttendtmR�tseenRatcodesR�tcommentt	perf_withtmax_lentwith_pkgtstr_lentt_outR�tlinett_err((R.R/RNs2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR�s�	",

((		
		

	
D"	"	






uInstalluTrue-InstalluDep-Installu	Obsoletedu
ObsoletinguEraseu	Reinstallu	Downgradeu
DowngradeduUpgradeuUpdateuUpgradeduUpdatedcC@s�d	}|j}d}d}|j�}xn|D]f}|j|j|j�}	|t|	�krmt|	�}ntt|��}
||
kr.|
}q.q.Wx�|D]�}d
}|jtj	j
kr�d}nd}|r	tg|D]}
|j|
�^q��r	d}q	n|j
|�\}}t|�}|j|j|j�}	tt|	�|�}	|d	k	r�|jtj	jkr�|j|jkr�|jtj	jkr�t|j�d}d|||}n�|d	k	r7|jtj	jkr7|j|jkr7|jtj	jkr7t|j�d}d|||}n0d	}|jtj	jtj	jfkrg|}ntd|||	||t|�|j�f�q�Wd	S(uPrint information about how packages are altered in a transaction.

        :param old: the :class:`DnfSwdbTrans` to
           print information about
        :param pats: a list of patterns.  Packages that match a patten
           in *pats* will be highlighted in the output
        iu iu ** unormaluboldiu%s%s%s%s %-*s %sNu    (RLt_history_state2uistateRR[R�R8R�RRRtTransactionItemState_DONER)tmatchRrR
R	RR�R�R/RR�R�R�(RNR�R�R�tall_uistatesR8R'RR�tuistatetpkg_lenR�RntpatRoRptcntln((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR6^sL	


	(!'!'!	cC@s�|jj|�}d}|rE|rEtjtd��ddgfS|sTd}n|j}d}t|ttd�dd�ttd�d	d	�tt	d
dd�dd�f�td
d�d}d}x�|jj
|d|�D]�}|j�}|r!|r!|t|�|kr!Pnd}	d}
}|j
dkrMd}
}nX|j
rcd}
}nB|jryd}
}n,|jr�d}
}n|jr�d}
}n|jr�d}
n|jr�d}nx�|D]�}|dkrtg|D]}
|j|
�^q��sq�qn|j|j|j�}t|d	�}|j}|	dk	r�|	jtjjkr�|	j|jkr�|jtjjkr�t|j�d}d|||}n�|	dk	r#|	jtjjkr#|	j|jkr#|jtjjkr#t|j�d}d|||}n0d}	|jtjjtjjfkrS|}	n|d7}t||j ||fd||
f�q�Wq�WdS(u�Print a list of information about transactions from history
        that involve the given package or packages.

        :param extcmds: list of extra command line arguments
        u)Bad transaction IDs, or package(s), giveniuFailed history packages-listiu%s | %s | %suIDiu	Action(s)iuPackageuPackagesi5u-iOu%6u | %s | %-50siR�u u*u#uEuPusu<u>u%s%sN(!R}R�RLRAR�RRGR�R
RR�RR8RR7trpmdb_problemst
trans_skipRRR)RIR[R�tui_nevraRRRR�R�R/RR�R�(RNR�R�R�RJRR�R�RR�RRR�RMRKRNRO((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pythistoryPackageListCmd�sp

		#"

	
	
	
	
				
(		!''!	
(;t__name__t
__module__t__doc__RRORWRfRrRwtstaticmethodR|tpropertyR}R~RLR\R�R�RQR�R�R�R�R�R�R�R�R�R�R�RR	RRRR"R<R=RIRJRVRhR�R�R�R�R�R�R�R�R�RR5R!RRRGR6RS(((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRFos�
					
~	
/				5$M-		
			'	b/				�)	J			"%			ER�








<R�cB@s2eZdZd�Zd�Zd�Zd�ZRS(uGProvides text output callback functions for Dependency Solver callback.cC@s
d|_dS(u8requires yum-cli log and errorlog functions as argumentsiN(tloops(RN((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRO�scC@s
d}|dkr!td�}n�|dkr<td�}n�|dkrWtd�}n�|dkrrtd�}nl|d	kr�td
�}nQ|dkr�td�}n6|d
kr�td�}n|dkr�td�}n|rtj||j|j|j�ndS(u�Print information about a package being added to the
        transaction set.

        :param pkgtup: tuple containing the package name, arch,
           version, and repository
        :param mode: a short string indicating why the package is
           being added to the transaction set.

        Valid current values for *mode* are::

           i = the package will be installed
           u = the package will be an update
           e = the package will be erased
           r = the package will be reinstalled
           d = the package will be a downgrade
           o = the package will be obsoleting another package
           ud = the package will be updated
           od = the package will be obsoleted
        uiu'---> Package %s.%s %s will be installeduuu(---> Package %s.%s %s will be an upgradeueu$---> Package %s.%s %s will be eraseduru)---> Package %s.%s %s will be reinstalledudu)---> Package %s.%s %s will be a downgradeuou(---> Package %s.%s %s will be obsoletinguudu&---> Package %s.%s %s will be upgradeduodu'---> Package %s.%s %s will be obsoletedN(RLRRAtdebugR�R�R�(RNR�tmodeR7((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt	pkg_added�s&cC@s&tjtd��|jd7_dS(uRPerform setup at the beginning of the dependency solving
        process.
        u"--> Starting dependency resolutioniN(RARZRRY(RN((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytstartscC@stjtd��dS(uAOutput a message stating that dependency resolution has finished.u"--> Finished dependency resolutionN(RARZR(RN((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR�s(RTRURVROR\R]R�(((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR��s
		)	tCliKeyImportcB@seZd�Zd�ZRS(cC@s||_||_dS(N(RHR7(RNRHR7((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRO%s	cC@s�d�}td�||�|tjj|�|jdd�f}tjd|�|jjj	rft
S|jjjrytS|j
j�S(NcS@s,tjjrdnd}|djd|�S(Nu0t0i����i(RtpycomptPY3trjust(Rtrj((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytshort_id+suLImporting GPG key 0x%s:
 Userid     : "%s"
 Fingerprint: %s
 From       : %sufile://uu%s(RRtcryptot_printable_fingerprintRiRAR�RHRGt	assumeyesR�tassumenoR�R7R�(RNRtuseridtfingerprintR�t	timestampRdR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt_confirm)s		(RTRURORl(((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR^$s	tCliTransactionDisplaycB@sneZdZed��Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zedd	d
�ZRS(u1A YUM specific callback class for RPM operations.cC@stjjj�S(N(RRIRJt_term_width(RN((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt<lambda>BscC@sDtt|�j�d|_d|_t|_d|_d|_	dS(Nuu=i(
tsuperRmROtlastmsgRLtlastpackageR�R7tmarktmarks(RN((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRODs				c	C@s�tjjj|�}|dkr%dS|j�}t|�}	||_|dkr[d}
n|td�|}
|j	|||||
||	|�dS(u�Output information about an rpm operation.  This may
        include a text progress bar.

        :param package: the package involved in the event
        :param action: the type of action that is taking place.  Valid
           values are given by
           :func:`rpmtrans.LoggingTransactionDisplay.action.keys()`
        :param ti_done: a number representing the amount of work
           already done in the current transaction
        :param ti_total: a number representing the total amount of work
           to be done in the current transaction
        :param ts_done: the number of the current transaction in
           transaction set
        :param ts_total: the total number of transactions in the
           transaction set
        Niid(
RRtACTIONSR[RLt_max_action_widthR	RrRt
_out_progress(RNR#Rtti_donetti_totaltts_donetts_totalt
action_strtwid1tpkgnametpercent((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRMNs		cC@slt|d�s_d}x;tjjj�D]'}t|�}||kr(|}q(q(W||_n|j}|S(Nu_max_action_wid_cachei(thasattrRRRuR7Rt_max_action_wid_cache(RNR}Rbtwid_val((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRvns
	c	C@s�|jr�tjj�s$||kr�|j|||dtjj�d|d|�\}	}}
t|�}|	t|||�t||
|
�f}||jkr�tj	j
d|tj�||_||kr�td�q�q�ndS(NRMR~R}uwrite_flushu (R7R�R�tisattyt_makefmtR	R
RqRRt_terminal_messengerR�(RNRxRyRzR{RtprocessR~R}Rtwid2R�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRwys$	cC@sdS(N((RNR#R((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pytfilelog�scC@sdS(N((RNtmessage((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRB�scC@s#|r|jjt|��ndS(utPrint messages originating from a package script.

        :param msgs: the messages coming from the script
        N(t
rpm_loggerRCR	(RNR�((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt	scriptout�sicC@stt|��}d||f}d|d|d}	|	||f}
|dkr]d}nt|�}d|d}|d|d7}|d7}|d7}|d7}|j}
|
|kr�|}
n|
|8}
||
dkr�|
d}n|j||}d||f}
d|
d	}||d}|rN|d
krNd|
}|}n�|r�|dkr�||jt||d
�f}nd}d|d|
}|}n`|d
kr�d|
}|}nA|dkr�||j|f}nd}d|d|
}|}|||fS(Nu%s.%su%us/%usiiiu[%-us]idu
  %s: %s   igY@uu

  %s: %s u u  %s: %s   u	  %s: %s (R8R�RLRR�RsR�(RNRRzR{RMR~R}tlRHtfmt_doneR	tpnltoverheadR�Rttfmt_bartfull_pnlRR�tbar((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR��sP	


		


	%	
	N(RTRURVRXR�RORMRvRwR�RBR�R�RLR�(((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyRm?s	
	 					c
C@s6d}tjj�sdS|dkr.d}n%|dkrMt|�|}nd}tjjj�}|dkr�||kr�d}nd||f}|t	|�d8}|dkr�d}n|dkr|d8}|dkr�d}n|t
||�}d|||f}n�||kr?d	t|||�|f}n�|d
8}|dkr^d}n|d}	|	t|�kr�t|�}	n||	8}|t
||�}dt||	|	�|||f}||kr�tj
jd|tj�n||krtj
jdd
tj�ntj
jddtj�dS(uIOutput the current status to the terminal using a simple
    text progress bar consisting of 50 # marks.

    :param current: a number representing the amount of work
       already done
    :param total: a number representing the total amount of work
       to be done
    :param name: a name to label the progress bar with
    u#Niu-u %d/%diiu	
[%-*s]%su
%s%siu

%s: [%-*s]%suwriteu
uflushRQ(R�R�R�R�RRIRJRnRLR8R�R
RRR�(
RxttotalR�RsRR�R�thashbarR7tnwid((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyR��sL			
	
	


(=RVt
__future__RRRtlibdnf.transactionRtcopyRtdnf.cli.formatRRtdnf.i18nRRRR	R
RRt
dnf.pycompR
RRRtdnf.yum.rpmtransRtdnf.db.historyRtdnf.baseRtdnf.callbacktdnf.cli.progresstdnf.cli.termtdnf.conft
dnf.cryptotdnf.transactiontdnf.utiltdnf.yum.miscR+R�R5tloggingR^R�R�R�t	getLoggerRAR4REtobjectRFtcallbacktDepsolveR�t	KeyImportR^RmRLR�(((s2/usr/lib/python2.7/site-packages/dnf/cli/output.pyt<module>sV4"	-	
��������<�