/usr/lib/python3.9/site-packages/dnf/cli/commands/__pycache__
NameSizeModeActions
alias.cpython-39.opt-1.pyc54060644editdlrm
alias.cpython-39.pyc54060644editdlrm
autoremove.cpython-39.opt-1.pyc19720644editdlrm
autoremove.cpython-39.pyc19720644editdlrm
check.cpython-39.opt-1.pyc37610644editdlrm
check.cpython-39.pyc37610644editdlrm
clean.cpython-39.opt-1.pyc42890644editdlrm
clean.cpython-39.pyc42890644editdlrm
deplist.cpython-39.opt-1.pyc9310644editdlrm
deplist.cpython-39.pyc9310644editdlrm
distrosync.cpython-39.opt-1.pyc14770644editdlrm
distrosync.cpython-39.pyc14770644editdlrm
downgrade.cpython-39.opt-1.pyc18580644editdlrm
downgrade.cpython-39.pyc18580644editdlrm
group.cpython-39.opt-1.pyc103010644editdlrm
group.cpython-39.pyc103770644editdlrm
history.cpython-39.opt-1.pyc114690644editdlrm
history.cpython-39.pyc114690644editdlrm
install.cpython-39.opt-1.pyc61490644editdlrm
install.cpython-39.pyc61490644editdlrm
makecache.cpython-39.opt-1.pyc13080644editdlrm
makecache.cpython-39.pyc13080644editdlrm
mark.cpython-39.opt-1.pyc29600644editdlrm
mark.cpython-39.pyc29600644editdlrm
module.cpython-39.opt-1.pyc144670644editdlrm
module.cpython-39.pyc144670644editdlrm
reinstall.cpython-39.opt-1.pyc30100644editdlrm
reinstall.cpython-39.pyc30690644editdlrm
remove.cpython-39.opt-1.pyc39510644editdlrm
remove.cpython-39.pyc39510644editdlrm
repolist.cpython-39.opt-1.pyc75030644editdlrm
repolist.cpython-39.pyc75030644editdlrm
repoquery.cpython-39.opt-1.pyc223730644editdlrm
repoquery.cpython-39.pyc223730644editdlrm
search.cpython-39.opt-1.pyc44570644editdlrm
search.cpython-39.pyc44570644editdlrm
shell.cpython-39.opt-1.pyc79360644editdlrm
shell.cpython-39.pyc79360644editdlrm
swap.cpython-39.opt-1.pyc19470644editdlrm
swap.cpython-39.pyc19470644editdlrm
updateinfo.cpython-39.opt-1.pyc140140644editdlrm
updateinfo.cpython-39.pyc140140644editdlrm
upgrade.cpython-39.opt-1.pyc37080644editdlrm
upgrade.cpython-39.pyc37080644editdlrm
upgrademinimal.cpython-39.opt-1.pyc11370644editdlrm
upgrademinimal.cpython-39.pyc11370644editdlrm
__init__.cpython-39.opt-1.pyc247470644editdlrm
__init__.cpython-39.pyc249280644editdlrm
Edit: /usr/lib/python3.9/site-packages/dnf/cli/commands/__pycache__/updateinfo.cpython-39.pyc (14014B)
a ©!c:Jã@s’dZddlmZddlmZddlmZddlZddlZddlZddlm Z ddl m Z ddl m Z mZdd lmZd d „ZGd d „d e jƒZdS)zUpdateInfo CLI command.é)Úabsolute_import)Úprint_function)Úunicode_literalsN)Úcommands)Ú OptionParser)Ú_Ú exact_width©ÚunicodecCstdd„|DƒƒS)z7Return maximum length of items in a non-empty iterable.css|]}t|ƒVqdS©N)r)Ú.0Úitem©rú?/usr/lib/python3.9/site-packages/dnf/cli/commands/updateinfo.pyÚ &óz_maxlen..)Úmax)ÚiterablerrrÚ_maxlen$src s0eZdZdZejedƒejedƒejedƒej edƒej edƒiZ edƒedƒed ƒed ƒd œZ d d d d d d ddœZ ddgee  ¡ƒZedƒZdZdddegZ‡fdd„Zedd„ƒZdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Z d/d0„Z!d1d2„Z"d3d4„Z#d5d6„Z$‡Z%S)7ÚUpdateInfoCommandz)Implementation of the UpdateInfo command.ÚbugfixÚ enhancementÚsecurityÚunknownÚ newpackagez Critical/Sec.zImportant/Sec.z Moderate/Sec.zLow/Sec.)ÚCriticalÚ ImportantÚModerateÚLowÚlistÚinfoÚsummary)zlist-updateinfoz list-securityzlist-seczinfo-updateinfoz info-securityzinfo-seczsummary-updateinfoZ updateinfoZupifz!display advisories about packagesÚ availableÚ installedÚupdatesÚallcstt|ƒ |¡d|_dS)zInitialize the command.N)ÚsuperrÚ__init__Ú_installed_query)ÚselfÚcli©Ú __class__rrr'CszUpdateInfoCommand.__init__c Cs| ¡}|jddddtdƒd�|jddddtd ƒd�|jd dd dtd ƒd�|jd dddtdƒd�gd¢}| ¡}|jddddtdƒd�|jddddtdƒd�|jddddtdƒd�|jddddtdƒd �|jd!d"ddtd#ƒd �|jd$d%d&||d'tjtd(ƒd)�dS)*Nz --availableÚ _availabilityr"Ú store_constz?advisories about newer versions of installed packages (default))ÚdestÚconstÚactionÚhelpz --installedr#z?advisories about equal and older versions of installed packagesz --updatesr$zbadvisories about newer versions of those installed packages for which a newer version is availablez--allr%z3advisories about any versions of installed packages)r!rr z --summaryÚ _spec_actionr!z$show summary of advisories (default)z--listrzshow list of advisoriesz--infor zshow info of advisoriesz --with-cveÚwith_cveFÚ store_truez'show only advisories with CVE reference)r/Údefaultr1r2z --with-bzÚwith_bzz,show only advisories with bugzilla referenceÚspecÚ*ZSPECrzPackage specification)ÚnargsÚmetavarÚchoicesr6r1r2)Úadd_mutually_exclusive_groupÚ add_argumentrrZPkgNarrowCallback)ÚparserÚ availabilityZcmdsZ output_formatrrrÚ set_argparserHsXþþþþ þ þ þ þ þ ýzUpdateInfoCommand.set_argparsercCsäd|jj_d|jj_|jj|jvr6|j|jj|j_n|jjrJ|jj|j_|jj r`|jj |j_ n8|jj rz|jj d|j vr†|j |j_ n|jj  d¡|j_ tƒ|j_|jjrº|jj tj¡|jjrÒ|jj tj¡|jjrê|jj tj¡|jj�r|jj tj¡|jj �rÄ|jj  d¡}|dk�r8|jj tj¡nŒ|dk�rT|jj tj¡np|dv�rp|jj tj¡nT|dk�rŒ|jj tj¡n8|dv�r d|j_n$|dk�r´d|j_n|jj  d|¡|jj�rà|jj  |jj¡d S) zADo any command-specific configuration based on command arguments.Trrr)rZsecr)Z bugzillasZbzsÚcvesN) r*ZdemandsZavailable_reposZsack_activationÚoptsZcommandÚdirect_commandsÚ spec_actionr3r-r@r8ÚavailabilitiesÚavailability_defaultÚpopÚsetÚ_advisory_typesrÚaddÚhawkeyÚADVISORY_BUGFIXrÚADVISORY_ENHANCEMENTrÚADVISORY_NEWPACKAGErÚADVISORY_SECURITYr7r4ÚinsertÚadvisoryÚextend)r)r8rrrÚ configurensJ                zUpdateInfoCommand.configurecCsÂ|jjdkr$| |jj¡}tdƒ}n^|jjdkrH| |jj¡}tdƒ}n:|jjdkrl| |jj¡}tdƒ}n| |jj¡}tdƒ}|jjdkrš|  |¡n$|jjdkr²|  |¡n |  ||¡dS)z#Execute the command with arguments.r#r$r%r"rr N) rCr@Úinstalled_apkg_adv_instsr8rÚupdating_apkg_adv_instsÚall_apkg_adv_instsÚavailable_apkg_adv_instsrEÚ display_listÚ display_infoÚdisplay_summary)r)Úapkg_adv_instsÚ descriptionrrrÚrun¤s           zUpdateInfoCommand.runcCs@|jdur |jj ¡ ¡ ¡|_|jj|j|jd�}t |ƒdkS)N)ÚnameZevr__gter) r(ÚbaseÚsackÚqueryr#ZapplyÚfilterr_ÚevrÚlen)r)ÚapackageÚqrrrÚ_newer_equal_installedºs z(UpdateInfoCommand._newer_equal_installedcs|jjs<|jjs<|jjs<|jjs<|jjs<|jjs<|jjs.csg|]}ˆ |¡‘qSr)Z match_bug)r ZbugrnrrÚ Ïrz7UpdateInfoCommand._advisory_matcher..csg|]}ˆ |¡‘qSr)Z match_cve)r ZcvernrrroÑrcSsg|]}|jtjk‘qSr)ÚtyperLÚ REFERENCE_CVE©r ÚrefrrrroÔrcSsg|]}|jtjk‘qSr)rprLÚREFERENCE_BUGZILLArrrrrro×rF) rCrJr8ÚseverityZbugzillarBr4r7rpÚanyÚ references)r)rRrrnrÚ_advisory_matcherÀs>ÿþýüûú"" z#UpdateInfoCommand._advisory_matcherc#sd| |¡D]T‰ˆ |jj¡}| |¡}t‡fdd„|jjDƒƒ}|sH|r | ˆ¡}ˆ||fVq dS)z4Return (adv. package, advisory, installed) triplets.c3s|]}t ˆj|¡VqdSr )rirjr_rl©rfrrràsÿzAUpdateInfoCommand._apackage_advisory_installed..N) Zget_advisory_pkgsZ get_advisoryr`rarxrvrCr8rh)r)Z pkgs_queryZcmptypeÚspecsrRZadvisory_matchZapackage_matchr#rryrÚ_apackage_advisory_installedÛs  ÿ z.UpdateInfoCommand._apackage_advisory_installedcCs@|jj}| ¡jdd�}| ¡}|r<| | ¡j|jd�¡}|S)z.z %*s %sé)rŒÚprintrrLrOrPrMrNÚADVISORY_UNKNOWNrr r`ÚconfZautocheck_running_kernelr*Z_check_running_kernel) r)r\r]Ztyp2cntZ label_countsÚwidthÚindentÚlabelÚcountrrrr[s>  ÿ ÿ ÿ ÿ ÿñ" z!UpdateInfoCommand.display_summaryc sćfdd„}‡fdd„}tƒ}|D]²\}}}d|j|j|jf}ˆjjsPˆjjr°|jD]V} | jt j krrˆjjsrqVn| jt j krˆˆjjsˆqV|j|j f|  |||jftƒ¡| j<qVq"|j|j f|  |||jftƒ¡|j<q"g} d} } } t| ¡dd„d �D]l\\}}}}t| t|ƒƒ} | ¡D]F\}}t| t|ƒƒ} ||Ž}t| t|ƒƒ} |  ||ƒ||||f¡�qqú| D]R\}}}}}ˆjjj�r¤td || || || ||fƒntd || || ||fƒ�qld S) zDisplay the list of advisories.cs ˆjjdksdS|rdSdSdS)Nr%Úzi ú )rCr@)Úinst©r)rrÚ inst2mark2s  z1UpdateInfoCommand.display_list..inst2markcs2|tjkrˆj |tdƒ¡Sˆj |tdƒ¡SdS)Nz Unknown/Sec.r)rLrPÚSECURITY2LABELÚgetrÚ TYPE2LABEL)ÚtypZsevršrrÚ type2label:s z2UpdateInfoCommand.display_list..type2labelz%s-%s.%srcSs|dS)Nrr©ÚxrrrÚRrz0UpdateInfoCommand.display_list..©Úkeyz%s%-*s %-*s %-*s %sz%s%-*s %-*s %sN)Údictr_rdÚarchrCr4r7rwrprLrtrqruÚ setdefaultÚupdatedrkÚsortedÚitemsrreÚappendr`r’Úverboser�)r)r\r›r Znevra_inst_dictr‹rRr#ZnevrarsZadvlistZidwZtlwZnwr™ZaupdatedrŠZaidZatypesevr•rršrrY0s8   ÿ ÿ " zUpdateInfoCommand.display_listc s¬ˆjj ¡‰ˆjjj‰tdƒtdƒtdƒtdƒtdƒtdƒtdƒtdƒtd ƒtd ƒf ‰‡‡‡‡fd d „}tƒ}|D]\}}}| |||ƒ¡qrtd   t |dd„d�¡ƒdS)z/Display the details about available advisories.z Update IDÚTypeZUpdatedZBugsZCVEsZ DescriptionZSeverityZRightsZFilesZ Installedc s¼|jgˆj |jtdƒ¡gt|jƒggg|jp0d ¡|j g|j pBd ¡t t ‡fdd„|j Dƒƒƒdg }|jD]L}|jtjkrœ|d d |j|jp”d¡¡ql|jtjkrl|d |j¡ql|d ¡|d ¡ˆsæd|d<d|d <ˆjjd k�r|�rtd ƒntd ƒg|d <tˆƒ}g}| d¡| d|j¡| d¡tˆ|ƒD]f\}}|ddgfv�rf�qJt|ƒD]>\}} |dk�r„|nd} |t| ƒ} | d| d| | f¡�qn�qJd |¡S)Nrr—c3s|]}|jˆvr|jVqdSr )r§Úfilename)r Úpkg)Úarchesrrrss ÿzHUpdateInfoCommand.display_info..advisory2info..éz{} - {}r�éér%ÚtrueZfalseé zO===============================================================================r˜rz %*s%s: %sÚ )rkržr�rprr r©r]Ú splitlinesruZrightsrªrIZpackagesrwrLrtr¬ÚformatÚtitlerqÚsortrCr@rÚzipÚ enumeraterÚjoin) rRr#Z attributesrsr“Úlinesr•Z atr_linesÚiÚliner¥Z key_padding©r±Úlabelsr)r­rrÚ advisory2infoisH   õ         z5UpdateInfoCommand.display_info..advisory2infoz cSs| ¡Sr )Úlowerr¡rrrr£•rz0UpdateInfoCommand.display_info..r¤N) r`raZ list_archesr’r­rrIrKr�r¾rª)r)r\rÄZ advisoriesr‹rRr#rrÂrrZas   þ(zUpdateInfoCommand.display_info)&Ú__name__Ú __module__Ú __qualname__Ú__doc__rLrMrrNrPr‘rOržrœrDrÚkeysÚaliasesr!rGrFr'Ú staticmethodrArTr^rhrxr{r€rXrUrVrWrŒr[rYrZÚ __classcell__rrr+rr)sR     üýú   %6   1r)rÉZ __future__rrrr‡rirLZdnf.clirZdnf.cli.option_parserrZdnf.i18nrrZ dnf.pycompr rZCommandrrrrrÚs