PATH=/usr/local/bin:/bin:/usr/bin considered harmful

Andrew Haley aph at redhat.com
Fri Jun 22 11:26:57 UTC 2012


On 06/22/2012 12:10 PM, Reindl Harald wrote:
> 
> Am 22.06.2012 13:07, schrieb Andrew Haley:
>> On 06/22/2012 11:44 AM, Sam Varshavchik wrote:
>>> Andrew Haley writes:
>>> 
>>>> On 06/22/2012 04:15 AM, Sam Varshavchik wrote:
>>>>> 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.
>>>> 
>>>> What exactly is the conflict?
>>> 
>>> See the error from yum/rpm, that I posted.
>> 
>> Oh, sorry, I tend to interpret "conflict" as meaning a conflict with another file, not a missing dependency.
>> 
>> It seems to me that yum/rpm should know what package provides /bin/perl.  This surely makes vastly more sense than changing default paths, which is just papering over the cracks
> 
> since /bin and /sbin are now gone it is completly wrong have them in the PATH and use them hardcoded in packages like GLIBC as also in any other package with "Provides"

But we can't prevent them from being in the PATH, can we?  All sorts
of upstream packages might hard-code /bin:/usr/bin

Why not take /bin and /sbin out of the default path *and* make sure
that RPM knows about /bin/* ?

> this is a bug because incomplete UsrMove

Andrew.


More information about the devel mailing list