[Yum] help with commandline option naming

csieh csieh at fnal.gov
Thu Apr 17 15:23:00 UTC 2003


On Thu, 17 Apr 2003, seth vidal wrote:

> Hey all,
>  So right now I have the grouplist groupinstall and groupupdate options.
> ok, that's fine - but I need a sensible name when I want to list all the
> pkgs in groupx
> grouplist groupname doesn't work b/c that's sorta already used in
> grouplist for wildcarding and listing only certain groups.

So last week I was looking at what I thought yum still needed in the
shortterm.  I saw that the list group contents was not there yet but on
your todo list.  So I decided to look at writing a little patch to just
show the rpms in a group.  Since I wanted to change as little as possible
I decided to put the code in the "grouplist groupname" area.  Right now if
you do a "yum grouplist "FTP Server"" you get back

FTP Server

.  This is usefull but what I really want to see when I use "yum grouplist
"FTP Server"" is the list of rpms that are part of "FTP Server" .  So my
suggestion is to just use "yum grouplist" in the case of a single group.  
Now my code does it for all of the wildcards.  Some might say this is too
much, and maybe it is, but for me it is ok.  I really like the idea that
in the single case it just gives the rpms too. I guess I am trying to not
have to add more options.  I really like that yum uses "english" options
vs "-" options as the less options the better.  

The patch that I wrote to do this is 4 lines of python code.  Patch
included.  I only wrote it because it was on the todo list and I did not
know the timeframe of this feature.

 > > so what should it be called?
> yum packagelist groupname groupname groupname?
> or 
> yum packagesingroup groupname groupname groupname 
> someone help come up with a name that seems common sense-ish.

yum grouplist <groupname>

> -sv
> _______________________________________________
> Yum mailing list
> Yum at lists.dulug.duke.edu
> https://lists.dulug.duke.edu/mailman/listinfo/yum

Connie Sieh
Fermi National Accelerator Laboratory
-------------- next part --------------
>From root at yort.fnal.gov Thu Apr 17 10:16:06 2003
Date: Wed, 09 Apr 2003 14:04:42 -0500
From: root <root at yort.fnal.gov>
To: csieh at fnal.gov

*** pkgaction.py	2003-04-07 00:31:58.000000000 -0500
--- pkgaction.py.cjs	2003-04-09 14:00:36.000000000 -0500
*** 24,30 ****
  import rpmUtils
  from i18n import _
  def installpkgs(tsnevral, nulist, userlist, hinevral, rpmnevral, exitoninstalled):
      #get the list of pkgs you want to install from userlist
      #check to see if they are already installed - if they are try to upgrade them
--- 24,29 ----
*** 341,346 ****
--- 340,349 ----
                      grpid = GroupInfo.group_by_name[group]
                      log(4, '%s - %s' % (grpid, group))
                      print '   %s' % group
+         	    pkglist = GroupInfo.pkgTree(group)
+                   pkglist.sort()
+             	    for pkg in pkglist:
+ 		       print '           %s' % pkg 
  def whatprovides(usereq, nulist, nevral, localrpmdb):

More information about the Yum mailing list