Fedora 17’s unified filesystem (/usr-move)

Bill Nottingham notting at redhat.com
Tue Jan 31 20:58:17 UTC 2012


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

%description
Moo

%setup
%build
%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
touch $RPM_BUILD_ROOT%{_bindir}/this-cow-goes-moo

%files
%{_bindir}/*
...

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%]

Yum installs the package as well.

Bill


More information about the devel mailing list