No subject
Mon Jun 18 16:48:03 UTC 2012
A) A local package's configure script executes "which perl", and puts that
into each perl script's hashbang. So:
[root at octopus ~]# which perl
/bin/perl
This results in:
#! /bin/perl
B) The rpm package gets built. find-requires that puts this dependency into
the package:
requires=/bin/perl
C) At install time, rpm seems to be smart to figure this out:
[root at octopus ~]# rpm -q --whatprovides /bin/perl
perl-5.14.2-211.fc17.x86_64
It's smart enough sees that thanks to the symlinks, /bin/perl=/usr/bin/perl.
So the package gets installed, with these hashbangs.
D) A perl update hits:
[root at shorty x86_64]# rpm -q -l -p perl-5.14.2-212.fc17.x86_64.rpm | fgrep
bin/perl
/usr/bin/perl
/usr/bin/perl5.14.2
/usr/bin/perlbug
/usr/bin/perlthanks
The new perl package contains /usr/bin/perl. At upgrade, dependency
resolution is not smart enough to realize that the new package's
/bin/perl=/usr/bin/perl, causing a conflict.
Having thought about it, I don't think it's unreasonable to do a "which
$PROG", and stick it into the hashbang. I think that's a perfectly
reasonable approach, with portability being the goal. The problem I see
here, is that Fedora's bash is compiled with the default PATH placing a
symlink, /bin, ahead of /usr/bin, in the PATH list:
[root at octopus ~]# strings /bin/bash | grep usr.bin
/usr/local/bin:/bin:/usr/bin
I think that bash needs to be recompiled, with the last two flipped, in the
default shell PATH.
Until then, I need to hack each one of my locally-built package's rpm spec
scripts, and manually prepend /usr/bin to the PATH. Which sucks.
--=_monster.email-scan.com-32270-1340334909-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEABECAAYFAk/j4z0ACgkQx9p3GYHlUOLHlwCdHCycmIdcoG3dyptB4gyyHgkn
zAoAnRY3pEPX/kfUnxHu1ujmXptnZGqT
=yO35
-----END PGP SIGNATURE-----
--=_monster.email-scan.com-32270-1340334909-0001--
More information about the devel
mailing list