ó ž[/\c@@s”ddlmZddlmZddlmZddlmZddlmZddl Z ddl Z e j dƒZ dejfd „ƒYZdS( i(tabsolute_import(tunicode_literals(tcommands(t OptionParser(t_NudnftReinstallCommandcB@sAeZdZdZedƒZed„ƒZd„Zd„Z RS(uSA class containing methods needed by the cli to execute the reinstall command. u reinstallureinstall a packagec C@s8|jddddtdƒdtjdtdƒƒdS( Nupackagestnargsu+thelpuPackage to reinstalltactiontmetavaruPACKAGE(t add_argumentRRtParseSpecGroupFileCallback(tparser((s>/usr/lib/python2.7/site-packages/dnf/cli/commands/reinstall.pyt set_argparser(s cC@si|jj}t|_t|_t|_t|_tj|j |jƒ|j j setj |j ƒndS(u Verify that conditions are met so that this command can run. These include that the program is being run by the root user, that there are enabled repositories with gpg keys, and that this command is called with appropriate arguments. N( tclitdemandstTruetsack_activationtavailable_repost resolvingt root_userRt _checkGPGKeytbasetoptst filenamest_checkEnabledRepo(tselfR((s>/usr/lib/python2.7/site-packages/dnf/cli/commands/reinstall.pyt configure.s      c C@sNt}x”|jj|jjdtd|jjjƒD]e}y|jj|ƒWnBtj j k r’t j t dƒ|jjjj|jƒƒq4Xt}q4Wx‰|jjg|jjD]}d|^qśD]Z}y|jj|ƒWn7tj jk re}x:|jD]/}t j t dƒ|jjj|jƒƒPqWt j t dƒ|jjjj|ƒƒqËtj jk rö}x¨|jD]k}d}|jjj|ƒ}|ržt dƒ|}nt dƒ}t j ||jjjj|ƒ|ƒq„WqËtj j k rts%td ƒ‚qËXt}qËW|sJtj jt d ƒƒ‚ndS( NtstricttprogressuNo match for argument: %su@u(Package %s available, but not installed.uu (from %s)u%Installed package %s%s not available.u+Only the above marking errors are expected.u!No packages marked for reinstall.(tFalseRtadd_remote_rpmsRRtoutputRtpackage_reinstalltdnft exceptionst MarkingErrortloggertinfoRttermtboldtlocationRt pkg_specst grp_specst reinstalltPackagesNotInstalledErrortpackagestnametPackagesNotAvailableErrorthistorytrepotAssertionErrortError( Rtdonetpkgtxtpkg_specterrtxmsgtpkgrepotmsg((s>/usr/lib/python2.7/site-packages/dnf/cli/commands/reinstall.pytrun=sB  4  (u reinstall( t__name__t __module__t__doc__taliasesRtsummaryt staticmethodR RR=(((s>/usr/lib/python2.7/site-packages/dnf/cli/commands/reinstall.pyR!s   (t __future__RRtdnf.cliRtdnf.cli.option_parserRtdnf.i18nRtdnf.exceptionsR"tloggingt getLoggerR%tCommandR(((s>/usr/lib/python2.7/site-packages/dnf/cli/commands/reinstall.pyts