KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/task/21573/root/usr/share/yum-cli/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/task/21573/root/usr/share/yum-cli/output.pyc
m
Pc@sdZdkZdkZdkZdkZdkZdkZdkZdkl	Z	dkZ
dklZdk
lZdklZlZlZdk
ZdklZdkTdklZlZd	klZd
klZdklZlZlZdZ d
e	fdYZ!dfdYZ"dfdYZ#dfdYZ$dfdYZ%defdYZ&e'dZ(e)djone*ei+djoei+ddjodGHdGHdGHx4e,dd D]#Z-e(e-d!d"ei.d#qWdGHd$GHdGHx<e,dd D]+Z-e(e-d!d%d&d'ei.d#qWdGHd(GHdGHx1e,dd D] Z-e(e-d!ei.d#qhWne*ei+djoei+ddd)fjoe&Z/e0e/_1d"e/i2d*<d+e/i2d,<dGHd-GHdGHx@e,dd D]/Z-e/i3d.d*e-d!e-d!ei.d#qWdGHd/GHdGHxLe,dd D];Z-e/i3d0d1d2d3d,e-d!e-d!ei.d#q]Wne*ei+djoei+ddd4d)d5fjoei4i5ne*ei+djoei+ddd4fjodGHd6GHdGHx:e,dd D])Z-e(e-d!ed7ei.d#q6WdGHdGHd8GHdGHxBe,dd D]1Z-e(e-d!ed7d'd3ei.d#qWdGHne*ei+djoei+ddd4d)d5fjoe&Z/e0e/_1ed7e/i2d*<e/i2d*d'd3e/i2d,<dGHd9GHdGHx@e,dd D]/Z-e/i3d.d*e-d!e-d!ei.d#q[WdGHd:GHdGHxLe,dd D];Z-e/i3d0d1d2d3d,e-d!e-d!ei.d#qWdGHnndS(;s'This handles actual output from the cliN(s	TextMeter(sURLGrabError(sprco_tuple_to_string(sto_strsto_utf8s
to_unicode(scheckSignals(t*(s
logginglevelst_(sRPMBaseCallback(spackagesNewestByNameArch(s
utf8_widthsutf8_width_fillsutf8_text_fillcCsXttidpdSntii}|djodSn|djodSn|S(s= Simple terminal width, limit to 20 chars. and make 0 == 80. tterminal_width_cachediPiiN(thasattrt
urlgrabbertprogressRtret(R((t/usr/share/yum-cli/output.pyt_term_width,s

tYumTextMetercBstZdZedZRS(s#
    Text progress bar output.
    cCstti|||dS(N(tcheckSignalst	TextMetertupdatetselftamount_readtnow(R
RR((RR>s(t__name__t
__module__t__doc__tNoneR(((RR	8stYumTermcBs;tZdZeZeeidoedZ	nhdd<dd<dd<Z
hd	d
<dd<d
d<dd<dd<dd<dd<dd<Zhd	d
<dd<d
d<dd<dd<dd<dd<dd<Zhdd<dd<dd<dd<dd <dd!<Z
hd	d"<dd#<d
d$<dd%<dd&<dd'<dd(<dd)<Zhd	d*<dd+<d
d,<dd-<dd.<dd/<dd0<dd1<Zd2Zed3d4Zed3d5Zd6Zeed7Zd8Zd9Zd:Zd;Zd<ZRS(=s*some terminal "UI" helpers based on cursesRcCstS(N(R(R
((Rt<lambda>Ost	underlinetsmultreversetrevtnormaltsgr0tblackitblueitgreenitcyanitreditmagentaityellowitwhiteitboldstblinkstdimtsss(BsssssssssssssssscCs(|i|_|i|_|i|_dS(N(R
t_YumTerm__ansi_forced_MODEtMODEt_YumTerm__ansi_forced_FG_COLORtFG_COLORt_YumTerm__ansi_forced_BG_COLORtBG_COLOR(R
((Rt
__forced_initstautocCst|_ttidp
d|_nd|_|djo|i	dSnhdd<dd<dd<d	d<d
d<dd<|_
hdd<d
d<dd<dd<dd<dd<dd<dd<|_hdd<d
d<dd<dd<dd<dd<dd<dd<|_|djot
|_dSn|djpty
dk}Wnt
|_dSnX|p
ti}n|ipt
|_dSny|id|iWnt
|_dSnX|i|_ttidp|id|_n|id|_xU|i
D]J}
|
}	|
|ijo|i|
}
n|i|
pd|i
|	<q<W|id}|oDxA|iiD],\}}|i!||pd|i|<qWn|id}|oDxA|i#iD],\}}|i!||pd|i|<q
Wn|id}|oDxA|iiD],\}}|i!||pd|i|<qdWn|id}|oDxA|i#iD],\}}|i!||pd|i|<qWndS(NRiPitalwaysR$R'R%R&RRRRRRRR R!R"R#tneverR/tfdtcolstlinestsetftsetaftsetbtsetab(&tTrueR
t_YumTerm__enabledRRRtcolumnsR4tcolort_YumTerm__forced_initR)R+R-tFalsetAssertionErrortcursestterm_streamtsyststdouttisattyt	setuptermtfilenottigetstrt
_ctigetstrttigetnumtcap_nametmodet_YumTerm__cap_namest	_tigetstrtset_fgt_YumTerm__colorstitemstvalttparmtset_fg_ansit_YumTerm__ansi_colorstset_bgtset_bg_ansi(R
RAR<RNRQR@RURSRVRKRJ((Rtreinitsv	
	

?
QQ
	
	

		
!(((cCs|i||dS(N(R
RWRAR<(R
RAR<((Rt__init__scCs)|i|pd}tidd|S(NR's\$<\d+>[/*]?(R
RHRJtcaptretsub(R
RJRY((RRMsc
s|ip|Sn|p
ti}nd}xO|D]G}||}	|oti
|	ti}	nti|	||}q<W|S(Ncs|iS(N(tbegtmatchtgrouptend(R](R_R\(RRs(
R
R:thaystacktescapeRZtrendertneedlestneedletpattignore_casettemplatetIR[(
R
R`R\R_RcRaRfRbRdRe((R\R_RR[s

cKs |i|||id||S(NR(R
R[R`R\R)Rctkwds(R
R`R\RcRi((Rtsub_norm	scKs|i||i|||S(N(R
RjR`R)RKRcRi(R
R`RKRcRi((Rtsub_modescKs|i|d||S(NR$(R
RkR`RcRi(R
R`RcRi((Rtsub_boldscKs|i||i|||S(N(R
RjR`R+R<RcRi(R
R`R<RcRi((Rtsub_fgscKs|i||i|||S(N(R
RjR`R-R<RcRi(R
R`R<RcRi((Rtsub_bgs(RRRR9R:RRRtpropertyR;RLRORTR(R*R,R=RRWRXRMR>R[RjRkRlRmRn(((RRBs(	!N
N
<N
N	d					t	YumOutputcBstZdZdZdZdZedZdZdZ	e
dZeded	d
Ze
dZ
dZd
d
dZed	eedZed	eedZdZddZdZedZedZhehdZdZdZdZddZdedZdZdZdd d!Z e
dd"Z!eeed#Z"ed$Z#d%Z$d&Z%d'Z&d(Z'd)Z(d*Z)d+Z*d,Z+RS(-s5
    Main output class for the yum command line.
    cCsxtid|_tid|_ttdotidid|_	n
dg|_	t
|_d|_
dS(Nsyum.clisyum.verbose.clitexpandMacros
%_i18ndomainst:sredhat-dist(tloggingt	getLoggerR
tloggertverbose_loggerRtrpmRqtsplitti18ndomainsRttermRt_last_interrupt(R
((RRX sc
Cstdtdtdtdtdtdtdtdtd	td
tdtdg}titi}|ttid
|dtid|}|S(NtJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDecs%mis %d %T (Rtmonthsttimet	localtimeRtinttstrftimeR(R
RRR((Rt	printtime,sr0cCs?|iid|i|i|iitd|idS(s,failure output for failovers from urlgrabbers%s: %ssTrying other mirror.N(R
Ruterrorterrobjturlt	exceptionR(R
R((Rt
failureReport4scCst|||dS(N(tprogressbartcurrentttotaltname(R
RRR((RtsimpleProgressBar<scCsd}d}|pnet|tp
|djo|iid}n3|djon"x|iddi	D]}toqs|djo
d}qs||iijo||ii|7}qs||iijo||ii|7}qs|i
do3|d|iijo||ii|d7}qs|i
do3|d|iijo||ii|d7}qsqsW|o|iid}n||fS(	NR'R$Rt,t sfg:isbg:(thibegthiendt	highlightt
isinstancet
basestringR
RzR)treplaceRxthighR>R+t
startswithR-(R
RRRR((Rt
_highlight?s2


'' cKs1|i|\}}|ii|||||S(N(
R
RRRRRzR[R`RcRi(R
R`RRcRiRR((Rt_sub_highlight]scCsCd}x6|D].}||d|joPn||d7}q
W|S(s; Spaces left on the current field will help how many pkgs? iiN(Rt	data_tupsttuptleftR(RRRRR((Rt_calc_columns_spaces_helpsasiR'cCs|djo|ii}nt|}	|}
dg|	}x1t	d|	D] }t|
|i||<qLW|djodg|	}n|t
||	dt|8}x&|djod}
d}xbtd|	D]Q}|i|||||}|pqn||
joqn|}
|}qW|
o@||idd||}||c|7<||8}qn|	d8}	||	}x'td|	D]}||c|7<qW||c||	|7<d}qW|S(s Dynamically calculate the width of the fields in the data, data is
            of the format [column-number][field_length] = rows. iiN(ttotal_widthRR
RzR;tlentdataR3tpdatatrangetdtsortedRPtsumt
utf8_widthtindentthelpsRQtxrangeRtthelpstpoptdifftnormtremainder_column(R
RR;RRRRRQRR3RRRR((RtcalcColumnsksN


"
	




cCs&|djod|fSnd|fS(Niu-u(twidth(R((Rt_fmt_column_align_widths
cCst|djpt|djptt|djo|\}}d}}nt|djo(|\}}}|i	|\}}n||||fS(NiiR'(
Rtcol_dataR?RQRRRRR
R(R
RRRRQRR((Rt	_col_datas-uc
Cst|}g}
x|d D]}	|i|	\}}}}|p|d7}|
i|qn|i
|\}}t||joB|d7}t||d|djd|d|}|
i|n1|dd	||d
7}|
i|||g||7}|d
7}qW|i|d\}}}}|i
|\}}t||d|djd|d|}|d|7}|
i||t|
S(
s9 Return a string for columns of data, which can overflow.iu%su%s Ru-tprefixtsuffixu%s%s%s
Riu%%s%sN(RtmsgRRR;RR
RRQRRRtappendRtalignRtutf8_width_filltextendR_ttuple(R
R;RR_RRRRQRRRR((Rt
fmtColumnss6




c	Cs{|djo
d}n|i}d||i|if}|ddg}t|||if||}|i|GHdS(s2 Simple to use function to print a pkg as a line. iiis%s%s.%sRN(iii(R;RtpkgtprintVertverRRtarchtnaRthi_colstziptrepoidR
R(	R
Rtui_overflowRRR;RRR((Rt
simpleLists

cCsi|djo
d}nd|t|f}|ddg}t||i	f||}|i|GHdS(s Simple to use function to print a pkg as a line, with the pkg
            itself in envra format so it can be pased to list/install/etc. iis%s%sRN(ii(R;RRtstrRtenvraRRRRR
R(R
RRRRR;RR((RtsimpleEnvraLists

cCst|}t|}|ii}d|dd}t
|d|d|d|}|iddjo3||d	jo"t
|d|d|dd
}n|S(sA Return a key value pair in the common two column output format. Ris: Rtinitial_indenttsubsequent_indents
iis
     ...: N(
tto_strRQRtkeytkeylenR
RzR;R3tnxttutf8_text_fillRtcount(R
RRQRR3RR((Rt
fmtKeyValFills't=cCst|}|iid}t|}||djo|d}}n+|||d}|||t|}d|||fS(Niis%s %s %s(RRR
RzR;R3Rtname_lentfillR\R_R(R
RRRR_R3R\((Rt
fmtSectionscCst|}t|djobx_|iD]P}yti||}Wnt	j
o
|}nX||jo|}Pq)q)Wnt
|S(s_Get the translated version from specspo and ensure that
        it's actually encoded in UTF-8.iN(tto_utf8tsRR
RyRtgettexttdgettexttttAttributeErrort
to_unicode(R
RRR((Rt_encs


cCs|i|\}}td|t|i|fGHtdt|i	GH|i
djotdt|i
GHntdt|iGHtdt|iGHtd|i
t|iGHtdt|iGH|iitiotd	t|iGHtd
ti|iGHtdti|iGHt|dotd
ti|iGHqzn|itd|i|iGH|iotdt|iGHntdt|i GH|itd|i|i!GHdGHdS(NsName       : %s%s%ssArch       : %st0sEpoch      : %ssVersion    : %ssRelease    : %ssSize       : %ssRepo       : %ssCommitter  : %ssCommittime : %ssBuildtime  : %stinstalltimesInstalltime: %ss
Summary    : sURL        : %ssLicense    : %ss
Description: R'("R
RRRRRRRRRtepochtversiontreleaset
format_numbertfloattsizeRRvtisEnabledFort
logginglevelstDEBUG_3t	committerRtctimet
committimet	buildtimeRRRRtsummaryRtlicensetdescription(R
RRRR((Rt
infoOutputs*!!##
#c
Cs|\}}|dj	o|ii}|i	i
djo|io|ii}n|i
|d|d||i
|d|dddd|iidSn|i}	d|i|if}|i}d	|	|||fGHdS(
stakes an updates or obsoletes tuple of pkgobjects and
           returns a simple printed string of the output and a string
           explaining the relationship between the tuple memberst	installedR;RRRiNs%s.%ss%-35.35s [%.12s] %.10s %-20.20s(tuotupt	changePkgtinstPkgR;RR
tconftcolor_update_remotetchitrepotidtverifyLocalPkgtcolor_update_localRtcolor_update_installedtcompactPrintt	c_compactRRt	i_compactRtc_repot
changetype(
R
RRR;RRRRR
R	((RtupdatesObsoletesList(s
 	c	Cs|ddgjood}
t|djo*d}
d|GHxt|D]}|i|if}t
}	t
on||jo|idd}	ng|i||o|idd}	n=|i||o|id	d
}	n|idd}	|djo#|i|dtd
|	d|qH|djo|i|d
|	qHqHWn|
djoddgfSndgfSndS(soutputs based on whatever outputType is. Current options:
           'list' - simple pkg list
           'info' - similar to rpm -qi output
           ...also highlight_na can be passed, and we'll highlight
           pkgs with (names, arch) in that set.tlisttinfoiis%ssnot inRRt>R$t<RRR;sNo Packages to listN(t
outputTypetthingslistedRtlstRRRRRRR>Rthighlight_nathighlight_modestgettverEQtverLTR
RR9R;R(R
RRRRR;RRRRR((RtlistPkgs>s8	




cCs~ttdttdf}ttdttdf}|d|d|d|df}xtoyttd}Wn7tj
o
n#t	j
o
nd}nXt|}|i
}t|djp
||joPnd	|jod	|jo|d}Pnd
|jod
|joPqmqmWt|djp
||jotSntSdS(s.gets a yes or no from the user, defaults to NotytyestntnoiisIs this ok [y/N]: R'uyunN(
RRtyuitnuitauiR9t	raw_inputtchoicetUnicodeEncodeErrortUnicodeDecodeErrortlowerRR>(R
R!R#RR ((Rtuserconfirmfs4$$"
 

 cCs
|iS(N(R
R'(R
tkeydict((Rt_cli_confirm_gpg_key_importsc
CsI|ii|}|ii|}t|}h}x*|D]"}	d|	f||	i|	if<q=Wx|D]}	|	i|	if}||jo |	df||	i|	if<qj|	i||do(|	||df||	i|	if<qjqjWh}xI|iD];\}}|p|}	|i|	igi||fqW|S(s Convert pkg_names to installed pkgs or available pkgs, return
            value is a dict on pkg.name returning (apkg, ipkg). iN(R
trpmdbtsearchNamest	pkg_namestipkgstpkgSacktapkgstpackagesNewestByNameArchtpkgsRRRRRtverGTRt
itervaluestapkgtipkgt
setdefaultR(
R
R,R/R5RR1RR4R-R((Rt_group_names2aipkgss* 
 ,

&s   c
Csx|D]}||joqnx||D]\}}|p|}tt|t|}t
|i}
xNd|fd|
ffD]4\}}	||i|	d|||	cd7<qWq,WqWdS(NRtridii(R,titemtpkg_names2pkgsR4R5RRRRRRRR8RtvRR6(
R
RR,R:RRRR9R4R;R8R5R((Rt_calcDataPkgColumnss

c
Cs|p*xt|D]}d||fGHqWnxt|D]}||jod||fGHq>nxt||ddD]s\}}	|	o|o|i	i
}n|o|i	i}nt
}|i|	p|dtd|d|d|qWq>WdS(Ns%s%sRcCs|dp|dS(Nii(tx(R=((RRsRRRR;(tverboseRR,R9RR:R4R5R
Rtcolor_list_installed_olderRtcolor_list_available_installR>RR9R;(
R
R,R>R:RR;R9R4RR5((Rt_displayPkgsFromNamess(




c	Cstd|iGH|iiti}|otdt	|i
GHnd}|o|i
|i}n|iotdt	|iGHntd|iftd|iftd|iftd|iff}d}|ohdh<d	h<}x'|D]\}}|i|||q
W|d|d	g}|i|}|d
|df}nxI|D]A\}}t|d
jo"|GH|i|||d|qtqtWdS(
Ns

Group: %ss
 Group-Id: %ss Description: %ss Mandatory Packages:s Default Packages:s Optional Packages:s Conditional Packages:RR8iiR;(RR^tui_nameR
RvRRRtverbRtgroupidRR:R7tpackagestui_descriptiontmandatory_packagestdefault_packagestoptional_packagestconditional_packagestsectionsR;Rtsection_nameR,R<RRRA(	R
R^RKRR,RCR;R:RL((RtdisplayPkgsInGroupss2
NcCsx|D]}td|iGHt||djotdGHqnxn||D]b}|||}tdt|GH|ptdGHqVnx|D]}d|iGHqWqVWqWdS(s=take a list of findDeps results and 'pretty print' the outputspackage: %sis"  No dependencies for this packages  dependency: %ss   Unsatisfied dependencys   provider: %sN(	tresultsRRRRtreqtreqlisttprco_tuple_to_stringtpo(R
RNRORRPRR((Rt
depListOutputs"Rc
	Csddddddddd	g	}|o
d
}nd}d}d
}t|d}	x3||jo%||	jo|d}||}qWWt|tdjpt|tdjo
d}n|djo
d}nd}|t
|pd
|||fS(s4Turn numbers into human-readable metric-like numbersR'tktMtGtTtPtEtZtYf1000.0f1024.0iiils%i%s%sf9.9499999999999993s%.1f%s%ss%.0f%s%sN(tsymbolstSItsteptthreshtdepthRt	max_depthtnumberttypetformatRtspace(
R
RbR]ReR`RdR\R^R_Ra((RRs$!


2


cCstii||S(N(RRtformat_timetsecondst	use_hours(RgRh((RRfsc
Cs~|iiod|}	nd|i|if}	|i|	|i|i	}	|o<|djo|ii
}n|i|	||dt}	n|	GH|djo|iiti}n|pdSntd|iGHtdGHxtii|D]u}t|}t|i|jpt|i	|joqnt}tont|i|jotd}|i|}nt|i!|jotd}t}nnt|i"|jotd	}t}nB|i#d
o%td}|i|}t}n
td}|o|i|||dt}n|o|i|t$|GHq||GHqWd
GHdS(s/ Output search/provides type callback matches. po is the pkg object,
            values are the things in the po that we've matched.
            If matchfor is passed, all the strings in that list will be
            highlighted within the output.
            verbose overrides logginglevel, if passed. s%s : s%s.%s : RfNsRepo        : %ss
Matched from:sDescription : sURL         : %ssLicense     : %st/sFilename    : %ssOther       : s

(%R
RtshowdupesfromreposRRRRRRRRtmatchforRRtcolor_search_matchRR9R>RvRRRRRtyumtmisctuniquetvaluesR9Rtcan_overflowR>RRRRRR(
R
RRRpRkR>RRqR9RR((Rt
matchcallback sZ


,



cCs|i|||dtS(NR>(R
RrRRRpRkR9(R
RRRpRk((Rtmatchcallback_verbose[scCsd}d}t}x{|D]s}yFt|i}||7}y|io||7}nWnnXWqt	}|iitdPqXqW|pt|o,|i
ititd|i|n||jo0|i
ititd|i||qndS(s4Report the total download size for a set of packagesis2There was an error calculating total download sizesTotal size: %ssTotal download size: %sN(ttotsizetlocsizeR>RRERRRRR9R
RuRRvtlogRtINFO_1R(R
RERuRtRRR((RtreportDownloadSize^s2

	
c#
s
iittd}g}hdh<dh<dh<}d}gd}xt	dii
ft	diift	d	iift	d
ii
ft	diift	diift	d
iift	diifgD]T\} }g}x,|D]$}|||||i|i}qW|i| |fqWxet	difgD]K\} }g}x#|D]}|||||}qW|i| |fquW|do|dh|d|dhg}d|dddg}i|ddd|dd}|\}}}}}
|
djpt ddi!ii"t	d|ft	d|ft	d|ft	d|ft	d|
ffddi!if}nx$|D]\} }|od| }	nx|D]\}}}!}}
}}|||f||f|!|f||f|
|
ff}i"|dd }i+i,i-\}}xI|D]A}t	d!}|||i2||i3|i4f;}||}qW|	|}	qW|o||	}qqWt	d"di!if}||}t6ii
ii}t6iiii}t	d#||f}|p|o||}nt6iiii}t6ii
}"t6ii}t	d$||"|f}|p|"p|o||}n|S(&s@returns a string rep of the  transaction in an easy-to-read way.uRR;tricsc|i\}	}}}}|i}
|i	}t
|i}i|}|djo
d}n|iidjoii}
n*|ioii}
n
ii}
|i|	||
||||
fxidt|	fdt|
fdt|ffD]4\}}||i|d|||cd7<qW|t|jot|}n|S(NtnoarchRRR;Ryii( RRtpkgtupRtateR;RyRtevrRRRtpkgsizeR
RRRRRRthiRRRR4Rt	obsoletesRRRR6ta_wid(R4RRRRRR|R}RRRRRyR;R~RR(R
(Rt	_add_lines(	


"4t
InstallingtUpdatingtRemovingtReinstallingtDowngradingsInstalling for dependenciessUpdating for dependenciessRemoving for dependenciessSkipped (dependency problems)iiRs  R;Riu

%s
%s
%s
RtPackagetArchtVersiont
RepositorytSizeu u%s:
u
s     replacing  %s%s%s.%s %s

s
Transaction Summary
%s
s6Install   %5.5s Package(s)
Upgrade   %5.5s Package(s)
sQRemove    %5.5s Package(s)
Reinstall %5.5s Package(s)
Downgrade %5.5s Package(s)
N(<R
ttsInfot	makelistsR9toutt
pkglist_linesRRRRRtupdatedtremovedtreinstalledt
downgradedtdepinstalledt
depupdatedt
depremovedtactiontpkglistR4ttxmbrRRRRtskipped_packagesR;Rtn_widtv_widtr_widts_widR?RzRttotalmsgRR|R~RRRRRRRRRtobspotappendedRRRRRtnum_intnum_uptnum_rmtnum_retnum_dg(#R
RRRRRRRRRRRRRRRR;RRRRRRRRRR|RR4RRRRRR~R((R
RtlistTransaction|sz!"!h:%
csd}iid}
xtdiiftdiiftdiiftdii	ftdii
ftdiiftd	iftd
ii
ftdiifg	D],\}}g}t|djo|d
|7}xL|D]D}	|	i\}}}}}d|||||f}|i|qWx)dD]!}|
||}|oPqiqiW|piidg}nx\|oP|t| }
|d7}|i!t"|
|dd7}|t|}qWqqW|S(NR'cs)t||jogSnii|dd}|djogSndg|}d}x|D]~}t|||joGt|||}||jogSn||8}t|||<n|d7}|t|;}qbWx>tt|D]*}||c||7<||cd9<qW|S(sb Work out how many columns we can use to display stuff, in
                the post trans output. iiiiN(RtmsgstnumR
RzR;Rtcol_lenstcolRRR(RRRRRRR(R
(Rt
_fits_in_colss.




tRemovedsDependency Removedt	InstalledsDependency InstalledtUpdatedsDependency UpdatedsSkipped (dependency problems)tReplacedtFailedis
%s:
s%s.%s %s:%s-%siiiiiiis  R_u
(iiiiiii(#RR
RRRRRRRRRRRt	obsoletedtfailedRRRRRR{RR|R}R;RyRRRR3RzR;tcurrent_msgsRR(R
R|RR}RR3RRRyRRR;RRRR((R
RtpostTransactionOutputs6
		
"cCs|iidjptiio |iidd|i_	n,|iit
dtit|i_	|ifhf}|ii||ii|it}||_dS(sWsets up the progress callbacks and various 
           output bars based on debug levelitfoN(R
Rt
debuglevelRBRCRDtrepostsetProgressBarRtcallbackR	tCacheProgressCallbackRtfreporttsetFailureCallbacktsetInterruptCallbacktinterrupt_callbacktDepSolveProgressCallBacktdscbt
dsCallback(R
RR((RtsetupProgressCallbacks4s$	cCs|idS(N(R
R(R
((RtsetupProgessCallbacksMscCs"|i|i_|i|i_dS(N(R
R)Rtconfirm_funct
getKeyForRepotgpg_import_func(R
((RtsetupKeyImportCallbacksQscCsd}td}ti}|ipY|iid}|iid}td|||||f}|ii
ti|n||i|jo
tn||_tdtddS(	sHandle CTRL-C's during downloads

        If a CTRL-C occurs a URLGrabError will be raised to push the download
        onto the next mirror.  
        
        If two CTRL-C's occur in quick succession then yum will exit.

        @param cbobj: urlgrabber callback obj
        f2.0ttwoR$RsZ
 Current download cancelled, %sinterrupt (ctrl-c) again%s within %s%s%s seconds to exit.
isuser interruptN(tdelta_exit_chkRtdelta_exit_strRRR
R{RzR)RRRRvRvRtINFO_2tKeyboardInterrupttURLGrabError(R
tcbobjRRRRRR((RRUs	

	cCsKt|djodSnttidpdSntiid}|ii	t
id|it
i
|}|djo
d}n|id|i|}|id|i|}
|id	d
}	|id|i||}dttd
|i|i|||
|	f}|ii	t
i|dS(NitTerminalLineit-if0.01s | %5sBs %9sRis %5sB/ss
%s%s%s%s%stTotal(Rtremote_pkgsRRRRttlR
RvRvRRtrestRtdownload_start_timestamptdl_timetaddRtremote_sizetui_sizeRftui_timetui_endtui_bsRRR(R
RRRRRRRRRR((Rtdownload_callback_total_cbss 

 7(,RRRRXRRRRRRtstaticmethodRRRRRR>RRRRRRR
RR'R)R7R<RARMRSRRfRrRsRxRRRRRRR(((RRpsN					
4	
 		(			
		%;		x	@				RcBsqtZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
RS(sFprovides text output callback functions for Dependency Solver callbackcCstid|_d|_dS(s8requires yum-cli log and errorlog functions as argumentssyum.verbose.cliiN(RsRtR
Rvtloops(R
((RRXsc
	Cshdtd<dtd<dtd<dtd<}|\}}}}}	||}|iit
itd	|||||	|dS(
NtiRtuRtoRR}teraseds(---> Package %s.%s %s:%s-%s set to be %s(RtmodedictR{RR|R}R;RyRKtmodetermR
RvRvRR(
R
R{RKR|RR}RRR;Ry((RtpkgAddedsB
cCs|id7_dS(Ni(R
R(R
((RtstartscCs |iititddS(Ns--> Running transaction check(R
RvRvRRR(R
((RttscheckscCsE|id7_|iititd|iid|idS(Nis6--> Restarting Dependency Resolution with new changes.s---> Loop Number: %d(R
RRvRvRRRtdebug(R
((RtrestartLoops
cCs |iititddS(Ns"--> Finished Dependency Resolution(R
RvRvRRR(R
((RR_scCs&|iititd||dS(Ns---> Processing Dependency: %s for package: %s(R
RvRvRRRt
formatted_reqR(R
RR((RtprocReqscCs#|iititd|dS(Ns--> Unresolved Dependency: %s(R
RvRvRRRR(R
R((Rt
unresolvedscCs&|iititd||dS(Ns(--> Processing Conflict: %s conflicts %s(R
RvRvRRRRtconfname(R
RR((RtprocConflictscCs |iititddS(NsC--> Populating transaction set with selected packages. Please wait.(R
RvRvRRR(R
((RttransactionPopulationscCs#|iititd|dS(Ns<---> Downloading header for %s to pack into transaction set.(R
RvRvRRRR(R
R((RtdownloadHeaders(RRRRXRRRRR_RRRRR(((RRs										RcBs>tZdZdZdZdZdZedZRS(sP
    The class handles text output callbacks during metadata cache updates.
    cCs:tid|_tid|_tid|_dS(Nsyum.clisyum.verbose.clisyum.filelogging.cli(RsRtR
RuRvtfile_logger(R
((RRXscCs|ii||dS(N(R
RvRvtleveltmessage(R
RR((RRvscCs|ii||dS(N(R
RuRvRR(R
RR((RterrorlogscCs|ii||dS(N(R
RRvRR(R
RR((RtfilelogscCst|||dS(N(RRRR(R
RRR((RRs(	RRRRXRvRRRR(((RRs				tYumCliRPMCallBackcBsGtZdZedZdZdZdZee	dZ
RS(s9
    Yum specific callback class for RPM operations.
    cCstS(N(R(R=((RRscCsYti|td|_d|_tidi	t
i|_d|_
d|_dS(NR'syum.verbose.clit#i(tRPMBaseCallbackRXR
RtlastmsgRtlastpackageRsRtRRRtoutputtmarktmarks(R
((RRXs
		cCs5|i|}t|tijo
|i}n|}||_	|djo
d}	n|d|}	|i
otiip
||jo|i|	||d|\}
}}|
t|||t|||f}
|
|ijo0tiit|
tii|
|_n||jo	dGHq1ndS(NildtpkgnameR(R
RtprocessRctpackagettypestStringTypesRRRtte_totaltpercentt
te_currentRRBRCRDt_makefmtt
ts_currenttts_totaltfmttwid1twid2RRRtwriteRtflush(R
RRR	RRRRRRRRRR
((Rtevents$

	

'(


cCs2|o'tiit|tiindS(N(RRBRCRRR(R
RR((Rt	scriptoutscCstt|}d||f}d|d|d}|||f}|djo
d}n
t|}d|d}
|
d7}
|
d7}
|
d7}
|
d7}
|i}	|	|
jo
|
}	n|	|
8}	||	djo|	d}n|i|
|}d||f}	d	|	d
}||d}
|o!|djod|}|
}n|o>||it||d
f}d|d|}|}nN|djod|}|
}n-||i|f}d|d|}|}|d|fS(Ns%s.%st%ss/%Riiiis[%-ss]ids
  %s: %s   f100.0s

  %s: %s Rs  %s: %s   s	  %s: %s i(RRRtlRtfmt_doneRtdoneRRtpnlRtoverheadR
RRtfmt_bartfull_pnlRRR
RRRtbar(R
RRRRRRRRRRRRRRRRRR
((RR

sH





	




"



(RRRRoRRXRRR9RR
(((RRs	
		c
Cs+d}tiipdSn|djo
d}n(|djot||}nd}t}|djo||jo
d}nd||f}|t
|d8}|djo
d}n|djoL|d8}|djo
d}n|t||}d|||f}n||jo d	t||||f}n|d
8}|djo
d}n|d}	|	t|jot|}	n||	8}|t||}dt||	|	|||f}||jotii|n||jotiidntiidS(
ssimple progress bar 50 # marksRNiRs %d/%diis	
[%-*s]%ss
%s%sis

%s: [%-*s]%ss
(RRBRCRDRRRRRRRRR_RRthashbarRRtnwidRRR(
RRRRR_RRRRR((RR>sL


	







 




"

t__main__iRR's Doing progress, small nameiieidtabcdf0.10000000000000001s Doing progress, big names_%s_s
123456789 is Doing progress, no namesrpm-progresstfoos_12345678_.endRs! Doing CB, small proc / small pkgtspkgs Doing CB, big proc / big pkgtlpkgs-=is.ends
i18n-progresssi18n-rpm-progresss! Doing progress, i18n: small names正在安装s Doing progress, i18n: big names' Doing CB, i18n: small proc / small pkgs# Doing CB, i18n: big proc / big pkg(6RRBRRsRRRwRZturlgrabber.progressRRturlgrabber.grabberRtyum.miscRQtyum.i18nRRRRmtrpmUtils.miscutilsR
t
yum.constantsRRtyum.rpmtransRtyum.packageSackR0RRRRR	RRpRRRRRRRtargvRRtsleeptcbR9RRRRntsetup_locale(!RRRRRRRwRRRRRRQRZRRR.RR
R0RBRR	RsRRRRRmRRRRp((Rt?s							
	

	


	
q<c5
*
0		

(60	6		(

Anon7 - 2021