[Yum-devel] RFC: Grouplist percentage installed, in verbose mode

James Antill james.antill at redhat.com
Thu Jun 12 16:20:05 UTC 2008


On Thu, 2008-06-12 at 09:54 +0200, Tim Lauridsen wrote:
> James Antill wrote:
> >  So this is something I wrote during the Fed-9 freeze so that you could
> > easily see what was meant by a group being installed/not-installed.
> > 
> >  Example output is (without verbose mode output is identical):
> > 
> > % yum grouplist -v
> > [...]
> > Installed Groups:
> >    Group name                   Core  Def  Opt Cond
> >    Administration Tools       :       72%   6%     
> >    Authoring and Publishing   :       44%   5%     
> >    DNS Name Server            : 100%   0%   0%     
> > [...]
> > Available Groups:
> >    Group name                   Core  Def  Opt Cond
> >    Clustering                 :        0%   0%     
> >    Educational Software       :             0%   0%
> >    Fedora Packager            :  90%               
> > 
> > ...patch is at:
> > 
> > http://people.redhat.com/jantill/yum/patches/group-pc.patch
> > 
> > ...anyone think this is crack? Can anyone think of a better thing to
> > output?
> > 
> 
> I have no problem with this patch, but it is hard for me to see where 
> this feature is useful.
> That does
> 
>  > Installed Groups:
>  >    Group name                   Core  Def  Opt Cond
>  >    Administration Tools       :       72%   6%     '
> 
> this tell me ?, i just get confused, if a group is installed then all 
> mandatory (core) + default should be installed , so why is only "72%" 
> installed ?.

 Because that's not how "installed" is worked out, which almost noone
knows (including the developers :).
 The algorithm is:

1. If the group has mandatory packages, then if all of them are
installed ... the group is installed.

2. If the group does not have mandatory pacakges, then if any package in
default; optional; or conditional is installed ... the group is
installed.

...I initially wrote it after reading one too many people complain about
"groupinstall followed by groupremove" not ending up where you started,
as people had this idea that groupinstall actually installed a group
object in some way.
 So my idea was to expand grouplist/groupinfo to show them as
"collections" of packages, and not entities in themselves.

> And generally does percentage dont tell you much, if you don't what it 
> refers to.
> 
> 50% of 2 apples is better than "apples 50%".
> 
> maybe it better to use 10/20 (packages) than to use 50%.

 Right, that's a valid point ... the advantage of percentage is that
it's a fixed width value, so it's less work to line things up easily :)

 I have a separate patch which basically gives groupinfo pacakgename
output in simpleList() format, when you specify -v ... so that you can
more easily see what the percentage means.
 I can try converting grouplist to x/y type output if people think
that'd be better though?

-- 
James Antill <james.antill at redhat.com>
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080612/067af9a9/attachment.pgp 


More information about the Yum-devel mailing list