Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
ó ð v_c@s©dZddlZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z m Z ddl ZddlmZddlmZddlmZmZmZddlZddlmZmZdd lTdd lmZmZmZdd lm Z dd l!m"Z"ddl#Zddl$Zdd lm%Z%m&Z&m'Z'ddl(Z(ye)ddƒdksšt*‚Wnd„Z+d„Z)nXd„Z,de fd„ƒYZ-de fd„ƒYZ.dfd„ƒYZ/dfd„ƒYZ0dfd„ƒYZ1dfd„ƒYZ2e3d„Z4d e fd!„ƒYZ5e3d"„Z6e7d#kr¥e8ej9ƒd$ko—ej9d$d%krGd&GHd'GHd&GHe0ƒZ:x�d(d)d*d$d+d,d-d.d/d0d1d2d3d4dd5d6d7d8d-d9d-d:d-d;fD]8Z;e:j<e;ƒZ=d<e;e=d=d>e8e=ƒe=fGHqWne8ej9ƒd$kolej9d$d?krId&GHd@GHd&GHx4e>d(dAƒD]#Z;e6e;d0dBƒej?d*ƒqŽWd&GHdCGHd&GHx<e>d(dAƒD]+Z;e6e;d0dDdEdFƒej?d*ƒqÔWd&GHdGGHd&GHx1e>d(dAƒD] Z;e6e;d0ƒej?d*ƒq"Wne8ej9ƒd$kotej9d$d?dHfkrVe5ƒZ@eAe@_BdBe@jCdId(dAƒD]/Z;e@jDdMdIe;d0e;d0ƒej?d*ƒqÂWd&GHdNGHd&GHxLe>d(dAƒD];Z;e@jDdOdPdQdRdKe;d0e;d0ƒej?d*ƒqWne8ej9ƒd$ko‡ej9d$d?dSdHdTfkršejEjFƒne8ej9ƒd$koÅej9d$d?dSfkrud&GHdUGHd&GHx:e>d(dAƒD])Z;e6e;d0edVƒƒej?d*ƒqçWd&GHd&GHdWGHd&GHxBe>d(dAƒD]1Z;e6e;d0edVdFdRƒƒej?d*ƒq8Wd&GHne8ej9ƒd$ko¦ej9d$d?dSdHdTfkr¢e5ƒZ@eAe@_BedVƒe@jCdId(dAƒD]/Z;e@jDdMdIe;d0e;d0ƒej?d*ƒq Wd&GHdYGHd&GHxLe>d(dAƒD];Z;e@jDdOdPdQdRdKe;d0e;d0ƒej?d*ƒq[Wd&GHnndS(Zs"Handle actual output from the cli.iÿÿÿÿN(tproxy(t TextMetertTextMultiFileMeter(t URLGrabError(tprco_tuple_to_string(tto_strtto_utf8t to_unicode(t checkSignalst formatRequire(t*(t logginglevelst_tP_(tRPMBaseCallback(tpackagesNewestByNameArch(t utf8_widthtutf8_width_filltutf8_text_filliicGs*x#|D]}||kr|}qqW|S(N((txtargsty((s/usr/share/yum-cli/output.pytmin8s  cGs*x#|D]}||kr|}qqW|S(N((RRR((s/usr/share/yum-cli/output.pytmax<s  cCsIttjdƒsdStjjƒ}|dkr5dS|dkrEdS|S(s= Simple terminal width, limit to 20 chars. and make 0 == 80. tterminal_width_cachediPii(thasattrt urlgrabbertprogressR(tret((s/usr/share/yum-cli/output.pyt _term_widthAs  t YumTextMetercBseZdZdd„ZRS(s,A class to display text progress bar output.cCstƒtj|||ƒdS(s Update the status of the text progress bar :param amount_read: the amount of data, in bytes, that has been read :param now: the current time in seconds since the epoch. If *now* is not given, the output of :func:`time.time()` will be used. N(RRtupdate(tselft amount_readtnow((s/usr/share/yum-cli/output.pyRPsN(t__name__t __module__t__doc__tNoneR(((s/usr/share/yum-cli/output.pyRMstYumTextMultiFileMetercBseZd„ZRS(cCstƒtj|||ƒdS(N(RRt update_meter(R tmeterR"((s/usr/share/yum-cli/output.pyR(\s(R#R$R((((s/usr/share/yum-cli/output.pyR'[stYumTermcBsçeZdZeZeejdƒr6ed„ƒZ nidd6dd6dd6Z id d 6d d 6d d6dd6dd6dd6dd6dd6Z id d 6d d6d d6dd6dd 6dd6dd6dd6Z idd6dd6dd6dd6d d6d!d6Z id"d 6d#d6d$d6d%d6d&d 6d'd6d(d6d)d6Zid*d 6d+d6d,d6d-d6d.d 6d/d6d0d6d1d6Zd2„Zd=d3d4„Zd=d3d5„Zd6„Zd=ed7„Zd8„Zd9„Zd:„Zd;„Zd<„ZRS(>s>A class to provide some terminal "UI" helpers based on curses.RcCstƒS(N(R(R ((s/usr/share/yum-cli/output.pytmstsmult underlinetrevtreversetsgr0tnormalitblackitblueitgreenitcyanitreditmagentaityellowitwhitestboldstblinkttdimsss(BsssssssssssssssscCs(|j|_|j|_|j|_dS(N(t_YumTerm__ansi_forced_MODEtMODEt_YumTerm__ansi_forced_FG_COLORtFG_COLORt_YumTerm__ansi_forced_BG_COLORtBG_COLOR(R ((s/usr/share/yum-cli/output.pyt __forced_init¦s  tautoc Cs¡t|_ttjdƒs'd|_nd|_|dkrJ|jƒdSidd6dd6dd 6dd 6dd 6dd 6|_idd 6dd6dd6dd6dd6dd6dd6dd6|_ idd 6dd6dd6dd6dd6dd6dd6dd6|_ |dkrt |_dS|dks*t ‚yddl }Wnt |_dSX|s`tj}n|jƒsyt |_dSy|jd|jƒƒWnt |_dSX|j|_ttjdƒsÚ|jdƒ|_n|jdƒ|_xR|jD]G}|}||jkr!|j|}n|j|ƒp3d|j|[/*]?(R\tretsub(R Rftcap((s/usr/share/yum-cli/output.pyR_sc s…|js |S|stj}n‡‡fd†}xM|D]E}||ƒ} |rhtj| tjƒ} ntj| ||ƒ}q8W|S(s)Search the string *haystack* for all occurrences of any string in the list *needles*. Prefix each occurrence with *beg*, and postfix each occurrence with *end*, then return the modified string. For example:: >>> yt = YumTerm() >>> yt.sub('spam and eggs', 'x', 'z', ['and']) 'spam xandz eggs' This is particularly useful for emphasizing certain words in output: for example, calling :func:`sub` with *beg* = MODE['bold'] and *end* = MODE['normal'] will return a string that when printed to the terminal will appear to be *haystack* with each occurrence of the strings in *needles* in bold face. Note, however, that the :func:`sub_mode`, :func:`sub_bold`, :func:`sub_fg`, and :func:`sub_bg` methods provide convenient ways to access this same emphasizing functionality. :param haystack: the string to be modified :param beg: the string to be prefixed onto matches :param end: the string to be postfixed onto matches :param needles: a list of strings to add the prefixes and postfixes to :param escape: a function that accepts a string and returns the same string with problematic characters escaped. By default, :func:`re.escape` is used. :param ignore_case: whether case should be ignored when searching for matches :return: *haystack* with *beg* prefixing, and *end* postfixing, occurrences of the strings in *needles* csˆ|jƒˆS(N(tgroup(tmatch(tbegtend(s/usr/share/yum-cli/output.pyR+Js(RPRotescapettemplatetIRp( R thaystackRtRutneedlesRvt ignore_casetrendertneedletpat((RtRus/usr/share/yum-cli/output.pyRp$s    cKs |j|||jd||�S(sOSearch the string *haystack* for all occurrences of any string in the list *needles*. Prefix each occurrence with *beg*, and postfix each occurrence with self.MODE['normal'], then return the modified string. If *beg* is an ANSI escape code, such as given by self.MODE['bold'], this method will return *haystack* with the formatting given by the code only applied to the strings in *needles*. :param haystack: the string to be modified :param beg: the string to be prefixed onto matches :param end: the string to be postfixed onto matches :param needles: a list of strings to add the prefixes and postfixes to :return: *haystack* with *beg* prefixing, and self.MODE['normal'] postfixing, occurrences of the strings in *needles* R1(RpR?(R RyRtRztkwds((s/usr/share/yum-cli/output.pytsub_normQscKs|j||j|||�S(sTSearch the string *haystack* for all occurrences of any string in the list *needles*. Prefix each occurrence with self.MODE[*mode*], and postfix each occurrence with self.MODE['normal'], then return the modified string. This will return a string that when printed to the terminal will appear to be *haystack* with each occurrence of the strings in *needles* in the given *mode*. :param haystack: the string to be modified :param mode: the mode to set the matches to be in. Valid values are given by self.MODE.keys(). :param needles: a list of strings to add the prefixes and postfixes to :return: *haystack* with self.MODE[*mode*] prefixing, and self.MODE['normal'] postfixing, occurrences of the strings in *needles* (R€R?(R RyRgRzR((s/usr/share/yum-cli/output.pytsub_modedscKs|j|d||�S(sÚSearch the string *haystack* for all occurrences of any string in the list *needles*. Prefix each occurrence with self.MODE['bold'], and postfix each occurrence with self.MODE['normal'], then return the modified string. This will return a string that when printed to the terminal will appear to be *haystack* with each occurrence of the strings in *needles* in bold face. :param haystack: the string to be modified :param needles: a list of strings to add the prefixes and postfixes to :return: *haystack* with self.MODE['bold'] prefixing, and self.MODE['normal'] postfixing, occurrences of the strings in *needles* R:(R�(R RyRzR((s/usr/share/yum-cli/output.pytsub_boldxscKs|j||j|||�S(scSearch the string *haystack* for all occurrences of any string in the list *needles*. Prefix each occurrence with self.FG_COLOR[*color*], and postfix each occurrence with self.MODE['normal'], then return the modified string. This will return a string that when printed to the terminal will appear to be *haystack* with each occurrence of the strings in *needles* in the given color. :param haystack: the string to be modified :param color: the color to set the matches to be in. Valid values are given by self.FG_COLOR.keys(). :param needles: a list of strings to add the prefixes and postfixes to :return: *haystack* with self.FG_COLOR[*color*] prefixing, and self.MODE['normal'] postfixing, occurrences of the strings in *needles* (R€RA(R RyReRzR((s/usr/share/yum-cli/output.pytsub_fgŠscKs|j||j|||�S(s…Search the string *haystack* for all occurrences of any string in the list *needles*. Prefix each occurrence with self.BG_COLOR[*color*], and postfix each occurrence with self.MODE['normal'], then return the modified string. This will return a string that when printed to the terminal will appear to be *haystack* with each occurrence of the strings in *needles* highlighted in the given background color. :param haystack: the string to be modified :param color: the background color to set the matches to be in. Valid values are given by self.BG_COLOR.keys(). :param needles: a list of strings to add the prefixes and postfixes to :return: *haystack* with self.BG_COLOR[*color*] prefixing, and self.MODE['normal'] postfixing, occurrences of the strings in *needles* (R€RC(R RyReRzR((s/usr/share/yum-cli/output.pytsub_bgžsN(R#R$R%RORPRRRtpropertyRQR^R`RcR>R@RBRRR&RmRnR_RSRpR€R�R‚RƒR„(((s/usr/share/yum-cli/output.pyR*`sz        o -    t YumOutputcBsLeZdZd„Zd„Zd„Zd„ZdMd„Zd„Z d„Z e d„ƒZ dMd dMd d „Z e d „ƒZd „Zdded„Zed edMd„Zed edMd„Zd„Zdd„Zd„Zed„ZdMdMd„ZidMid„Zedƒid„Zd„Zd„ZddMd„ZddMdMd„Z d „Z!d!„Z"d"„Z#d d#d$„Z$e d d%„ƒZ%dMdMdMd&„Z&dMd'„Z'ed(„Z(d)„Z)d*„Z*d+„Z+d,„Z,d-„Z-d.„Z.d/„Z/d0„Z0d1„Z1dMd2„Z2e d3„ƒZ3d4„Z4d5„Z5d6„Z6d7„Z7d8„Z8d9„Z9d:„Z:gd;„Z;i ed<ƒd=6ed<ƒd<6ed>ƒd>6ed?ƒd?6ed@ƒd@6edAƒdA6edBƒdB6edCƒdC6edDƒdD6edEƒdE6edFƒdF6Z<gdG„Z=dH„Z>dI„Z?dJ„Z@dK„ZAe dL„ƒZBRS(Ns+Main output class for the yum command line.cCs�tjdƒ|_tjdƒ|_ttdƒrQtjdƒjdƒ|_n dg|_t ƒ|_ d|_ d„t jƒDƒ|_dS(Nsyum.clisyum.verbose.clit expandMacros %_i18ndomainst:s redhat-distcSsi|]\}}t|“qS((RS(t.0tktv((s/usr/share/yum-cli/output.pys Âs (tloggingt getLoggertloggertverbose_loggerRtrpmR‡tsplitt i18ndomainsR*ttermR&t_last_interrupttERRORS_TO_KBASE_ARTICLESt iteritemstreported_error_msgs(R ((s/usr/share/yum-cli/output.pyRn·s   c Cs»tdƒtdƒtdƒtdƒtdƒtdƒtdƒtdƒtd ƒtd ƒtd ƒtd ƒg }tjtjƒƒ}|ttjd |ƒƒdtjd|ƒ}|S(s™Return a string representing the current time in the form:: Mon dd hh:mm:ss :return: a string representing the current time tJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDecs%mis %d %T (R ttimet localtimetinttstrftime(R tmonthsR"R((s/usr/share/yum-cli/output.pyt printtimeÅs 6<cCs�|jjd|j|jƒt|dƒr`|jr`|jjdkr`|jjtdƒƒdS|jjtdƒƒ|j|ƒ|j‚dS(sÖPerform failure output for failovers from urlgrabber :param errobj: :class:`urlgrabber.grabber.CallbackObject` containing information about the error :raises: *errobj*.exception s%s: %stretry_no_cacheis'Trying again, now avoiding proxy cache.NsTrying other mirror.( RŽterrorturlt exceptionRRªterrnoR tsuggestKBaseArticle(R terrobj((s/usr/share/yum-cli/output.pyt failureReportÓs cCs«d}t|jdƒr9|jjtkr9|jj}n3t|jdƒrl|jjtkrl|jj}n|svdS|j|s§|jjt|ƒt |j|' - 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 tlisttinfoiis%stkernsbold,underlinesnot inR1Rþt>R:t|jjdkr^|jjr^|jr^tjj|g|jƒ\}}}|sW|r^dSn|jjrwd|} nd|j |j f} |j | |j |j ƒƒ} |rê|dkrÌ|jj}n|j| ||dtƒ} n| GH|dkr|jjtjƒ}n|sdStdƒ|jGHt} xýtjj|ƒD]é} t| ƒ} t|j ƒ| ksHt|j ƒ| krŠqHn| s¤tdƒGHt} nt} tr³n1t|jƒ| krætdƒ} |j | ƒ} nþt|jƒ| krtd ƒ} t} nÔt|jƒ| kr:td ƒ} t} nª| jd ƒrmtd ƒ} |j | ƒ} t} nwg}x1|j D]&}|d | kr}|j!|ƒq}q}W|rØtdƒ} tjj"t#|ƒd ƒ} n tdƒ} |r|j| ||dtƒ} n| r(|j | t$| ƒƒGHqH| | GHqHWdGHdS(s¹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 RNs%s : s%s.%s : R{sRepo : %ss Matched from:sDescription : sURL : %ssLicense : %st/sFilename : %sisProvides : sOther : s (%RR&R$tquery_install_excludestcmdline_excludesR9R|t parsePackagestshowdupesfromreposR·RêRýRRR&tcolor_search_matchRÄROR�RR RR RëRSR:tuniqueRR!R¬R R¾tprovidesRÌRRËR(R R›tvaluestmatchforRqR¿tetmtuRätdoneRit can_overflowRútprovstprov((s/usr/share/yum-cli/output.pyt matchcallback@st $      *             cCs|j|||dtƒS(sqOutput 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 Rq(RÂRO(R R›R¹Rº((s/usr/share/yum-cli/output.pytmatchcallback_verbose‘s c s\d}d}d}t}‡fd†}x¬|D]¤}ywt|jƒ} || 7}y|jƒrl|| 7}nWnnX|sƒw.nyt|jƒ} WnnX|| 7}Wq.t}ˆjjtdƒƒPq.Xq.W|sX|r|tdƒˆj |ƒƒn||kr0|tdƒˆj ||ƒƒn|rX|tdƒˆj |ƒƒqXndS(sÌ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 icsgˆjjtjjƒr1ˆjjtj|Œn2ˆjjsJˆjj rcˆj j tj|ŒndS(N( R�RR9R tINFO_1tlogR$tassumenot assumeyesRŽtwarn(R(R (s/usr/share/yum-cli/output.pyt _call_log¨ss2There was an error calculating total download sizesTotal size: %ssTotal download size: %ssInstalled size: %sN( RSR¦RR't installedsizeRORŽR«R R( R R|t installonlyttotsizetlocsizetinsizeR«RÉRíR((R s/usr/share/yum-cli/output.pytreportDownloadSize�sB      cCsõd}t}xR|D]J}yt|jƒ}||7}Wqt}|jjtdƒƒPqXqW|sñ|jjt j j ƒrª|jj t j tdƒ|j |ƒƒqñ|jjsÃ|jj rñ|jjt j tdƒ|j |ƒƒqñndS(smReport the total size of packages being removed. :param packages: a list of package objects is-There was an error calculating installed sizesInstalled size: %sN(RSR¦RRORŽR«R R�RR9R RÄRÅRR$RÆRÇRÈ(R R|RÌR«RíR((s/usr/share/yum-cli/output.pytreportRemoveSizeÑs&    c/ sìˆjjttƒg}iid6id6id6}d}g‡fd†}ˆjj}i}ˆjjdkr9|r9g}xºˆjjD]©}t|dƒrÚd|jf}||krÆg||gSdg|}d}x|D]w}t|ƒ||krµt|ƒ||}||kr˜gS||8}t|ƒ||tt|ƒƒD]*}||c||7<||cd9 %    "cCs1|jjdks"tjjƒ r7d}d}d}n-tdtjƒ}tdtjƒ}tƒ}|j dif}|}|j }t |dƒrÓ||j _ ||j _||j _||j _||j _ n?|jj||ƒ||j_|jj|ƒ|jj|ƒtt|ƒƒ}||_dS(s`Set up the progress callbacks and various output bars based on debug level. itfot prerepoconfN((R$t debuglevelRVRWRXR&RR'tCacheProgressCallbackR±tinterrupt_callbackRR'R´tmulti_progressbartcallbacktfailure_callbacktrepostsetProgressBartsetFailureCallbacktsetInterruptCallbacktDepSolveProgressCallBacktweakreft dsCallback(R R´R+R,tfreportR-R*tdscb((s/usr/share/yum-cli/output.pytsetupProgressCallbacksôs,"        cCs|jƒdS(s;This function is for API purposes only to protect the typo.N(R7(R ((s/usr/share/yum-cli/output.pytsetupProgessCallbacksscCsy|j}|j}|j}t|dƒrQ||j_||j_||j_n$||j_||j_||j_dS(s7Set up callbacks to import and confirm gpg public keys.R'N( RYt getKeyForRepotgetCAKeyForRepoRR't confirm_functgpg_import_functgpgca_import_funcR.(R R;R<R=((s/usr/share/yum-cli/output.pytsetupKeyImportCallbacks s       cCs½d}tdƒ}tjƒ}|js|jjd}|jjd}tdƒ|||||f}|jjtj|ƒn||j|kr›t ‚n||_t dtdƒƒ‚dS( s Handle 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: :class:`urlgrabber.grabber.CallbackObject` g@ttwoR:R1sZ Current download cancelled, %sinterrupt (ctrl-c) again%s within %s%s%s seconds to exit. isuser interruptN( R R¤R”R“R?R�RÅR tINFO_2tKeyboardInterruptR(R tcbobjtdelta_exit_chktdelta_exit_strR"RÀRÁRä((s/usr/share/yum-cli/output.pyR*/s     c CsGt|ƒdkrdSttjdƒs,dStjjdƒ}|jjtjd|j ƒƒt j ƒ|}|dkrƒd}n|j d|j |ƒƒ}|j d |j ||jd kƒƒ}|j dƒ}|j d |j ||ƒƒ} dttdƒ|j ƒ|j ƒƒ| |||f} |jjtj| ƒdS(slOutputs summary information about the download process. :param remote_pkgs: a list of package objects that were downloaded :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 iNt TerminalLineiRmig{®Gáz„?s | %5sBs %siPRºis %5sB/ss %s%s%s%s%stTotals (RÉRRRRER�RÅR R@trestR¤RzRR®t_llenRR ( R t remote_pkgst remote_sizetdownload_start_timestampttltdl_timetui_sizetui_timetui_endtui_bsRä((s/usr/share/yum-cli/output.pytdownload_callback_total_cbPs    ( $cCsUtƒ}d}x||D]t}|j}|dkr:d}n|dkrOd}n|dkrdd}n|dkr|j|ƒ|d 7}qqWt|ƒd ks¦t‚t|ƒd kr<itd ƒd6tdƒd6tdƒd6tdƒd 6tdƒd 6tdƒd6}|djgt|ƒD]}||^q"ƒfS|djt|ƒƒfS(Nis True-InstallRès Dep-Installt Obsoletedt ObsoletingtUpdatetEraseRëRìiiRxtOR¡tRtDtUs, R<(sInstallRURVs Reinstalls DowngradeRT( RKtstateRzRÉRTR RûRËR4(R thpkgstactionsRùthpkgtstt large2smallR((s/usr/share/yum-cli/output.pyt_history_uiactionsls0               0c Csst|ƒtgƒkr;g|D]}|j||ƒ^qS|dksS|d kr¤tdƒ}tdƒd|}|dk ršt|ƒ|krš|}nt|ƒSd„}y¡tj|ƒ}||jddƒ}d ||j f}|dk rCt|ƒ|krCd ||ƒ|j f}t|ƒ|krCd |j }qCnt|ƒSWnt k rntt |ƒƒSXdS( NIÿÿÿÿiÿÿÿstSystemRºcWs!|j|Œ}|sdS|dS(sf Split gives us a [0] for everything _but_ '', this function returns '' in that case. R<i(R‘(ttextRR((s/usr/share/yum-cli/output.pyt _safe_split_0—st;is%s <%s>s %s ... <%s>s<%s>(Iÿÿÿÿiÿÿÿ( R¤RR&R RÉRtpwdtgetpwuidtpw_gecostpw_nametKeyErrorRô( R R"tlimitR½tloginidR·Rdtusertfullname((s/usr/share/yum-cli/output.pyRŠs(#     csLJfd†}d|krdS|jddƒ\}}||ƒ}|ˆjkrVdS|dkrfdS||ƒ}|ˆjkr…dS|dks�|dkr¡dS||kr½||}}n||fS(s3 Convert a user "TID" string of 2..4 into: (2, 4). csšy�|dks|jdƒrvˆj}|jdƒrrt|tdƒƒ}|dkretdƒn||8}n|St|ƒSWntk r•dSXdS(Ntlastslast-itz(R¾ttidR¦RÉRR&(RRqtoff(told(s/usr/share/yum-cli/output.pytstr2int®s     s..iiN(R&R‘Rq(RsRqRttbtidtetid((Rss/usr/share/yum-cli/output.pyt_historyRangeRTIDs«s"     cCs¥tƒ}d}x�t|ƒD]�}|d|kr`|jjtd|d|dfƒƒqn|d}x0t|d|ddƒD]}|j|ƒq†WqW|S(su Convert a list of ranged tid typles into all the tids needed, Eg. [(2,4), (6,8)] == [2, 3, 4, 6, 7, 8]. iÿÿÿÿis4Skipping merged transaction %d to %d, as it overlapsi(RKRËRŽRÈR RÊRz(R trtidsttidstlast_endtmtidR((s/usr/share/yum-cli/output.pyt_historyRangeTIDsÐs ( "c CsZ|jjƒ}|dkr5|jjtdƒƒdStƒ}g}|d}t}|rƒt}|ddkrƒ|j dƒqƒnx�|D]y}yt |ƒ|j |ƒWqŠt k r|j ||ƒ}|rò|j|j|gƒƒqŠn|j|ƒqŠXqŠW|r)|j|jj|ƒƒn| rP|rP|jjtdƒƒdS||fS(NsNo transactionsiitalls)Bad transaction IDs, or package(s), given(NN(NN(thistoryRoR&RŽtcriticalR RKRSRORÏR¦RzRRwRR|RÌtsearch( R textcmdsRsRytpatstusertidstprintallRqtrtid((s/usr/share/yum-cli/output.pyt_history_list_transactionsÞs8       c Cs|j|ƒ\}}|d(krA|s4ddgfSddgfSd}|rVd(}n|jj|d|ƒ}d}|jjdkr•ddg}nÕ|jjd kr³dg}n·|jjd ksËt‚tƒ}d}x[|D]S} | rþ||krþPn|d7}| jd(kr$|d7}n|j | j ƒqáWt |ƒdkrj||dkrj|j d ƒnd } t |ƒdkr‘t d ƒ} n t dƒ} | t t dƒddƒt | ddƒt t dƒddƒt t dƒddƒt t dƒddƒfGHddGHd} d}x�|D]…} | rB||krBPn|d7}t |ƒdkrp| jpjd} n|j| j dƒ} tjdtj| jƒƒ} |j| jƒ\} }t | ddƒ} t |ddƒ}d}}| jd(krd}}nX| jrd}}nB| jr1d }}n,| jrGd!}}n| jr]d"}}n| jrod#}n| jr�d$}n| | j| | || fGd%||fGHq%W|jjƒ}|d(krÜ|jd&tƒn5|jj d't!ƒd}|j"|kr|jƒnd(S()s)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 isNo accessible history to listisFailed history listiRktusersitcommandsssingle-user-commandstblahs%s | %s | %s | %s | %ss Command lines Login usertIDiis Date and timeis Action(s)itAlterediRmiOs%6u | %s | %-16.16s | %s | %4uR<s%Y-%m-%d %H:%MRºR t#R¡R RR8R7s%s%sRÈt main_onlyN(#R†R&R~RsR$thistory_list_viewRTRKtcmdlineRztloginuidRÉR RRR¤R§R¥t beg_timestampRat trans_datat return_codetoutputtrpmdb_problemst trans_skiptaltered_lt_rpmdbtaltered_gt_rpmdbRqRot_rpmdb_warn_checksRSRZt simpleVersionROtend_rpmdbversion(R R�RyR„Rktold_tidsR¾tuidstblanksRstfmtR·ttmRtuiactstrmarktlmarktlastdbvtrpmdbv((s/usr/share/yum-cli/output.pythistoryListCmdþs�          "                   - c Cs©t|ƒdkr,|jjtdƒƒdSg}d}x8|dD],}yû|dksg|jdƒr|dkrªt}|jjd|ƒ}|dkrªt dƒqªn|j }|jdƒrþt |tdƒƒ}|dkrñt dƒn||8}n|j t |ƒƒwCnt |ƒdkr6t dƒn|j |ƒWqCt k rn|jjtd ƒƒdSXqCW|jj|ƒ}|s¥|jjtd ƒƒdS|S( NisNo transaction ID giveniRoslast-tcomplete_transactions_onlyRpisBad transaction ID givensNot found given transaction ID(RÉRŽRR R&R¾RSR~RoR¦RqRÌRôRRs( R R�RyRotextcmdtctoRqRrRs((s/usr/share/yum-cli/output.pyt_history_get_transactions_s@         cCsR|j|ƒ}|dkrdSt|ƒdkrJ|jjtdƒƒn|dS(Nis#Found more than one transaction ID!i(RªR&RÉRŽRR (R R�Rs((s/usr/share/yum-cli/output.pyt_history_get_transactionƒs  cCsÝd„}tƒ}tƒ}g}|jjƒ}|d kr_|jjtdƒƒddgfSx{|dD]o}|j||ƒr¡|j|j||ƒƒqjn+||ƒd k rÌ|j||ƒƒqjn|j |ƒqjW|rÿ|j |jj |ƒƒn|j ƒ}|r6t |ƒ}|j |j|ƒƒn| r–t|ƒdkr–|jjdtƒ}|d k r–|j|jƒ|j|jƒq–n|s¿|jjtdƒƒddgfS|jjƒ} | d k rï| j} | j} nt} d\} } d }|r%|jd ƒ\} } nxƒ|jj|ƒD]o}| d k r�|j| kr�|jjd tƒd }| |kr�t|_q�nd } |j| krâ|j| krâ|d krÒtjj|ƒ}qm|j|ƒn‹|d k rm| rd d GHnt} |j|ƒd }|rm|jd ƒ\} } |j| krj|j| krjtjj|ƒ}qjqmn|j|kr8| rŽd d GHnt} |j||ƒq8q8W|d k rÙ| rÉd d GHn|j|ƒnd S(sOutput 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 cSs'yt|ƒSWntk r"dSXdS(N(R¦RR&(R((s/usr/share/yum-cli/output.pyRt–s sNo transactionsisFailed history infoiR§s$No transaction ID, or package, giveniÿÿÿÿiR�RmiON(iÿÿÿÿiÿÿÿÿ(RKR~RoR&RŽRR RwRzRÌRR€tcopyRËR|RÉRSRqR›RÏRsRZRšROR˜R9tYumMergedHistoryTransactiontmerget_historyInfoCmd(R R�RtRytmtidsR‚RsRqtutidsR¤tlasttidR¾tbmtidtemtidtmobjR¥((s/usr/share/yum-cli/output.pythistoryInfoCmd‹sˆ                     cCspd|jkr|jS|jj|jƒ}|se|jj|jƒ}|sPdSdt|djƒS|djS(sn Given a pkg, find the ipkg.ui_from_repo ... if none, then get an apkg. ... and put a ? in there. R t?s@?i(RRëRZtsearchPkgTupleR=R\RôR(R R^RaRb((s/usr/share/yum-cli/output.pyt_hpkg2from_repoïsc s¤ˆj|jƒ}itdƒd6tdƒd6tdƒd6tdƒd6‰itdƒd6td ƒd6td ƒd6td ƒd6‰tgˆjƒˆjƒD]}t|ƒ^q ƒ}|ˆd <|ˆd  siÿÿÿÿR»iRIs-Impossible, installed not newer and not olderR:R1R¿R<s%s%s%s%s %-*s %s( RZR[R·tsortR=RSRTRÃRR¹( Rít prefix_lent was_installedR¿t pkg_max_lent show_repoRàt _pkg_statesR[RaRÀRÁtui_repo(t_pkg_states_availablet_pkg_states_installedR^R (s/usr/share/yum-cli/output.pyt _simple_pkg s2       sTransaction ID :s%u..%uiÿÿÿÿsBegin time :sBegin rpmdb :s**iRºii<s (%u seconds)s (%u minutes)is (%u hours)s (%u days)sEnd time :sEnd rpmdb :sUser :sReturn-Code :tAborteds Failures:s, sFailure:tSuccesssCommand Line :s config-mains config-repostsaved_txs-Additional non-default information stored: %dsTransaction performed with:css!|]}tt|ƒƒVqdS(N(RÉRô(R‰R^((s/usr/share/yum-cli/output.pys v siRÂRÃsPackages Altered:sPackages Skipped:css!|]}tt|ƒƒVqdS(N(RÉRô(R‰R^((s/usr/share/yum-cli/output.pys ~ sRÄsRpmdb Problems:s%s%s: css!|]}tt|ƒƒVqdS(N(RÉRô(R‰R^((s/usr/share/yum-cli/output.pys Š siR¿sScriptlet output:s%4dsErrors:i,i,iPFi,iPFi€—iii€Qs ((RR�R RR¹RÉRSROR¤RqR¤RR‘tbeg_rpmdbversionR&R—t end_timestampR‘R¾RÊR›R˜R“RûR�R~treturn_addon_dataRKt differencet trans_withthistoryInfoCmdPkgsAlteredR–R•tproblemRýRcR|tmainR”terrors(R RsR‚R·RR¿RÉtbegtmtendtmtendtmstbegtmstsofarRÜRØtcodesR�t addon_infotdefault_addonst non_defaultRÃtprobRúRtline((RÇRÈR^R s/usr/share/yum-cli/output.pyR¯þsØ&  *          (               Rès True-Installs Dep-InstallRSRTRVRëRìR¼RURcCsed }|j}d}d}xw|jD]l}|j|j|jƒ}|t|ƒkrdt|ƒ}n|tt|ƒƒkr%tt|ƒƒ}q%q%WxÉ|jD]¾}d} |js½d} nd} |rtj j |g|ƒ\} } } | sö| rd} qn|j | ƒ\}}|j }|j|j|jƒ}t ||ƒ}trPnæ|d k r´|jdkr´|j|jkr´|jdkr´t|jƒd }d|||}n‚|d k r|jd kr|j|jkr|jd krt|jƒd }d|||}nd }|jdkr6|}nd | ||||||j|ƒfGHqŸWd S(s/Print information about how packages are altered in a transaction. :param old: the :class:`history.YumHistoryTransaction` to print information about :param pats: a list of patterns. Packages that match a patten in *pats* will be highlighted in the output iRºis ** R1R:RRUiRìR¼s%s%s%s%s %-*s %sNs (sUpdateds Downgrade(R&t_history_state2uistateR’R>R[RÉRôR¾R9R|R´RÃtui_nevraRRSR·R¹(R RsR‚Rot all_uistatesR¿RÃR^tuistateRàR¿RR¼R½RÀRÁtcntln((s/usr/share/yum-cli/output.pyRÒ¨ sR   !    ! ! c Cs8|j|ƒ\}}|d$kr.ddgfSd}|ttdƒddƒttdƒddƒttdƒd d ƒttd ƒd d ƒfGHd d GHd}iid6id6id6id6id6id6id6}x|jj|ƒD]û}|j|jdƒ}d}tjƒ} t r n¨|j | d&kr<d}nŒ|j | d)krXd}np|j | d,krtd}nT|j | d0kr�d}n8|j | d4kr¬d}n|j | d7krÈd}n||j |gƒj |ƒqêWitdƒd6tdƒd6tdƒd6tdƒd6td ƒd6td!ƒd6td"ƒd6} d#} xád8D]Ù}||smqWnxÀt ||ƒD]®}| r›| dkr›Pn| d7} g} x&|||D]}| j|jƒqºW|j| ƒ\} }| |}|t|ddƒt|ddƒt|d d ƒ| fGHq~WqWWd$S(9srPrint a summary of transactions in history. :param extcmds: list of extra command line arguments isFailed history infos%s | %s | %s | %ss Login useritTimeis Action(s)iR‹iRmiOs%s | %s | %s | %8utdaytweekt fortnighttquarterthalftyearR}ii<iii imsLast days Last weeks Last 2 weekss Last 3 monthss Last 6 monthss Last yearsOver a year agoiNi i€Qi i€Qi€: i i€Qiui i€Qi€: i€øwi i€Qi€: iñïi i€Qi€3á(RèRéRêRëRìRísall(R†R&RR R~RsRR�R¤RSR‘R_RÌRËRâR’Ra(R R�RyR„RŸRÐRsR·tperiodR"t _period2userR¾R\RùR¡tuperiod((s/usr/share/yum-cli/output.pythistorySummaryCmdä sp          !         cCsEd}t|ƒdkr:|d}|dkr:d}q:n|dk r‹yt|ƒWq‹tk r‡|jjtdƒƒddgfSXn|dk r²|jjd|gƒ}nK|jj dt ƒg}|ddkrý|jjtdƒƒddgfS|s*|jjtd ƒ|ƒddgfS|d}|jj |j ƒ}t|ƒd kr³td ƒG|j GHtd ƒGHx&|jj |j ƒD]}d |GHqŽWdGHddgfSx‹|d D]}||kr|j jtjd|ƒ|jj |j |ƒG|j jtjdƒntdƒ|GH|j jtjdƒq¾WdS(s|Print addon information about transaction in history. :param extcmds: list of extra command line arguments iRosBad transaction ID givensFailed history addon-infoRyR§is$No transaction ID, or package, givensNo Transaction %s foundisTransaction ID:s)Available additional history information:s %sR<shistory addon-infos%s:s)%s: No additional data found by this nameN(R&RÉR¦RRŽRR R~RsRoRSRÏRqR�RÅR R@(R R�RqRst hist_dataRÜtitemnameRi((s/usr/share/yum-cli/output.pythistoryAddonInfoCmd$ sH             cCsÈ|jj|ƒ}d }|rH| rH|jjtdƒƒddgfS|sWd}n|j}d}|ttdƒddƒttdƒd d ƒttd ƒd d ƒfGHd d GHd}d}x›|jj|d|ƒD]�}|d k r|r|t |j ƒ|krPnd }d} } |j d kr=d} } nX|j rSd} } nB|j rid} } n,|j rd} } n|jr•d} } n|jr§d} n|jr¹d} nx¡|j D]–} |d kr tjj| g|ƒ\} } }| r | r qÃq n|j| j| jƒ}t|d ƒ}| j}trFnæ|d k rª|jdkrª|j| jkrª| jdkrªt | jƒd}d|||}n‚|d k r|jdkr|j| jkr| jdkrt | jƒd}d|||}nd }| jd!kr,| }n|d7}||j||fGd| | fGHqÃWqÜW|jjƒ}|d kr�|jdtƒn5|jjdtƒd}|j|krÄ|jƒnd S("s¶Print a list of information about transactions from history that involve the given package or packages. :param extcmds: list of extra command line arguments s)Bad transaction IDs, or package(s), givenisFailed history packages-listis %s | %s | %sRŠis Action(s)iRãi5RmiOs%6u | %s | %-50siRkRºR RŒR¡R RR8R7RRURìR¼s%s%sRÈR�N(sUpdateds Downgrade( R~R€R&RŽRR RáRRsRÉR’R“R”R•R–R—R˜R9R|R´R>R[RâRSR·RqRoR™RZRšROR›(R R�RyRkRãRŸRRsRoR¢R£R^RR¼R½RäRåRæR¤R¥((s/usr/share/yum-cli/output.pythistoryPackageListCmdU s‚     +               !   ! !  + c Cs°|jj|ƒ}d}|rH| rH|jjtdƒƒddgfS|sWd}n|j}d}xà|jj|d|ƒD]Æ}|dk r´|r´|t|j ƒ|kr´PnxŽ|j D]ƒ}|dkrt j j |g|ƒ\}} } | r| rq¾qn|j |j|jƒ} |r.dGHntdƒG|jGHtj|jƒ} td ƒG| GHtd ƒG|jGHtd ƒG| GH|jdk rÁt|jƒ}td ƒGtjd |tƒGHn|jdk råtdƒG|jGHn|jdk rtjt|jƒƒ} tdƒG| GHn|jdk rBtdƒG|jGHn|jdk rftdƒG|jGHn|jdk rŠtdƒG|jGHn|jdk r®tdƒG|jGHn|jdk rÒtdƒG|jGHn|j dk r tjt|j ƒƒ} tdƒG| GHn|j!dk r/tdƒG|j!GHn|j"j#dk rYtdƒG|j"j#GHn|j"j$dk rƒtdƒG|j"j$GHn|j"j%dk r­tdƒG|j"j%GHn|j"j&dk ròt|j"j&ƒ} |j'| ƒ}tdƒG|GHn|j"j(dk r7t|j"j(ƒ} |j'| ƒ}tdƒG|GHn|d7}q¾WqW|jj)ƒ}|dkrw|j*dt+ƒn5|j,j-dtƒd}|j.|kr¬|j*ƒndS(s€Print information about packages in history transactions. :param extcmds: list of extra command line arguments s)Bad transaction IDs, or package(s), givenisFailed history packages-infoiiRkR<sTransaction ID :sBegin time :sPackage :sState :sSize :s%dsBuild host :sBuild time :sPackager :sVendor :sLicense :sURL :sSource RPM :sCommit Time :sCommitter :sReason :sCommand Line :sFrom repo :sInstalled by :sChanged by :RÈR�N(/R~R€R&RŽRR RáRsRÉR’R9R|R´R>R[RqR¤RR‘RâRR¦tlocaleR­ROt buildhostRtpackagertvendorR R¬t sourcerpmRRRtreasont command_lineR R RR RoR™RSRZRšR›(R R�RyRkRãRRsR^RR¼R½RäR R"R·R¤R¥((s/usr/share/yum-cli/output.pythistoryPackageInfoCmd° sŠ    + ! ! ccsPxI|D]A}tdƒ}dt|ƒd}||jdd|ƒfVqWdS(Ns Error: %sRºis (R RR½(trestringRäRàt prefix2nd((s/usr/share/yum-cli/output.pytpretty_output_restring s  N(CR#R$R%RnR©R±R¯R&R¸RÃRÄt staticmethodRÈRÛRÝRßRRèRSRóRöRýRRR#R3RGR RWRYRfRjRsRŒR•RœRR®RÂRÃRÏRÐRR%R7R8R>R*RRRaRRwR|R†R¦RªR«R¶R¹R¯RáRÒRñRôRõRýR(((s/usr/share/yum-cli/output.pyR†´s˜       m 1     .&G)  2 I 9 0 P 4  Á F (   !   !%  a $  d  ž          < @ 1 [ UR2cBs˜eZdZdd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„ZRS(sQA class to provide text output callback functions for Dependency Solver callback.cCs(tjdƒ|_d|_||_dS(s8requires yum-cli log and errorlog functions as argumentssyum.verbose.cliiN(RŒR�R�tloopstayum(R R((s/usr/share/yum-cli/output.pyRn s c Cs¿itdƒd6tdƒd6tdƒd6tdƒd6td ƒd 6td ƒd 6td ƒd6tdƒd6}|\}}}}}||} |jjtjtdƒ|||||| ƒdS(sÝ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 RRÜs an updateR½terasedR»RóRÑs a downgradeRÕt obsoletingR»RñtudR"tods&---> Package %s.%s %s:%s-%s will be %sN(R R�RÅR R@( R R=RgtmodedictRIRÕR»R‹RÑtmodeterm((s/usr/share/yum-cli/output.pytpkgAdded s       cCs|jd7_dS(sRPerform setup at the beginning of the dependency solving process. iN(R(R ((s/usr/share/yum-cli/output.pytstart8 scCs |jjtjtdƒƒdS(s?Output a message stating that a transaction check is beginning.s--> Running transaction checkN(R�RÅR R@R (R ((s/usr/share/yum-cli/output.pyttscheck> scCsE|jd7_|jjtjtdƒƒ|jjd|jƒdS(sBOutput a message stating that dependency resolution is restarting.is6--> Restarting Dependency Resolution with new changes.s---> Loop Number: %dN(RR�RÅR R@R tdebug(R ((s/usr/share/yum-cli/output.pyt restartLoopB s cCs |jjtjtdƒƒdS(sAOutput a message stating that dependency resolution has finished.s"--> Finished Dependency ResolutionN(R�RÅR R@R (R ((s/usr/share/yum-cli/output.pyRuI scCs&|jjtjtdƒ||ƒdS(scOutput a message stating that the package *formatted_req* is being processed as a dependency for the package *name*. :param name: the name of the package that *formatted_req* is a dependency of :param formatted_req: a string representing the package that is being processed as a dependency of *name* s---> Processing Dependency: %s for package: %sN(R�RÅR R@R (R R·t formatted_req((s/usr/share/yum-cli/output.pytprocReqO s  cCs&|jjtjtdƒ||ƒdS(sXOutput a message stating that the package *formatted_req* is being processed as a dependency for the package *po*. :param po: the package object that *formatted_req* is a dependency of :param formatted_req: a string representing the package that is being processed as a dependency of *po* s---> Processing Dependency: %s for package: %sN(R�RÅR R@R (R R›R((s/usr/share/yum-cli/output.pyt procReqPo\ s  cCs&|jjtjtdƒ||ƒdS(stOutput a message stating that the given package will not be removed. This method is used during leaf-only group remove, leaf-only repo-pkg remove and normal remove commands to indicate that the package will be kept. :param po: the :class:`yum.packages.PackageObject` that will not be removed :param hits: unused s"---> Keeping package: %s due to %sN(R�RÅR R@R (R R›tdeppothits((s/usr/share/yum-cli/output.pyt removeReqi s cCs#|jjtjtdƒ|ƒdS(s¨Output a message stating that there is an unresolved dependency. :param msg: string giving information about the unresolved dependency s--> Unresolved Dependency: %sN(R�RÅR R@R (R Rä((s/usr/share/yum-cli/output.pyt unresolvedv sc sË|\‰}}|j‰d||jf}tdƒ|f}tˆ||ƒ}|tdƒ|f7}ˆsq|Sd„‰‡‡‡‡‡fd†}‡‡‡‡‡fd†} d‰tƒ‰x/tˆjjˆƒƒD]} || |ƒ}qØWtƒ} xQtˆj jˆƒƒD]7} | | |ƒ\} ‰}| r| j | j ƒqqWd‰x/tˆjj | ƒƒD]} || |ƒ}qmWd‰x8tˆj j | ƒƒD]} | | |ƒ\} ‰}q¥W|S(s>Return an error message stating that a package required to fulfill a dependency is missing. :param reqPo: the package object that has a dependency that cannot be fulfilled :param reqTup: the name, flags, and version of the package needed to fulfil the dependency s%s (%s)s Package: %ss Requires: %sc Ss&tdƒ|||jf}|dd f}t}x@|jd|ƒD],}t}|tdƒtjj|ƒ7}qDW|s |j ddƒ}||kr xk|j D]]}|d}|j ddƒ}||kr¢t}tjj|ƒ}|tdƒ|7}q¢q¢Wq n|s"|tdƒ7}n|S( s? Add a package to the message, including any provides matches. s %s: %s (%s)R¸s %st 0123456789is ~%ss Not foundN(NNN( R RëR&RSt matchingPrcosROR9R:Rt translateR¸( RRítneednameRätneedtupR¾R=t nneednameR·((s/usr/share/yum-cli/output.pyt_msg_pkg— s&$   !c s^|j|j|j|jf}|ˆksK|jˆƒrO|jˆjkrO|Sˆj|ƒtdƒ}ˆjj |j t ƒ}|r•tdƒ}n|ˆ||ˆƒ7}itdƒd6tdƒd6tdƒd6}x|D]w}xn|j D]c\}}||kr qïn|j|j|j|jf}ˆj|ƒ|ˆ|||ˆƒ7}qïWqßW|S( NRRàs Updated Byt updatedbys Downgraded Byt downgradedbys Obsoleted Byt obsoletedby( R·R RRR?RêRzR RîtgetMembersWithStateR=tTS_REMOVE_STATESt relatedto( RíRätnevrRtrmedtrelmapRÿtrpkgtrtype(RRoRt seen_pkgstyb(s/usr/share/yum-cli/output.pyt _run_inst_pkg¯ s(-      "cs»|j|j|j|jf}|ˆksK|jˆƒrX|jˆjkrXtˆ|fSˆj|ƒtdƒ}ˆj j |j t ƒr˜tdƒ}n|ˆ||ˆƒ7}t ||fS(Nt AvailableRÞ(R·R RRR?RêRSRzR RîR R=tTS_INSTALL_STATESRO(RíRäR#R(RRoRR(R)(s/usr/share/yum-cli/output.pyt_run_avail_pkgÈ s-   N( RRëR R R&RKRËRZt getProvidesR\RzR·R[( R treqPotreqTupt needflagst needversiontprob_pkgRätui_reqR*R-Rítavailable_namesttst((RRoRR(R)s/usr/share/yum-cli/output.pytformat_missing_requires€ s6      cCs&|jjtjtdƒ||ƒdS(s Print a message stating that two packages in the transaction conflict. :param name: the name of the first package involved in the conflict :param confname: the name of the second package involved in the conflict s(--> Processing Conflict: %s conflicts %sN(R�RÅR R@R (R R·tconfname((s/usr/share/yum-cli/output.pyt procConflictè s  cCs&|jjtjtdƒ||ƒdS(sPrint a message stating that two packages in the transaction conflict. :param name: the first package object involved in the conflict :param confname: the second package object involved in the conflict s(--> Processing Conflict: %s conflicts %sN(R�RÅR R@R (R R›R8((s/usr/share/yum-cli/output.pytprocConflictPoõ s  cCs |jjtjtdƒƒdS(sEOutput a message stating that the transaction set is being populated.sC--> Populating transaction set with selected packages. Please wait.N(R�RÅR R@R (R ((s/usr/share/yum-cli/output.pyttransactionPopulation scCs#|jjtjtdƒ|ƒdS(s’Output a message stating that the header for the given package is being downloaded. :param name: the name of the package s<---> Downloading header for %s to pack into transaction set.N(R�RÅR R@R (R R·((s/usr/share/yum-cli/output.pytdownloadHeader sN(R#R$R%R&RnR R R RRuRRRRR7R9R:R;R<(((s/usr/share/yum-cli/output.pyR2 s   "     h R)cBs>eZdZd„Zd„Zd„Zd„Zdd„ZRS(sFA class to handle text output callbacks during metadata cache updates.cCs:tjdƒ|_tjdƒ|_tjdƒ|_dS(Nsyum.clisyum.verbose.clisyum.filelogging.cli(RŒR�RŽR�t file_logger(R ((s/usr/share/yum-cli/output.pyRn scCs|jj||ƒdS(s{Output a log message. :param level: the logging level for the message :param message: the message N(R�RÅ(R tleveltmessage((s/usr/share/yum-cli/output.pyRÅ scCs|jj||ƒdS(s�Output an errorlog message. :param level: the logging level for the message :param message: the message N(RŽRÅ(R R>R?((s/usr/share/yum-cli/output.pyterrorlog" scCs|jj||ƒdS(s€Output a file log message. :param level: the logging level for the message :param message: the message N(R=RÅ(R R>R?((s/usr/share/yum-cli/output.pytfilelog* scCs…d}t}||}|dkr+t}n=|dkr@t}n(||krUt}n||sht}n|r�t|||ƒndS(sGOutput the current status to the terminal using a progress status bar. :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 iÈiN(RSROR´(R RµR¶R·t num_outputsR”topc((s/usr/share/yum-cli/output.pyR´2 s         N( R#R$R%RnRÅR@RAR&R´(((s/usr/share/yum-cli/output.pyR) s     c se|dkr|S|dkr%d}ng‰‡fd†}x?|jjd |ƒD](}|j|krkqPn||jƒqPWˆs†|Sˆjd ƒ}ˆs¥t|ƒSt}t}xAˆD]9}|j|ƒsÖt }n|j |j kr¸t }q¸q¸W|rG|j d kr$d |j |j |jfSd |j |j |j |jfSn|rad|j |j fS|S(s» Get more information on a simple pkgname, if we can. We need to search packages that we are dealing with atm. and installed packages (if the transaction isn't complete). RÕR»RÜRÑR½RRcsDˆr3ˆdj|jkr3ˆdj|ƒr3dSˆj|ƒdS(Ni(RêR?RÌ(R›(tmatches(s/usr/share/yum-cli/output.pyt _cond_add[ s/R·iRs%s-%s-%ss %s:%s-%s-%ss%s.%sN(RÕR»RÜRÑR½sodsud(R&Rît matchNaevrtts_stateR›RÏRôROR?RSRêR R·RR( Rtpkgnamet ts_statesRERÿtfmatchtshow_vert show_archRs((RDs/usr/share/yum-cli/output.pyt _pkgname_uiN s<       tYumCliRPMCallBackcBsteZdZed„ƒZdd„Zdd„Zd„Zd„Z d „Z d „Z e dd d „Z d „ZRS(s1A Yum specific callback class for RPM operations.cCstƒS(N(R(R((s/usr/share/yum-cli/output.pyR+‚ scCsbtj|ƒtdƒ|_d|_tjdƒjt j ƒ|_ d|_ d|_ ||_dS(NR<syum.verbose.cliRŒi(RRnRtlastmsgR&t lastpackageRŒR�RR R@R”tmarktmarksR(R R((s/usr/share/yum-cli/output.pyRn„ s    R»RRcCst|j||ƒS(sñReturn more information on a simple pkgname, if possible. :param pkgname: the name of the package to find information about :param ts_states: a tuple containing the states where the package might be found (RMR(R RHRI((s/usr/share/yum-cli/output.pyt pkgname_ui‘ sc Csž|j|}|jƒ}t|ƒtjkr=t|ƒ} n|j|ƒ} ||_|dkrjd} n|d|} |j||||| || |ƒdS(sè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.RPMBaseCallback.action.keys()` :param te_current: a number representing the amount of work already done in the current transaction :param te_total: a number representing the total amount of work to be done in the current transaction :param ts_current: the number of the current transaction in transaction set :param ts_total: the total number of transactions in the transaction set ildN( Rt_max_action_widthR¤ttypest StringTypesRôRSRPt _out_event( R tpackageRt te_currenttte_totalt ts_currenttts_totaltprocesstwid1RHtpercent((s/usr/share/yum-cli/output.pyteventš s     cCsit|dƒs\d}x8|jjƒD]'}t|ƒ}||kr%|}q%q%W||_n|j}|S(Nt_max_action_wid_cachei(RRR¹RRa(R R^Ritwid_val((s/usr/share/yum-cli/output.pyRT¼ s     c CsÞ|jrÚtjjƒs$||krÚ|j|||dtjjƒd|d|ƒ\} }} | t|||ƒt|| | ƒf} | |jkrÃtjjt| ƒƒtjj ƒ| |_n||krÚdGHqÚndS(NRRHR^Rº( R”RVRWRXt_makefmtRROtwriteRtflush( R RYRZR[R\R_R]RHR^RŸtwid2Rä((s/usr/share/yum-cli/output.pyRWÇ s$   cCs0|r,tjjt|ƒƒtjjƒndS(s“Print messages originating from a package script. :param package: unused :param msgs: the messages coming from the script N(RVRWRdRRe(R RXR((s/usr/share/yum-cli/output.pyt scriptoutÖ sicCsétt|ƒƒ}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‘||jt||d ƒf}d |d| }| }nK|d kr°d| }|}n,||j|f}d|d| }| }|||fS(Ns%s.%st%ss/%Riiis[%-ss]ids %s: %s gY@s %s: %s Rºs %s: %s s %s: %s (RÉRôR&RRÜRQR¦(R R_R[R\RRHR^tlRtfmt_doneR¾tpnltoverheadRÜRRtfmt_bartfull_pnlRŸRftbar((s/usr/share/yum-cli/output.pyRcà sH             "    c Csw|}t|jƒ}d}tdƒ}t|jƒ}tt|ƒ|jƒƒ} |jdd|||||| ƒdS(sC Callback for post transaction when we are in verifyTransaction(). idt VerifyingN( RÉRîR RôR›RRRTRW( R tbaseRÿRùRYRZR_R]RHR^((s/usr/share/yum-cli/output.pyt verify_txmbr s N(R»sodsudN(R#R$R%R…RÜR&RnRSR`RTRWRgRORcRr(((s/usr/share/yum-cli/output.pyRN s "  /c Csd}tjjƒsdS|dkr.d}n%|dkrMt|ƒ|}nd}tƒ}|dkr}||kr}d}nd||f}|t|ƒd8}|dkr¶d}n|dkr |d8}|dkrád}n|t||ƒ}d|||f}nµ||kr6d t|||ƒ|f}nŠ|d 8}|dkrUd}n|d} | t |ƒkr€t |ƒ} n|| 8}|t||ƒ}d t|| | ƒ|||f}||krßtjj |ƒn||krþtjj d ƒntjj ƒdS( sIOutput 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 RŒNiRms %d/%diis [%-*s]%ss %s%sis %s: [%-*s]%ss ( RVRWRXRRR&RÉR¦RRRdRe( RµR¶R·RQR_RÜRuthashbarR”tnwid((s/usr/share/yum-cli/output.pyR´ sL                     t__main__iRR<s5 Doing format_number tests, right column should aligniggš™™™™™¹?gð?gš™™™™™ñ?i i g333333&@idgfffffÆ[@ièiWii'ig+iŸ†i?Biii#s%36s <%s> %s <%5s>RºiRs Doing progress, small nameietabcds Doing progress, big names_%s_s 123456789 is Doing progress, no names rpm-progresstfoos_12345678_.endRos! 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(GR%RVR¤RŒRURRfR�RoR3Rturlgrabber.progressRRRturlgrabber.grabberRtyum.miscRtyum.i18nRRRR9trpmUtils.miscutilsRR t yum.constantsR R R t yum.rpmtransRtyum.packageSackRt yum.packagest yum.historyRRRRöRRTRRRR'R*R†R2R)R&RMRNR´R#RÉtargvRRÜRRRÎtsleeptcbROR”RR`R:t setup_locale(((s/usr/share/yum-cli/output.pyts                 ÿUÿÿÿÿÿÿÿÿÿbÿ< 1Ÿ > ( $*( .    (% .%   (