ó ÊI Rc@sgdZddlZddlZddlZddlZddlZddlZddlmZddlm Z ddlm Z ddlm Z ddl m Z mZddlZddlZddlmZd „Zd „Zd „Zd „Zed „ZeƒedkrcyeejddeƒWqcek r_Zeje dƒIJejdƒqcXndS(s4 Entrance point for the yum command line interface. iÿÿÿÿN(tErrors(tplugins(t logginglevels(t_(t utf8_widtht exception2msg(t#suppress_keyboard_interrupt_messagecsItjjdtƒ‡‡fd†}‡‡fd†}‡‡fd†}‡‡fd†}‡fd†‰‡‡fd†}tjdƒ‰tjd ƒ‰ytd ƒ}WnHtk rô}|jtj krÿˆj t d ƒƒt j d ƒqÿn X|jƒyt jƒWnHtk rW}|jtjkrXˆj t d ƒƒt j d ƒqXnXtjƒ‰yˆj|ƒWnXtjk r”}||ƒStjk r°}||ƒSttfk rÏ}||ƒSXˆjƒyˆjƒ\}} Wn¨tjk r}||ƒStjk rC}d}t|ƒg} ˆjƒnXtjk rm}d}t|ƒg} n.tk r|ƒStk rš}||ƒSX|dkrâx$| D]} ˆjt j!d| ƒq®WˆƒrÛdSˆj"S|dkr&x$| D]} ˆj t dƒ| ƒqõWˆƒr"dSdS|dkr5nb|dkrRˆƒrNdSdSˆj t dƒ|ƒx| D]} ˆj | ƒqoWˆƒr“dSdSˆjt j!t dƒƒyˆj#ƒ\}} Wn¨tjk rå}||ƒStjk r}d}t|ƒg} ˆjƒnXtjk rC}d}t|ƒg} n.tk rW|ƒStk rp}||ƒSX|dkr‘ˆƒrŠdSˆj"S|dkr4xN| D]F} t dƒ} dt$| ƒd} ˆj | | j%dd| ƒƒq¤Wˆj&r#ˆj'j(sˆj)t dƒƒn|ƒnˆƒr0dSdS|dkrCnEˆj t dƒ|ƒx| D]} ˆj | ƒq`Wˆƒr„dSdSˆjt j!t dƒƒyˆj*ƒ} Wnštjk rÐ}||ƒStjk r}d}t|ƒg} ˆjƒnJtjk r }||ƒStk r4|ƒStk rM}||ƒSXt+| ƒt+dƒkrÛt,| ƒdkrÛ| \}} x| D]} ˆj d| ƒq‹W|ƒ|} ˆj-r/ˆj)t dƒˆj-ƒq/nT| dkrd} ˆj-r/ˆj)t dƒˆj-ƒq/nˆjt j!t dƒƒˆƒr<dS| pHˆ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 cs6yˆjƒˆjƒWntjk r1}dSXdS(NiÈi(t closeRpmDBtdoUnlockRt LockError(R (tbase(s/usr/share/yum-cli/yummain.pyR Gs  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_checkstinfotFalseRt YumBaseErrorRR(tprobsR (Rtverbose_logger(s/usr/share/yum-cli/yummain.pytrpmdb_warn_checksOs 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:isResolving Dependenciest s s= 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(.tyumtmisct setup_localetTruetloggingt getLoggertopentIOErrorR tEACCESRRtostchdirtclosetgetcwdtOSErrortENOENTtclit YumBaseClitgetOptionsConfigRt PluginYumExitRRt waitForLockt doCommandst RepoErrorRtcleanExpireCachetKeyboardInterrupttlogRtINFO_2t exit_codetbuildTransactionRtreplacet_depsolving_failedtconft skip_brokenRt doTransactionttypetlent _ts_save_file(targsR RRRRtfR tresultt resultmsgstmsgtprefixt prefix2ndt return_code((RR R Rs/usr/share/yum-cli/yummain.pytmain%s                                $            *        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.statsR,tpatht expandusertProfiletruncallR.t print_statststatstload(tfuncRGtkwargsthotshottfntproftrc((s/usr/share/yum-cli/yummain.pyRZs  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( tcProfiletpstatsR,RQRRRSRTt dump_statsRUtStats(RXRGRYR^R_R[R\R]((s/usr/share/yum-cli/yummain.pytcprofs  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_statsRU(RV((s/usr/share/yum-cli/yummain.pyRUs    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_PROFRbRZtYUM_PDBiÿÿÿÿN( tNoneR,tenvironRbRORZtpdbtruntsystexit(RGR=terrcodeRl((s/usr/share/yum-cli/yummain.pyt user_main(s   t__main__iR=s Exiting on user cancel.( t__doc__R,tos.pathRnR'RcR R#RRRRtyum.i18nRRtyum.miscR2tutilsRRORZRbRURRqt__name__targvR&R:R tstderrRo(((s/usr/share/yum-cli/yummain.pyts4         Ü