On Tue, 2012-01-31 at 10:52 -0500, Bill Nottingham wrote:
Bill Nottingham (notting(a)redhat.com) said:
> Miloslav Trmač (mitr(a)volny.cz) said:
> > On Tue, Jan 31, 2012 at 1:06 AM, Martin Langhoff
> > <martin.langhoff(a)gmail.com> wrote:
> > >> But you can add:
> > >>
> > >> Provides: /bin/foo
> > >
> > > Ugh! Will that be needed that across the distro for a release or two?
> >
> >
http://pkgs.fedoraproject.org/gitweb/?p=coreutils.git;a=commitdiff;h=0922...
>
> That should not be needed.
To be precise:
[root@nostromo ~]# mv /bin /cow
[root@nostromo ~]# /cow/ln -s /cow /bin
[root@nostromo ~]# rpm -qf /cow/bash
bash-4.2.20-1.fc16.x86_64
[root@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.
http://james.fedorapeople.org/yum/sym1.spec
http://james.fedorapeople.org/yum/sym2.spec
...you _cannot_ install these packages, even via. local only rpm.
Also, even if someone could fix rpm to work this out, making this work
at the yum layer is _much_ harder ... because the repodata does not
currently specify that /path/to/blah is a regular file or a symlink (and
if it's a symlink, what it points to).
So the coreutils provides _are needed_ (along with all others), or the
coreutils package has to "lie" and say it is installing the packages
into a dir. /bin.