๓ พ[/\c@@sชdZddlmZddlmZddlmZddlmZddlmZddl m Z ddl m Z dd l mZdd l mZdd lZdd lZdd l Zdd lZdd l Zdd lZdd lZdd lZdd lZdd lZdd lZdd lZejd ƒZd „Zd„Zeee d„Zd„Zd„Z d„Z!e"d„Z#e$dkrฆe#ej%dde&ƒnd S(u4 Entrance point for the yum command line interface. i(tprint_function(tabsolute_import(tunicode_literals(tConf(tCli(t OptionParser(tucd(tshow_lock_owner(t_NudnfcC@s3tjtjjddtƒtjt|ƒƒdS(Nutexc_infoi(tloggertlogtdnftloggingtSUBDEBUGtTruetcriticalR(te((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pyt ex_IOError0scC@sNtjtjjddtƒ|jdk rJtjt dƒt |ƒƒndS(NuR u Error: %si( R R R R RRtvaluetNoneRRR(R((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pytex_Error6sc C@s+y8tjjj|ƒƒ}t||||ƒSWdQXWn์tjjk rq}tj|jƒt |j ƒdStjj k rš}tj|jƒdStjj k rณ}dStjj k rา}t|ƒStk r๋}t|ƒStk r&}tjdjt|ƒjtdƒƒƒdSXdS(Niศiu{}: {}u Terminated.(R tclitBaseClit_maint exceptionstProcessLockErrorR RRRtpidt LockErrort DepsolveErrortErrorRtIOErrorRtKeyboardInterrupttformatttypet__name__R(targst conf_classt cli_classtoption_parser_classtbaseR((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pytmain=s&   (cC@s|tjjƒ|jjƒ||ƒ}y&|jttt|ƒƒ|ƒƒWn t t fk rn}t |ƒSXt ||ƒS(u2Run the dnf program from a command line interface.( R ti18nt setup_stdoutt_loggingt _presetupt configuretlisttmapRRtOSErrorRtcli_run(R(R$R&t option_parserRR((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pyRSs   & cC@sytdƒ}WnHtk rZ}|jtjkretjtdƒƒtjdƒqen X|j ƒy|j ƒWn9t j j k r‚n ttfk rฎ}t|ƒSX|jjrvyt||ƒ}Wn˜t j jk rh}t|ƒ|jj rb|jjdtƒrbtdƒd}|jjjrH|tdƒd7}n |d 7}tj|ƒn‚nX|rv|Sn|jjƒ|jjS( Nu.u8No read/execute access in current directory, moving to /u/t availableu@(try to add '%s' to command line to replace conflicting packagesu--allowerasingu( or '%s' to skip uninstallable packages)u --skip-brokenu)(topenRterrnotEACCESR RRtostchdirtclosetrunR RRR1Rtdemandst resolvingRRt allow_erasingt_goaltproblem_conflictsRR(tconftstricttinfotcommandtrun_transactiontsuccess_exit_status(RR(tfRtrettmsg((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pyR2fs<    "   cC@s|jdkr8|j|jjƒtjtdƒƒng}|jjdk rf|j |jjƒny|j d|ƒWn‰t j j k rฉ}tjt|ƒƒdSt jjk r์}x'|jj|ƒD]}tj|ƒqัWdStk r}t|ƒSXtjtdƒƒdS(u9Perform the depsolve, download and RPM transaction stage.uDependencies resolved.tdisplayiu Complete!iN(t transactionRtresolveR<R>R RCRttransaction_displaytappendtdo_transactionR RtCliErrorterrorRRtTransactionCheckErrorRDtget_error_outputRRR(RR(tdisplaystexcterrRIR((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pyR=Žs& cC@s&t|ƒ}|r"tj|ƒn|S(upCall 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 dnf.yum execution (R)tsystexit(R$t exit_codeterrcode((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pyt user_mainฉs u__main__iRY('t__doc__t __future__RRRtdnf.confRt dnf.cli.cliRtdnf.cli.option_parserRtdnf.i18nRt dnf.cli.utilsRRtdnf.cliR tdnf.exceptionst dnf.loggingtdnf.utilR6R R8tos.pathRWt getLoggerR RRR)RR2R=tFalseR[R#targvR(((s0/usr/lib/python2.7/site-packages/dnf/cli/main.pyts>                (