[Rpm-maint] Fedora 17’s unified filesystem (/usr-move)

James Antill james at fedoraproject.org
Tue Jan 31 21:30:27 UTC 2012


On Tue, 2012-01-31 at 15:58 -0500, Bill Nottingham wrote:
> James Antill (james at fedoraproject.org) said: 
> > > [root at nostromo ~]# mv /bin /cow
> > > [root at nostromo ~]# /cow/ln -s /cow /bin
> > > [root at nostromo ~]# rpm -qf /cow/bash
> > > bash-4.2.20-1.fc16.x86_64
> > > [root at nostromo ~]# rpm -qf /bin/bash
> > > bash-4.2.20-1.fc16.x86_64
> > > 
> > > rpm should already handle this, no need for the provides.
> > 
> >  Good to see everyone still doesn't read what I write.
> > 
> >  As I said, rpm _does something_ to make the above work for -qf (the
> > above even works if you inside /cow ... as long as the /bin symlink
> > exists!).
> >  However, it _does not_ work, if you put the above in package
> > provides/requires and try to install them. Eg.
> 
> It does, in some cases. Which makes it even more fun.
> 
> Take a system with /usr/bin/sdiff.
> 
> ...
> Name: cow
> Summary: cow
> Version: 1.0
> Release: 1
> URL: http://redhat.com/
> License: Moo
> Requires: /bin/sdiff
> ...
> 
> root at nostromo x86_64]# rpm -ivh cow-1.0-1.x86_64.rpm --test
> error: Failed dependencies:
> 	/bin/sdiff is needed by cow-1.0-1.x86_64
> [root at nostromo x86_64]# mv /bin /cow
> [root at nostromo x86_64]# /cow/ln /usr/bin -s /bin
> [root at nostromo x86_64]# /cow/rpm -ivh cow-1.0-1.x86_64.rpm  --test
> Preparing...                ########################################### [100%]

 IMO this is pretty crazy, because by changing the symlink back you've
broken the prco constraints in the DB (but everything would verify as
"correct").
 It also seems like rpm is doing a _lot_ of work it doesn't need to do
here, but who knows ... it looks pretty magic (and I'm scared to go find
out why/how it's doing the above :).

 Cc'ing rpm maintainers for their opinion on what rpm is doing and why.

> Yum installs the package as well.

 Yeh, if it asks rpm if something is installed which satisfies that and
is told yes, it will. However ... yum currently caches file
requires/providers from rpm (among other things).
 So it's very possible that yum doesn't "DTRT" when it has cached data
saying diffutils owns /usr/bin/sdiff and not /bin/sdiff (but it might,
because it's a negative failure).

 In general I think only a huge amount of pain can come from relying on
this (and you can't install into this situation, easily).



More information about the Rpm-maint mailing list