RPM Community Forums

Mailing List Message of <rpm-users>

Re: How does bash-provides work?

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 16 Jul 2007 - 22:21:22 CEST
Message-Id: <65E47448-D6B9-4C2D-8B14-C12BDB055BFB@mac.com>
Hash: SHA1

On Jul 16, 2007, at 4:10 PM, Eric MSP Veith wrote:

> 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.

What versions of rpm are involved? It sounds like you are using  
(or later) to build with executabledeps.sh enabled, but are expecting
an older version of rpm to be able to satisfy
     Requires: executable(foo)

That ain;'t going to work, disable executabledeps is the solution.

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

Heh. Doesn't matter to me either ;-)

>> 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. :-)

You're likely in uncharted and not-yet-implemented waters with  
on shell functions. I've never implemented a function(...) mechanism  
in rpm.

If you give me a ptr to the rotlog package you are building, I'll  
make sure
that the function(...) dependencies are filtered out.

Basically adding ... | grep 'executable\(' to executabledeps.sh is  
all that I'm
going to add.

73 de Jeff
Version: GnuPG v1.4.1 (Darwin)

Received on Mon Jul 16 22:21:38 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.