v_c@sdZddlZddlZddlZddlZddlZddlZddlZddlm Z m Z m Z ddl Z ddl Z ddlZddlmZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZmZddlmZddlZddlZddl m!Z!m"Z"m#Z#dd l$m%Z%d Z&d ej'j(fd YZ)d ej*ej+fdYZ,de fdYZ-dZ.dS(s/ Command line interface yum class and related. iN(t OptionParsert OptionGroupt SUPPRESS_HELP(tproxy(tisMultiLibArch(t_tP_(tRPMTransaction(t to_unicodetto_utf8t exception2msg(t parsePackagescCstjdIJtjddS(sSIGQUIT handler for the yum cli. This function will print an error message and exit the program. :param signum: unused :param frame: unused s&Quit signal sent - exiting immediatelyiN(tsyststderrtexit(tsignumtframe((s/usr/share/yum-cli/cli.pytsigquit:s tCliErrorcBseZdZddZRS(s)Command line interface related Exception.tcCs tjjj|||_dS(N(tyumtErrorst YumBaseErrort__init__targs(tselfR((s/usr/share/yum-cli/cli.pyRGs(t__name__t __module__t__doc__R(((s/usr/share/yum-cli/cli.pyRDst YumBaseClicBseZdZdZdZd.ddZdZdZdZ dZ e d Z d Z d Zd Zd ZdZdZdZdZe edZdZdd.dZdedZdZeddZdZdZddZed.dZdZ d Z!d!Z"d"Z#d#Z$d$Z%ed%Z&d&Z'd'Z(ed(Z)d)Z*d*Z+d+Z,d,Z-ed-Z.RS(/s#This is the base class for yum cli.cCstjtjttjj|tjj|tj tj d|_ tj d|_ i|_ t|_|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj|jtj |jtj!|jtj"|jtj#|jtj$|jtj%|jtj&|jtj'|jtj(|jtj)|jtj*|jtj+|jtj,|jtj-|jtj.|jtj/|jtj0dS(Nsyum.clisyum.verbose.cli(1tsignaltSIGQUITRRtYumBaseRtoutputt YumOutputtloggingt basicConfigt getLoggertloggertverbose_loggertyum_cli_commandstTruetuse_txmbr_in_callbacktregisterCommandt yumcommandstInstallCommandt UpdateCommandt InfoCommandt ListCommandt EraseCommandt GroupsCommandtMakeCacheCommandt CleanCommandtProvidesCommandtCheckUpdateCommandt SearchCommandtUpgradeCommandtLocalInstallCommandtResolveDepCommandt ShellCommandtDepListCommandtRepoListCommandt HelpCommandtReInstallCommandtDowngradeCommandtVersionCommandtHistoryCommandtCheckRpmdbCommandtDistroSyncCommandtLoadTransactionCommandt SwapCommandtRepoPkgsCommandtUpdateinfoCommandtUpdateMinimalCommandtFSSnapshotCommandt FSCommand(R((s/usr/share/yum-cli/cli.pyRNsN   cCsVxO|jD]A}||jkrAtjjtd|n||j|ss %-14s %s is%s ( RtmisctuniqueR(tvaluesthasattrR[tsortt getSummaryRLtAttributeErrortNotImplementedError(RtusageR]tcommandsRNtsummary((s/usr/share/yum-cli/cli.pyt _makeUsages'  " c Csi}tjj}g|_g}g}x9|D]1}|jd}t|dkrk|j|q1nt|dkr|j|q1ng|D]}|j^q\} } | jd} | dkrB| | } | | d} | |krtjj|| |j?f}n"d|j=|j|j>|j?f}d|j@jAd|jB|j@jAdf}t+d||| |jCfGHt+dt/|jD| |jEfGHt+dt/|jF||jGfGHqWt,j-dn|jHd k rtJjK|jHd}nd}||_0d|_Lx$|j0D]}|jLd|7_LqWy|jMWntNk rKt,j-d nXtOjP|d S(!sParse command line arguments, and set up :attr:`self.conf` and :attr:`self.cmds`, as well as logger objects in base instance. :param args: a list of command line arguments tbaseRgiis'Setopt argument has multiple values: %ss Setopt argument has no value: %ss1Main config did not have a %s attr. before setoptsConfig error: %sis%s: %ssOptions error: %sRsGIgnored option -q, -v, -d or -e (probably due to merging: -yq != -y -q)t/s8Ignored option -c (probably due to merging -yc != -y -c)cSstjdtj|S(Ns%Y-%m-%d %H:%M(ttimetstrftimetgmtime(R]((s/usr/share/yum-cli/cli.pyt sm_ui_time?scSstjdtj|S(Ns%Y-%m-%d(RRR(R]((s/usr/share/yum-cli/cli.pyt sm_ui_dateAstpatternsRt0s%s-%s.%ss %s:%s-%s.%ss%s%s%stboldtnormals Installed: %s-%s at %ss Built : %s at %ss Committed: %s at %si<syum s%s N(QtYumOptionParserRjt optparsert firstParsetversionRt __version__R)tquiettFalsetverboseRRwRuRnRttgetattrtgetRoott debuglevelt errorleveltpreconftconffiletfntroott nopluginst init_pluginstpluginst TYPE_COREtTYPE_INTERACTIVEt plugin_typest _splitArgtdisablepluginstdisabled_pluginst enablepluginstenabled_pluginst releasevertconfR&twarningRbRRMtcriticalRR RtIOErrorRRtreprtfilenamet ValueErrort set_usagetruntsetupYumConfigtcmdstcachetrun_with_package_namestsortedtrpmdbtreturnPackagestepochtreleasetarchttermtMODEROt installtimetpackagert buildtimet committert committimet sleeptimeRStrandomt randranget cmdstringt parseCommandsRRtsleep(RRtoptsRzR{toptRtpcR|tmsgtet yum_progstdoneRRtpkgtverRORtarg((s/usr/share/yum-cli/cli.pytgetOptionsConfigs    #               *&      $     "    cCs|jjdtj|jjtjjd|j|jjtjjd|jj t |jj dkrt |j dkr|jj |_ n|j |j_ t |j dkr|j jtd|jtn|j d|_|j d|_t |jdkrd|jjtjjdx0|jD]"}|jjtjjd|q;Wn|j|jkr|j jtd |jtjdtn|j|j|jj||j|jd S( sRead :attr:`self.cmds` and parse them out to make sure that the requested base command and argument makes any sense at all. This function will also set :attr:`self.basecmd` and :attr:`self.extcmds`. sYum version: %ss COMMAND: %ssInstallroot: %siisYou need to give some commandsExt Commands: s %ss)No such command: %s. Please use %s --helpN(R'tdebugRRRTRUtDEBUG_4RRt installrootRpRhRR&RRRgRtbasecmdtextcmdsR(R targvt_set_repos_cache_reqtdoCheck(RR((s/usr/share/yum-cli/cli.pyRks2 -  #  c Cs|j|j}d}t|drC|j||j|j}nd}d}x|jjD]y}tj j |j sd}Pntj |j j }|s|}|}q_||kr|}q_||kr_|}q_q_W|r||d krd}q|tjkrd}qn|s(d}nt}x5|jjD]$}||_|jr>t}q>q>W|r|rtj|dkr|rdS|jjtdndS(s< Set the cacheReq attribute from the commands to the repos. twritetcacheRequirementi<iiiNsJRepodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fastiiQiiiQiu(R(RRbRRRStrepost listEnabledtostpathtexiststmetadata_cookietstattst_mtimeRR)Rct_metadata_cache_reqt_matchExpireFilterRR&RR( RRtcmdtcacheReqtts_mintts_maxRtrtstall_obey((s/usr/share/yum-cli/cli.pyRsD            "cCs~t|dsdS|js dS|j}g|D]}dj|^q0}|jddj|}|jjd|dS(Nt_shell_history_cmdst Rs s shell-cmds(RbRtjoinRqthistorytwrite_addon_data(RtdataR((s/usr/share/yum-cli/cli.pyt_shell_history_writes  " cCs`tjd|}|j|_t|jdkr@|jn |j|`|j|jfS(sRun a shell-like interface for yum commands. :return: a tuple containing the shell result number, and the shell result messages Ri( tshelltYumShellRRpRtcmdlooptscripttresultt resultmsgs(Rtyumshell((s/usr/share/yum-cli/cli.pytdoShells   cCsAd}tjd}i}x|j|D]}|jddkr[t|jdntjt|jdd}|jd|kr|||jd|jjtddS|j}|jjtjj r~|jj tjj |n,|j j s|j j r|jj|ng}g}tt}xs|jjD]b}|jd,krt}|j}|r4|j|q4qt|j}|r|j|qqW|jjs[|j|n|j|||jj}|d-k r|jj|dkrtd} |d r| td 7} |jjt| q| td 7} tjj| n|j rkd-} |j j s-||} n| sM|jjtd dS| d krkt|j _!qkn|j j!r|jj tjj"tdn|jj tjj"td|j#|d|j$} t| dkrVd} | td7} xI| D]A} tj%j&| | }x"|D]}| d| |f7} q"WqWtjj| n|j'|dkrodS|j(|j)}d-|_)|j*ddt+j+}|jj tjj"td|j,}t}|rt}x)|D]!} | j-drqnt}qW|r$tdGHntdGHt}x|D]} t.| GHq<W|rjdtdgfS|rzdgfSdtd|j j/gfSn|jj0dt+j+|t+j+}|jj tjj"td|jj1|jj2t3|dt}|jj4|}~t|dkrtd} x"|D]}| dt5|7} qIWtjj| d |j6| n|jj tjj"td!|jj0d"t+j+|t7j7t7j8t7j9t+j+}t}x*|jjD]}|j:rt}PqqW|rf|j(|j*dd|jj;|jj1|jj2n||_)t3|d#t<j=t>|}|j j?d krt|j@_<nid$gd%6}x|D]}|jjAd&| s|jBjCd&| rqnx||D]|}y7tDjEjF||jj tjjGtd'|Wq tHk r}|jj tjjGtd(||fq Xq WqW|jj tjj"td)|jId*|} |jj0d+t+j+||jj tjj |jJt7j7t7j8tK| jLS(.s)Take care of package downloading, checking, user confirmation and actually running the transaction. :return: a numeric return code, and optionally a list of errors. A negative return code indicates that errors occurred in the pre-transaction checks csxidtdtdtdfd6}s\|jd|}|dkrXd}n|S|jdtdd|S(Nudtdtdownloadt downloadonlytextratpromptsIs this ok [y/d/N]: (Rt userconfirmRS(Rtdl_onlytret(tstuff_to_download(s/usr/share/yum-cli/cli.pyt_downloadonly_userconfirmSs  is9Trying to run the transaction but nothing to do. Exiting.iR~tuis6future rpmdb ver mismatched saved transaction version,is ignoring, as requested.s aborting.sExiting on user commandRs.Background downloading packages, then exiting:sDownloading packages:tcallback_totalRsError downloading packages: s %s: %s tkeepoldsRunning transaction checksrpmlib(s'ERROR You need to update rpm to handle:s)ERROR with transaction check vs depsolve:sRPM needs to be updatedsPlease report this error in %ssTransaction check time: %0.3fsRunning transaction testttestsTransaction check error: s %s s sTransaction test succeededsTransaction test time: %0.3ftdisplayslibnsssysinit.sos nss-sysinitROsPreloaded shared library %ss'Could not preload shared library %s: %ssRunning transactiontcbsTransaction time: %0.3f(R~R%N(MRpttsInfoR'tinfoRtlistTransactiont isEnabledForRRUtINFO_1RTRtassumenot assumeyesR&twarnRR)t getMemberstts_statetpoRqttstclosetreportRemoveSizetreportDownloadSizet_check_future_rpmdbvRStfutureRpmDBVersionRRRt _promptWantedRRVt downloadPkgstdownload_callback_total_cbR_R`t gpgsigcheckt initActionTst dsCallbackt populateTsRt_run_rpm_checkt startswithR tbugtracker_urlRtordertcleanRR(RR RRtSIG_DFLt reinstalltcheckR!tYumCliRPMCallBacktweakrefRR)t matchNaevrRt searchNevratctypestcdllt LoadLibraryRt ExceptiontrunTransactiontpostTransactionOutputRt return_code(!RR$tlstst downloadpkgstrmpkgst install_onlyttxmbrR5tcfrRtuctproblemsRR\terrorsterrortdscbtrcd_sttmsgstdepsolvet rpmlib_onlyttt_stttestcbttserrorstdescrtts_stthave_reinstallsR*tpreloadRtlibRt resultobject((R#s/usr/share/yum-cli/cli.pyt doTransactionKs$                                                # csx|D]}j|\}}|dkr4qq|dkrjjoVjj }tjj r| rtjj t dnj |fdqtjj |qWdS(sLPerform GPG signature verification on the given packages, installing keys if possible. :param pkgs: a list of package objects to verify the GPG signatures of :return: non-zero if execution should stop due to an error :raises: Will raise :class:`YumBaseError` if there's a problem iisTRefusing to automatically import keys when running unattended. Use "-y" to override.cs jS(N(R (R]tytz(R(s/usr/share/yum-cli/cli.pyR^Vs( t sigCheckPkgRR1R0R tstdintisattyRRRRtgetKeyForPackage(RtpkgsR5Rterrmsgtay((Rs/usr/share/yum-cli/cli.pyR?=s    cCs|jd|gdt}|j|j}ttd|}|r|jtddj|}|j j t j j t|ndS(s= If install argument doesn't match with case, tell the user. Rt ignore_casecSs|jS(N(RO(R]((s/usr/share/yum-cli/cli.pyR^bss * Maybe you meant: s, N(tdoPackageListsR)t installedt availabletsettmapt fmtKeyValFillRRR'RTRRURVR(RRtmatchesR((s/usr/share/yum-cli/cli.pyt_maybeYouMeant^sc Cs| s|ddkrdSd}|r0d}n|jd|d|gdt}|jss|j rw|j|rwdS|jjd }|jjd }|jr|jjt j j t d |||dS|jd|d|gdt }|j r,|jr,|jjt j j t d |||dSttd |j}|sS|r~|jjt j j t d |||n|r|jt ddj|}|jjt j j |ndS(sr If the update/remove argument doesn't match with case, or due to not being installed, tell the user. it@NtallRzt pkgnarrowRRxRRs/Package(s) %s%s%s available, but not installed.cSs|jS(N(RO(R]((s/usr/share/yum-cli/cli.pyR^ssNo package %s%s%s available.s * Maybe you meant: s, (RyRRzR{treturnInstalledPackagesByDepRRR'RTRRURVRR)R|R}R~R( RRt always_outputt rpmdb_onlyRRthibegthiendR((s/usr/share/yum-cli/cli.pyt_checkMaybeYouMeanths> !   !    csjjsgSg}tdfdxK|D]C}x'|jD]\}}||7}qNW||j7}q>W|S(sGo through the given txmbrs, and for any to be installed packages look for their installed deps. and try to upgrade them, if the configuration is set. Returning any new transaction members to be isntalled. :param txmbrs: a list of :class:`yum.transactioninfo.TransactionMember` objects :return: a list of :class:`yum.transactioninfo.TransactionMember` objects cs|jkrgS|dkr(|}nj|jg}xu|jD]j}xaj|D]P}|jkryq^n|jd|jd|7}||d|7}q^WqHW|S(NROt requiringPotreqpo(RORStaddtrequiresRtupdate(RRturettreqtnpkg(t_pkg2upsRR(s/usr/share/yum-cli/cli.pyRs  N(Rtupgrade_requirements_on_installR|RSt relatedtoR5(RttxmbrsR"RZtrtxmbrtT((RRRs/usr/share/yum-cli/cli.pyt_install_upgraded_requiress   tinstallcCst|j}t}x|D]}|jdrwtjj|sUtjj |rw|j |}|j |qnytrn|dkr|j d|}n|dkr/y|j dd\}} WnE|jjtd|||jjs dtdgfSwnX|j d|d | }n|d kryO|j dd\} } | j d d \}} } | jd d\} }WnE|jjtd|||jjsdtdgfSwnX|j d|d| d|d| d | }n*|dkst||j d|}Wntjjk r}} |jjtjj| |jjsdtdgfSqtjjk r|jjtjjtd|jjd||jjd|j||jjsdtdgfSqXt}|j |qWt|j|krXt|j|}d tdd||gfS|sqdtdgfSdtdgfS(ssAttempt to take the user specified list of packages or wildcards and install them, or if they are installed, update them to a newer version. If a complete version number is specified, attempt to upgrade (or downgrade if they have been removed) them to the specified version. :param userlist: a list of names or wildcards specifying packages to install :return: (exit_code, [ errors ]) exit_code is:: 0 = we're done, exit 1 = we've errored, exit with error string 2 = we've got work yet to do, onto the next stage s.rpms install-nROs install-naRlisBad %s argument %s.s2Not tolerating missing names on install, stopping.Rs install-nevrat-it:RRRRtpatternsNo package %s%s%s available.RRs%d package to installs%d packages to installs Nothing to doi( RpR+RtendswithRR_t re_remote_urlRRRt installLocalRRtrsplitR'RRRtskip_missing_names_on_installRotAssertionErrorRtGroupInstallErrorRTRURVt InstallErrorRRRR)R(RtuserlistRtrepoidtoldcountRRRtntatnevrtevtrRRtchange((s/usr/share/yum-cli/cli.pyt installPkgsst !            ic Cst|j}t|dkr.|jnDxA|D]9}|jdrtjj|sntjj |r|j |dd}|j |q5ny|jd|d|}Wn@tj j tj jfk r|j|dtdgfSX|j ||s5|j||jjsn|jdd d |gd t}|jrk|j rkdtdgfSqnq5q5Wt|j|krt|j|}d td d||gfSdtdgfSdS(sTake user commands and populate transaction wrapper with packages to be updated. :param userlist: a list of names or wildcards specifying packages to update. If *userlist* is an empty list, yum will perform a global update :param quiet: unused :param update_to: if *update_to* is True, the update will only be run if it will update the given package to the given version. For example, if the package foo-1-2 is installed, updatePkgs(["foo-1-2], update_to=False) will work identically to updatePkgs(["foo"]), but updatePkgs(["foo-1-2"], update_to=True) will do nothing :return: (exit_code, [ errors ]) exit_code is:: 0 = we're done, exit 1 = we've errored, exit with error string 2 = we've got work yet to do, onto the next stage is.rpmt updateonlyiRt update_tos1Not tolerating missing names on update, stopping.RRRRxis%d package marked for updates%d packages marked for updatesNo packages marked for updateN(RpR+RRRR_RRRRRRRtUpdateMissingNameErrorRRRRtskip_missing_names_on_updateRyRR{RzR( RRRRRR|RRR((s/usr/share/yum-cli/cli.pyt updatePkgss2  !     !c Csd}|rH|ddkrH|d}|d}|dkrHd}qHng}i}x0t|jjd|D]}|||jdnd}!|d|j%| t||!fg7}||7}| || p9 , 7 #3 l $ + +   ( T <   RcBsheZdZdZdZdZedZd dZ dZ dZ dZ d Z RS( s\Subclass that makes some minor tweaks to make OptionParser do things the "yum way". cKsd|kr#|d|_|d=n t|_tj||tjd|_||_t|t d|_ |j |j |j dS(NRsyum.clisPlugin Options( t_utilsRRRR#R%R&RRRtplugin_option_grouptadd_option_groupt_addYumBasicOptions(RRtkwargs((s/usr/share/yum-cli/cli.pyRs     cCs4|j|jjtd|tjddS(sOutput an error message, and exit the program. This method is overridden so that error output goes to the logger. :param msg: the error message to output sCommand line error: %siN(t print_usageR&RRR R(RR((s/usr/share/yum-cli/cli.pyR_s c Cswytdd|}WnJtk rb}|jjtjtdd|fIJtjdnX|jd|dS(sParse only command line options that affect basic yum setup. :param args: a list of command line options to parse :return: a dictionary containing the values of command line options s --nopluginss --versions-qs-vs--quiets --verboses-cs--configs-ds --debuglevels-es --errorlevels --installroots--disableplugins--enableplugins --releasevers--setopts$ %s: %s option requires an argumentsCommand line erroriRi(s --nopluginss --versions-qs-vs--quiets --verbose( s-cs--configs-ds --debuglevels-es --errorlevels --installroots--disableplugins--enableplugins --releasevers--setopt( t_filtercmdlineRRRgR R RRt parse_args(RRR((s/usr/share/yum-cli/cli.pyRs   cCs:g}x-|D]%}|j|jddjq W|S(sR Split all strings in seq, at "," and whitespace. Returns a new list. t,R(RtreplaceRo(tseqR"R((s/usr/share/yum-cli/cli.pyR s #c Cs|s|j\}}n|jd|\}}|jjj||y|jsd|jjjrvt|jj_n|jrd|jj_n|j rd|jj_ n|j |jj_ |j |jj_ |j|jjd<|j|jjd<|j|j|jjd<|j|j|jjd<|j|j|jjd<|j|j|jjd<|jjj rtjd krd|jj_n!|jjsd|jj_n|jrd|jj_n|jrd|jj_n|jr|j||j|jj_n|jr7t|jj_ n|j!rRt|jj_!n|j"dkrst$t%dn|j"dkr|jjj"d krN|jj&j'd|jjj"qNni d d 6d d6d d6d d6d d6d d6d d6d d6d d6d d6}|j(|j"|j"|_"|j"d krN|jj&j'd|j"n|j|j)|jj_*|j|j+|jj_,|j|j-|j_.x|jj.D]{}y/|jjj-}|j/|||jj_-Wqt0j1j2k r#}|j3j4||jj5t6j7dqXqW|j8dk rL|j8|jj_8n|jj9|jj:x|j;D]\}} yH|dkr|jj;j<| n"|dkr|jj;j=| nWqpt0j1j2k r }|j3j4||jj5t6j7dqpXqpW|j>rLt|j_?x&|jj;j@D]} t| _?q6WnWnFt$k r}|j3j4t%d||jj5t6j7dnX||fS(sParse command line options. :param args: the command line arguments entered by the user :return: (opts, cmds) opts is a dictionary containing the values of command line options. cmds is a list of the command line arguments that were not parsed as options. For example, if args is ["install", "foo", "--verbose"], cmds will be ["install", "foo"]. Ritsecuritytbugfixtadvstbzstcvestsevsitautotalwaystnevertttysif-ttytyesRctontoffs)--color takes one of: auto, always, nevertcolort1ttrueRtfalses --enablerepos --disablereposOptions error: %sN( NRsalwaysRRsif-ttysyessnoRR(ARRRt setCmdLinettolerantRR)trecheck_installed_requiresR1R0tdlonlyRtdldirt downloaddirRtupdateinfo_filtersRRRRRRt usercacheRtgeteuidRt setCacheDirt cacheonlyRRt_checkAbsInstallRoott skipbrokent skip_brokenRRRSRRRtreinittgettdisableexcludestdisable_excludestdisableincludestdisable_includestexcludetcmdline_excludesRqRRRMR&RRgR Rt rpmverbositytsetupProgressCallbackstsetupKeyImportCallbacksRt enableRepot disableRepot nogpgcheckt_override_sigchecksR( RRRRt_remapRt excludelistRRtrepoexpR((s/usr/share/yum-cli/cli.pyR s   "       %          cCsQ|js dS|jddkr$dS|jjtd|jtjddS(NiRs*--installroot must be an absolute path: %si(RR&RRR R(RR((s/usr/share/yum-cli/cli.pyR s  cCs|j||jr|jjdrtj|jd|jtjre|jd|j|_nA|jdkrtj|jdtjr|jd|_qn|j}nd}|S(s(Return the root location to use for the yum operation. This location can be changed by using the --installroot option. :param opts: a dictionary containing the values of the command line options :return: a string representing the root location Rs/etc/yum/yum.confs /etc/yum.conf(RRtlstripRtaccessRtR_OK(RRR((s/usr/share/yum-cli/cli.pyR s # cOs|jj|jdS(N(RRgR(RRtvaluetparserRR((s/usr/share/yum-cli/cli.pyt_wrapOptParseUsage s cCsd}|jr1t|d}|j|n|}d|_|jddddd|jdtd d |_|jd d dd dtd|jdddddd dtd|jdddddddtddd|jdddddd dddtd!dd"|jd#d$dd%dddtd&dd dd'|jd(dd)dd dtd*|jd+dd)dd dt|jd,d-dd.dddtd/dd dd0|jd1d2dddtd3dd4|jd5d6dd7dd dtd8|jd9d:dd;dd dtd<|jd=d>dd?dd dtd@|jdAddBdd dtdC|jdDddBdd dt|jdEdd dtdF|jdGdtdHddI|jdJddddKd|ddLdgdtdMddN|jdOddddKd|ddLdgdtdPddN|jdQdRdgddSdtdTddU|jd1dVdgddSdtdWddN|jd1dXdgddSdtdYddN|jdZdd dtd[|jd\dd dtd]|jd^dd dtd_|jd1d`ddadgddSdtdbddc|jd1ddddedgddSdtdfddc|jdgdd ddhdtdi|jd1djddkdddtdl|jd1dmddndddtdo|jdpddqdd dtdr|jdsddtdddtdu|jd1dvddwdgddSdtdx|jdydd dtdz|jd{dd dtd||jd}d~dddgddSdtd|jddgddSdtd|jddgddSdtd|jdddgddddSdtddS(NcSs*td|j}|j||fdS(sCallback for the enablerepo and disablerepo option. Combines the values given for these options while preserving order from command line. sparser.values.%sN(tevaltdestRq(toptobjRRRR((s/usr/share/yum-cli/cli.pyt repo_optcb ssYum Base Optionstresolves-hs--helptactionRthelpsshow this help message and exitR_s-ts --tolerantt store_truesbe tolerant of errorss-Cs --cacheonlyRRs2run entirely from system cache, don't update caches-cs--configRtdefaults/etc/yum/yum.confsconfig file locationtmetavars [config file]s-Rs --randomwaitRttypeRsmaximum command wait times [minutes]s-ds --debuglevelRsdebugging output levels [debug level]s--showduplicatesRs2show duplicates, in repos, in list/search commandss--show-duplicatess-es --errorlevelRserror output levels [error level]Rs--rpmverbositysdebugging output level for rpms[debug level name]s-qs--quietRsquiet operations-vs --verboseRsverbose operations-ys --assumeyesR1sanswer yes for all questionss --assumenoR0sanswer no for all questionss--nodepss --versionsshow Yum version and exits --installrootsset install roots[path]s --enablerepotstringRs3enable one or more repositories (wildcards allowed)s[repo]s --disablerepos4disable one or more repositories (wildcards allowed)s-xs --excludeRqs"exclude package(s) by name or globs [package]s--disableexcludess7disable exclude from main, for a repo or for everythings--disableincludess0disable includepkgs for a repo or for everythings --obsoletess*enable obsoletes processing during updatess --nopluginssdisable Yum pluginss --nogpgchecksdisable gpg signature checkings--disablepluginRsdisable plugins by names[plugin]s--enablepluginRsenable plugins by names --skip-brokenRs&skip packages with depsolving problemss--colorRscontrol whether color is useds --releaseverRs5set value of $releasever in yum config and repo filess--downloadonlyRsdon't update, just downloads --downloaddirRs2specifies an alternate directory to store packagess--setoptRws%set arbitrary config and repo optionss--bugfixs,Include bugfix relevant packages, in updatess --securitys.Include security relevant packages, in updatess --advisorys --advisoriesRs=Include packages needed to fix the given advisory, in updatess--bzss7Include packages needed to fix the given BZ, in updatess--cvess8Include packages needed to fix the given CVE, in updatess--sec-severitys --secseverityRsDInclude security relevant packages matching the severity, in updates( RRRtconflict_handlert add_optionRRRSR(RRR((s/usr/share/yum-cli/cli.pyR s                            N(RRRRR_Rt staticmethodRRSRRRRR(((s/usr/share/yum-cli/cli.pyRs     cCsfg}t|}xMt|dkra|jd}d|kry|jdd\}}||kr^|j|q^q|dkr|j|q||kr|j|q||krt|dkrt|n|jd}|ddkrt|n|j||gqx?|D]7}t|dkr#|j|r#|j|q#q#WqW|S(sKeep only specific options from the command line argument list This function allows us to peek at specific command line options when using the optparse module. This is useful when some options affect what other options should be available. @param novalopts: A sequence of options to keep that don't take an argument. @param valopts: A sequence of options to keep that take a single argument. @param args: The command line arguments to parse (as per sys.argv[:1] @return: A list of strings containing the filtered version of args. Will raise ValueError if there was a problem parsing the command line. iRkis--Ri(tlistRpRRoRqRRRD(t novaloptstvaloptsRtoutRRRtnext((s/usr/share/yum-cli/cli.pyR7 s.         !(/RRRR RRR#RtoptparseRRRtrpmROR4RLRR!RRt yum.Errorstyum.logginglevelstyum.misct yum.pluginst rpmUtils.archRRRt yum.rpmtransRRR,tyum.i18nRR R t yum.packagesR RRRRR R"RRR(((s/usr/share/yum-cli/cli.pytsP                    `