[Yum-devel] group DB
James Antill
james at fedoraproject.org
Tue Dec 21 17:51:34 UTC 2010
On Fri, 2009-05-22 at 18:12 -0400, James Antill wrote:
> Some thoughts about group DB (having groups as real objects). I mainly
> wrote this for me, to see if "group DB" was actually possible. I think
> so :).
>
> I think the "big" issue people want to change is that given:
>
> yum install blah-package-in-KDE-group
> yum groupinstall KDE
> yum groupremove KDE
>
> ...you have blah left at the end. The other desire is that given:
>
> yum groupinstall KDE
> yum remove blah-package-in-KDE-group
> yum groupupdate KDE
>
> ...you don't have blah added at the end. The last interesting feature is
> that given:
>
> yum groupinstall KDE
> # packages added to group KDE
> yum update
>
> ...you have the new KDE packages.
Blah, it's been way too long and this first attempt mostly seems to
work.
What this patch does:
1. Stores a list of installed group id's, but only ID's ... we don't try
to store the 666 names.
2. Stores a list of all package names we've seen belonging to each
groupid.
3. In the yumdb we store a single (yes, single, see point #1 above)
group id that an installed package can be a "member" of (and we copy
that on upgrades).
4. Add a "groups" sub-command, add a few sub-sub-commands to help with
testing (and probably deployment).
5. Changes "group install/remove/list/info" to use the "installed" data.
6. Changes "upgrade" to also upgrade groups (install new members, #3
above).
...this is, in theory, configurable through self.conf.groups_are_real
but I haven't tested the old code still does the same thing and other
stuff is not exactlly 100% tested, but it was testable by me.
Patch is here:
http://james.fedorapeople.org/yum/patches/groups-are-real.patch
Comments welcome, I'm sure this won't be the magical pony everyone
wants and the switch will be a PITA. But hopefully it's closer, and it
will solve things like 647493.
More information about the Yum-devel
mailing list