Re: Supported Linux Versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Apr 19, 2007, at 12:52 PM, Leland Ray wrote:

For example, don't hard coded paths to /bin/basename
or
/usr/bin/grep and others in scripts and other places.
(Why do people feel the need to do that?

Unfortunately, no accepted standard that I am aware of
maps installed utilities to rpm capabilities.

This makes life difficult for a package developer.
Here is an example.

My %post requires tar. How can I require it?

Requires: rpm-that-contains-tar

Obviously, that dog won't hunt.

But, the FHS says that tar must be present in /bin/tar
if it is installed, thus I can do:

Requires: /bin/tar

Now, you might ask -- who in their right mind wouldn't
have installed tar? One answer is that my rpms are
often installed during initial installation, and yum
(hence, anaconda) loves to install things as early as
possible. I have had cases in practice where my rpm is
installed before these utilities.

It would really make life easier if 1) I had a
standard that mapped utilities to rpm capabilities,
and 2) I had a way to query the prefix of a
relocatable installed package in the event the utility
I need in a scriptlet is not expected to be on the
normal PATH.


As long as LSB forbids all dependencies (presumably what you mean
by capabilities) in packaging *EXCEPT*

    Requires: lsb

well, your reasonable suggestion 1) is implcit in LSB standards.

As for 2), rpm queries can be run to find a (possibly relocated) package, but I suggest the exercise will be extremely unpleasant. E.g. what if there are
4 or 5 .../tar executables found?

FWIW, rpm-4.4.9 has the ability to specify a dependency that is
the equivalent of asking
    Is there a tar executable on PATH?
as
    Requires: executable(tar)

Note that the probe dependency mechanism is sufficiently
general to test all access(2) conditions: F_OK, X_OK, R_OK, W_OK,
when installing, not by looking up an rpmdb entry, for any path.

73 de Jeff

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux