[Yum] pkg groups

Michael Stenner mstenner at phy.duke.edu
Fri Jun 14 14:12:18 UTC 2002

On Fri, Jun 14, 2002 at 12:03:00AM -0400, seth vidal wrote:
> Hi all,
>  Running into a conceptual snag with pkg groups I wanted to probe the
> list about.
> so I first thought that using the red hat comps format would be
> common/familiar and expandable enough for most people.
> Then I looked in more detail at the problem of conditional pkgs.
< snip >
> in this example - if the group conditionalgroup is tagged to be
> installed then also install pkga, pkgb and pkgc
> That works great in anaconda b/c it knows which groups are tagged as
> installed.
> Doesn't work so well when there is no group-state being maintained.
> So the options are:
> 1. maintain state on group selections 
>  - this breaks badly when first starting up - how will it know which
> groups you selected in anaconda?
>  - this breaks b/c groups have no hold over what gets erased and
> therefore you could intentionally remove a pkg you don't want but have
> it get added back in b/c of a group dependency.
> 2. don't maintain state and use the groups solely as pkg lists, ignore
> conditionals entirely.
>  - thats just irritating to the user who knows that yum reads the comps
> file but only _mostly.

I like this best.  It would be important to advertise clearly that
while the comps file is read, not all of the info therein can be
used.  This seems to be the cleanest now (not adding a new file and
file format) and the cleanest in the future, when you might be able to
add in the desired functionality.

If you want to move in the direction of (1), you might ask the nice
anaconda people (whoever they might be) if they'd be nice enough to
write the group-state info somewhere.   You would then have to define
how to deal with the second problem in #1.  I can think of several
options, possibly with a config option to choose:

  What happens when you remove a package from an installed group.

  a) will yum do it?  or must you use rpm?

  b) if yum does it (or sees that it was done), will it later
     reinstall the package, or will it remove the group-installed tag
     (leaving the other packages normally installed)

  c) if you yum remove a group that's not installed, will it still try
     to remove any packages that are in that group?  (you probably do
     this already)

> 3. don't use the comps format at all, do something else, far simpler as
> install/update groups.
>  like:
>   group name
>       pkgname
>       pkgname
>       pkgname
>  group name
>      pkgname
>      pkgname
> and just have them be sucked in by python in some way.
> part 2 of the problem:
> how to deal with groups on multiple repositories.
> if I'm trying to install group "foo" and both server1 and server2 have a
> group foo which do I choose.
> there would be no way to determine who had the newest foo so we could
> just use "last in wins" as the rule. That could cause some issues - but
> you should know what groups etc your repositories are providing, right?
> :)

I like last-in. It's easy and it's sensible.  Frankly, I don't see
many alternatives.  You might consider using your full might as
yum-god to encourage repository admins to adopt some convention to
avoid collisions when sensible.  For example, I could see a
"dulug-math" group on the duke-only dulug repository, and then a
"phy-math" one for physics.  Just a thought.

  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner at phy.duke.edu
  Box 90305, Durham N.C. 27708-0305

More information about the Yum mailing list