[Yum-devel] rpm --requires and primary.xml <requires>

James Antill james at fedoraproject.org
Thu Apr 30 15:30:50 UTC 2009


On Thu, 2009-04-30 at 17:03 +0200, Florian Festi wrote:
> Seth Vidal wrote:
> > the parser omits them b/c they aren't REAL dependencies. They are added 
> > by rpm to note whether or not the running version of rpm can interact 
> > with the pkgs at all.
> > 
> > But they are not deps that are 'satisfied' in anyway.
> > 
> > either the running version of rpm can do those things or you cannot 
> > continue the transaction.
> > 
> > You can't provide an rpm that can do those things in the transaction 
> > you're attempting to run and have it work.
> > 
> > Since there is no point in looking at them for purposes of depsolving, 
> > then adding those N items to every pkg reqs in the primary.xml was just 
> > a waste of space.
> 
> Sorry, I have to disagree. Yum should check these requirement against the 
> rpm version on the system. IIRC James Antil asked me how to do that some 
> weeks/months ago. Not sure what happened to that project but without the 
> requires in the primary.xml/.sqlite it is unlikely to already work...

 What we discussed was python code to get a list of the rpmlibs that the
_installed_ rpm provides. Which was one of the problems we have, and it
was a significant help point out how to solve there.
 However there are still a number of issues, after discussing it again
with Seth when I found out how to get the list of supported rpmlib deps.
the "best" current solution we could come up with was that it might be
possible to do an "rpmlib deps." phase after the download phase. So yum
would do something like:

1. mark things to install/update/etc. form the cmd line.

2. do depsolving.

3. show result of #2 and get the user to confirm.

4. do downloads

5. ** Now we go through each .rpm file on disk, and check it against the
installed rpmlib deps. ... and reject anything that fails.

6. ** Somehow cleanup the "new" transaction.

7. run the transaction.

...the problem here is that #5 + #6 is altering what was told to the
user at #3, which is a pretty big fail.
 So the only other solution is to error out at #5 and say "these are the
only things which can be processed with the installed version of
rpm" ... but that's a lot of work for a nicer error message.

 A better option is to move #5 to #2.5, but this requires putting all
the rpmlib deps. back into the metadata but we aren't sure how adversely
that will affect runtime etc. (and we have to filter them out in the
right places in the real depsolving).
 This could be extended to only allow "new" rpmlib deps. in, which might
be worth it but would be more work.

 So it's on the TODO list, still, but it's not near the top.

-- 
James Antill <james at fedoraproject.org>
Fedora


More information about the Yum-devel mailing list