RPM Community Forums

Mailing List Message of <rpm-users>

Re: How does bash-provides work?

From: Eric MSP Veith <eveith@wwweb-library.net>
Date: Mon 16 Jul 2007 - 22:10:42 CEST
Message-Id: <200707162210.46338.eveith@wwweb-library.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

On Monday 16 July 2007, Jeff Johnson <n3npq@mac.com> wrote:
> > Is there any way to automatically create a list of exectuable() and
> > function()
> > provides?
>
> Depends on what you are expecting.

I'm expecting that RPM does not complain about functions provided or binaries 
that *are* installed. :-) For example, all packages using /bin/rm in a shell 
script complain that "executable(rm)" is not provided, however, I have the 
coreutils package installed, and this one for sure does have a /bin/rm 
executable. 

It does not matter to me whether those "executable(foo)" lines are generated 
at build or install time.

> The set
> 	Provides: executable(...)
> is exactly the files with executable bit set found in directories
> included in PATH.

The "/bin/rm" binary is in path, as one excpetcs.

You explained that "executable(rm)", for example, is added as an requirement 
at build time, but found provided at install time, likewise 
the "function(blather)" namespace, right? The sad thing is, that this does 
not work for me.

I'm currently building "rottlog", a logrotate replacement from GNU.org. It is 
a shell script, so this is a good place to watch generation of requirements. 
rpmdeps -R correctly generates them, for example:

$ echo /usr/bin/rottlog | /usr/lib/rpm/rpmdeps -R
(...)
executable(rm)
executable(sed)
(...)
function(is_quoted)
function(is_readable)

This first thing that fails are the "function()" lines, because rottlog 
provides those methods itself. But when installing, RPM complains 
that "function(is_quoted)" is not provided by any package. Similary it goes 
with "executable(rm)": /bin/rm comes from the installed "coreutils" package, 
but rpm still complains. Also, when examining the package 
via "rpm -q --provides", I don't get any "executable(foo)" line:

$ rpm -q --provides coreutils
coreutils = 6.7-1.2ev

Once again, I have no clue where to start looking for the error, but I'm 
thankful for any hint. :-)

	Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGm9DCfkUtd7QNU/sRAgnhAKC0vi+kyXgycBkikkCxb6QD6BIKQACgoYQU
haYSVtSwqsfp+xmlz3ICW18=
=8xTm
-----END PGP SIGNATURE-----
Received on Mon Jul 16 22:10:49 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.