[Yum-devel] [PATCH] Make resolvedep a hidden command.

seth vidal skvidal at fedoraproject.org
Thu Sep 29 04:15:56 UTC 2011


On Wed, 2011-09-28 at 16:56 -0400, James Antill wrote:
> ---
>  cli.py         |    6 ++++--
>  docs/yum.8     |    8 +++++---
>  yumcommands.py |    6 +++++-
>  3 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/cli.py b/cli.py
> index 816a61b..bbe8e55 100755
> --- a/cli.py
> +++ b/cli.py
> @@ -1402,7 +1402,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
>              except yum.Errors.YumBaseError:
>                  ipkg = None
>              else:
> -                self.verbose_logger.info(ipkg.envra)
> +                self.verbose_logger.info("%s %s" % (ipkg.envra,
> +                                                    ipkg.ui_from_repo))
>              try:
>                  pkg = self.returnPackageByDep(arg)
>              except yum.Errors.YumBaseError:
> @@ -1410,7 +1411,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
>                      self.logger.critical(_('No Package Found for %s'), arg)
>              else:
>                  if not pkg.verEQ(ipkg):
> -                    self.verbose_logger.info(pkg.envra)
> +                    self.verbose_logger.info("%s %s" % (pkg.envra,
> +                                                        pkg.ui_from_repo))
>  
>          return 0, []
>      
> diff --git a/docs/yum.8 b/docs/yum.8
> index 255c755..48d2465 100644
> --- a/docs/yum.8
> +++ b/docs/yum.8
> @@ -52,6 +52,7 @@ gnome\-packagekit application\&.
>  .I \fR * shell [filename]
>  .br
>  .I \fR * resolvedep dep1 [dep2] [\&.\&.\&.] 
> +    (maintained for legacy reasons only - use repoquery or yum provides)
>  .br
>  .I \fR * localinstall rpmfile1 [rpmfile2] [\&.\&.\&.] 
>      (maintained for legacy reasons only - use install)
> @@ -237,12 +238,13 @@ that file is executed in yum shell mode. See \fIyum-shell(8)\fP for more info
>  .IP
>  .IP "\fBresolvedep\fP"
>  Is used to list packages providing the specified dependencies, at most one
> -package is listed per dependency. 
> +package is listed per dependency. This command is maintained for legacy
> +reasons only, use repoquery instead.
>  .IP
>  .IP "\fBlocalinstall\fP"
>  Is used to install a set of local rpm files. If required the enabled 
>  repositories will be used to resolve dependencies. Note that the install command
> -will do a local install, if given a filename. This option is maintained for legacy
> +will do a local install, if given a filename. This command is maintained for legacy
>  reasons only.
>  .IP
>  .IP "\fBlocalupdate\fP"
> @@ -250,7 +252,7 @@ Is used to update the system by specifying local rpm files. Only the specified
>  rpm files of which an older version is already installed will be installed,
>  the remaining specified packages will be ignored.
>  If required the enabled repositories will be used to resolve dependencies. Note
> -that the update command will do a local update, if given a filename. This option is maintained for
> +that the update command will do a local update, if given a filename. This command is maintained for
>  legacy reasons only.
>  .IP
>  .IP "\fBreinstall\fP"
> diff --git a/yumcommands.py b/yumcommands.py
> index 2ab9a28..0f0d29c 100644
> --- a/yumcommands.py
> +++ b/yumcommands.py
> @@ -1414,6 +1414,10 @@ class ResolveDepCommand(YumCommand):
>      resolvedep command.
>      """
>  
> +    def __init__(self):
> +        YumCommand.__init__(self)
> +        self.hidden = True
> +
>      def getNames(self):
>          """Return a list containing the names of this command.  This
>          command can be called from the command line by using any of these names.
> @@ -1434,7 +1438,7 @@ class ResolveDepCommand(YumCommand):
>  
>          :return: a one line summary of this command
>          """
> -        return _("Determine which package provides the given dependency")
> +        return "repoquery --pkgnarrow=all --whatprovides --qf '%{envra} %{ui_from_repo}'"
>  
>      def doCommand(self, base, basecmd, extcmds):
>          """Execute this command.


ACK

-sv




More information about the Yum-devel mailing list