[Yum] Patches to backport yum2
javier at rediris.es
javier at rediris.es
Fri Dec 26 11:16:53 UTC 2003
> > for a couple of weeks, and no problems have arised, except that groups
> > capabilities do not work (yet).
> The groups are going to be very tricky b/c last I checked libxml2 and
> python < 2.X don't get along.
Well, as far as yum v1 does not support groups, it is not a big loss to use
the bacported version on systemas where only v1 is usable. In any case, just
hours after I post the patches, I made the first attempt with groups, and it
worked surprisingly well. Basically, it is just enough to make GroupHierarchy
inherit from UserDict class, which is the python 1 wrapper for dictionaries.
The only trick is that although my box is a nearly pure rh 7.2, I used the
libxml packages from rh7.3, as the 7.2 ones didn't include libxml2-python.
After a couple of weeks I expect to be able to make more tests, and I will
submit the patch.
> 2. removing unicode support makes the alternate language possibilities
> in the yumgroups.xml/comps.xml file limiting
I completelly agree. But again, it is better than nothing. In any case, it
is possible to also install python2 packages. Both versions can exist together
(at least on 7.2 boxes) without problems and, in any case, it is much easier
to force upgrading of python than change rpm itself.
> As a possible workaround:
> if you're running yum with python 1.5.X then a test is done and a the
> groups options are removed, so they're never loaded.
That is what I first thought, and what is the best for an 'official' backported
version, commenting not only the module inclussion bat also the usage string
probably other places.
> > At least on my case, it servers as perfect replacement of yum v1, and it might
> > help to 'close' the old branch, which is probably not widely used. Any reports
> > or opinions are wellcome.
> I agree it would be nice to close yum v1 by combining the trees. I'm not
> too happy about the comps.py modifications but there may be middle
> ground there.
Tell me any ideas you have. Once I have realized that groups are available on
the backported version, I see the closing of the v1 branch more appealing.
I think that unfortunatelly comps.py will not get untouched, at least to work
I have one question regarding this. Do really the mandatory/default/optional
strings need unicode support? The very little documentation I've found about
the comps.xml file does not mention them be translatable, and as attribute
values does not seem sensible to translate them.
> A couple of problems: have you tested that after these have been applied
> the tree still works on a fedora core 1 or rhl9 machine? It's not
> obvious to me, so far, that they will. Also what about systems with
> rpm404 instead of just rpm (like rhl 8.0)
I did not see the usefulness of that test. If I'm right, standard yum v2 works
on rh 8.0, 9 and fedora, so I don't see why anybody would need to use v1 in such
cases. Unfortunately, I have no access to a rh 8.0 box, but theoretically the
rpm404 module should behave as in pre-8 versions, and my patches should work.
And for rh 9 and later, I'm sure that my patches make yum crash, as the rpm API
(and so the python module) completelly differs from rpm 4.0 to rpm 4.2.
My patches should only work in those places where you can use yum v1 without
I made this work because of our servers run immunix (a secured redhat version),
and the latest version (not very old) is based on RH 7.3. And our repository
lives on a solaris machine, where rpm is only used to index packages.
More information about the Yum