ó ð v_c@sgdZddlZddlZddlZddlZddlZddlZddlmZddlm Z ddlm Z ddlm Z ddl m Z mZddlZddlZddlmZd „Zd „Zd „Zd „Zed „ZeƒedkrcyeejddeƒWn3ek r_Zeje dƒIJejdƒnXndS(s4 Entrance point for the yum command line interface. iÿÿÿÿN(tErrors(tplugins(t logginglevels(t_(t utf8_widtht exception2msg(t#suppress_keyboard_interrupt_messagecsÀtjjdtƒ‡‡fd†}‡‡fd†}‡‡fd†}‡‡fd†}‡‡‡fd†}‡fd†‰‡‡fd†}tjd ƒ‰tjd ƒ‰ytd ƒ}WnHtk r }|jtj krˆj t d ƒƒt j d ƒqn X|jƒyt jƒWnHtk rl}|jtjkrmˆj t dƒƒt j d ƒqmnXtjƒ‰yˆj|ƒWnXtjk r©}||ƒStjk rÅ}||ƒSttfk rä}||ƒSXyˆjƒWntjk r}||ƒSXyˆjƒ\} } Wntjk rH}||ƒStjk rd}||ƒStjk rŽ}d} t|ƒg} n.tk r¢|ƒStk r»}||ƒSX| dkrx$| D]} ˆjtj d| ƒqÏWˆƒrüdSˆj!S| dkrGx$| D]} ˆj t dƒ| ƒqWˆƒrCdSdS| dkrVnb| dkrsˆƒrodSdSˆj t dƒ| ƒx| D]} ˆj | ƒqWˆƒr´dSdSˆj"j#r_ˆj"j$d} | j%dd ƒ} t j&j'| ƒr_t j(| t j)ƒ r_ˆj t dƒ| ƒˆj t dƒƒˆj t dƒƒˆƒrXdSdSnˆjtj t dƒƒyˆj*ƒ\} } Wntjk r­}||ƒStjk rÉ}||ƒStjk ró}d} t|ƒg} n.tk r|ƒStk r }||ƒSX| dkrAˆƒr:dSˆj!S| dkrÃx-ˆj+| ƒD]\} } ˆj | | ƒq]Wˆj,r²ˆj"j-s¨ˆj.t dƒƒn|ƒnˆƒr¿dSdS| dkrÒnEˆj t dƒ| ƒx| D]} ˆj | ƒqïWˆƒrdSdSˆjtj t dƒƒyˆj/ƒ}Wn‚tjk r_}||ƒStjk r{}||ƒStjk r—}||ƒStk r«|ƒStk rÄ}||ƒSXt0|ƒt0d"ƒkrRt1|ƒdkrR|\} } x| D]} ˆj d| ƒqW|ƒ| }ˆj2r¦ˆj.t d ƒˆj2ƒq¦nT|dkrd}ˆj2r¦ˆj.t d ƒˆj2ƒq¦nˆjtj t d!ƒƒˆƒr³dS|p¿ˆj!S(#s2Run the yum program from a command line interface.t override_timecs$ˆjtdƒƒˆƒr dSdS(Ns Exiting on user canceliÈi(tcriticalR((tloggertunlock(s/usr/share/yum-cli/yummain.pyt exUserCancel*s csS|jdkr%ˆjtdƒƒnˆjtdƒt|ƒƒˆƒrOdSdS(Ni s Exiting on Broken Pipes %siÈi(terrnoRRR(te(R R (s/usr/share/yum-cli/yummain.pyt exIOError/s  cs6t|ƒ}|r%ˆjd|ƒnˆƒr2dSdS(soCalled when a plugin raises PluginYumExit. Log the plugin's exit message if one was supplied. s %siÈi(Rtwarn(R texitmsg(R R (s/usr/share/yum-cli/yummain.pyt exPluginExit7s   cs*ˆjdt|jƒƒˆƒr&dSdS(Ns %siÈi(RRtvalue(R (R R (s/usr/share/yum-cli/yummain.pytexFatalBs csµyˆjƒWntjk r$nXtdƒ}tdƒ}tdƒ}t|dƒrs|jj}|jj}n|i|d6|d6}ˆjd|t |ƒƒˆƒr±dSdS( Ns§ One of the configured repositories failed (%(repo)s), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=%(repoid)s ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable %(repoid)s or subscription-manager repos --disable=%(repoid)s 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=%(repoid)s.skip_if_unavailable=true tUnknownstrepotrepoids %s %siÈi( tcleanExpireCacheRt YumBaseErrorRthasattrRtidtnameRR(R tmsgtrepouiR(tbaseR R (s/usr/share/yum-cli/yummain.pyt exRepoErrorGs      cs6yˆjƒˆjƒWntjk r1}dSXdS(NiÈi(t closeRpmDBtdoUnlockRt LockError(R (R(s/usr/share/yum-cli/yummain.pyR ~s  cszyˆjdˆjdtƒ}Wn8tjk rY}ˆjtdƒt|ƒƒg}nX|svˆjtdƒƒndS(NtoutRs Yum checks failed: %ss4 You could try running: rpm -Va --nofiles --nodigest(t_rpmdb_warn_checkstinfotFalseRRRR(tprobsR (Rtverbose_logger(s/usr/share/yum-cli/yummain.pytrpmdb_warn_checks†s syum.mainsyum.verbose.maint.s8No read/execute access in current directory, moving to /t/s4No getcwd() access in current directory, moving to /iis%siÈs Error: %siids Unknown Error(s): Exit Code: %d:is/usrs//sNo write access to %s directorys Maybe this is an ostree image?s3 To disable you can use --setopt=usr_w_check=falsesResolving Dependenciess= You could try using --skip-broken to work around the problems Dependencies ResolvedsCYour transaction was saved, rerun it with: yum load-transaction %ss Complete!(i(3tyumtmisct setup_localetTruetloggingt getLoggertopentIOErrorR tEACCESRRtostchdirtclosetgetcwdtOSErrortENOENTtclit YumBaseClitgetOptionsConfigRt PluginYumExitRRt waitForLockt doCommandst RepoErrorRtKeyboardInterrupttlogRtINFO_2t exit_codetconft usr_w_checkt installroottreplacetpathtexiststaccesstW_OKtbuildTransactiontpretty_output_restringt_depsolving_failedt skip_brokenR%t doTransactionttypetlent _ts_save_file(targsR RRRRR)tfR tresultt resultmsgsRt usrinstpathtprefixt return_code((RR R R(s/usr/share/yum-cli/yummain.pytmain%s* 7                                           *        cOsfddl}tjjdƒ}|j|ƒ}|j|||Ž}|jƒt|jj |ƒƒ|S(s Profile the given function using the hotshot profiler. :param func: the function to profile :return: the return code given by the hotshot profiler iÿÿÿÿNs ~/yum.prof( t hotshot.statsR5RJt expandusertProfiletruncallR7t print_statststatstload(tfuncRVtkwargsthotshottfntproftrc((s/usr/share/yum-cli/yummain.pyRg<s  cOsoddl}ddl}tjjdƒ}|jƒ}|j|||Ž}|j|ƒt|j |ƒƒ|S(sœProfile the given function using the cprof profiler. :param func: the function to profile :return: the return code given by the cprof profiler iÿÿÿÿNs ~/yum.prof( tcProfiletpstatsR5RJR_R`Rat dump_statsRbtStats(ReRVRfRkRlRhRiRj((s/usr/share/yum-cli/yummain.pytcprofJs  cCsE|jƒ|jddƒ|jdƒ|jdƒ|jdƒdS(sPrint out information from a :class:`Stats` object. :param stats: the :class:`Stats` object to print information from ttimetcallsit cumulativei(N(t strip_dirst sort_statsRb(Rc((s/usr/share/yum-cli/yummain.pyRbXs    cCsÈd}dtjkrbtjddkr:tt|ƒ}ntjddkrbtt|ƒ}qbndtjkr“ddl}|jt|ƒƒn|dkr®t|ƒ}n|rÄtj |ƒn|S(slCall one of the multiple main() functions based on environment variables. :param args: command line arguments passed into yum :param exit_code: if *exit_code* is True, this function will exit python with its exit code when it has finished executing. Otherwise, it will return its exit code. :return: the exit code from yum execution tYUM_PROFRoRgtYUM_PDBiÿÿÿÿN( tNoneR5tenvironRoR]Rgtpdbtruntsystexit(RVREterrcodeRy((s/usr/share/yum-cli/yummain.pyt user_maincs   t__main__iREs Exiting on user cancel.( t__doc__R5tos.pathR{R0RpR R,RRRRtyum.i18nRRtyum.miscR;tutilsRR]RgRoRbR&R~t__name__targvR/RBR tstderrR|(((s/usr/share/yum-cli/yummain.pyts6         ÿ