Subject: Re: what to do about CHECK_INTERPRETER=yes results?
To: None <pkgsrc-users@NetBSD.org>
From: Klaus Heinz <k.heinz.jun.sechs@onlinehome.de>
List: pkgsrc-users
Date: 06/29/2006 13:02:16
Johnny Lam wrote:

> The right way to do this now is USE_TOOLS+=bash:run, so that platforms 
> that already have bash won't pull in the dependency.  Also, you will 
> need to add the appropriate REPLACE_INTERPRETER code to the package 
> Makefile -- see graphics/netbpm/Makefile for a working example.

It was not really the technical side of how to use REPLACE_INTERPRETER I
was asking about.

A more concrete example may show the point better. The script
create_webpage.sh looks like this:

========================================
#!/bin/bash
#
...
rrd_dir="/some/dir/rrd"


# Full path to the rrdcgi executable.
rrdcgi=/usr/local/bin/rrdcgi

# Where should rrdcgi store the graphs? This path must be within the
# document root and writable by the webserver user.
img_dir=/usr/local/apache2/htdocs/images/graphs

# Where will the graphs show up on the webserver?
web_dir=/images/graphs
========================================

I would not like to require databases/rrdtool or even www/apache2 for
ipmitool only because a script included in the ipmitool package needs
this software to be useful. Why should this be different for bash?

To use the scripts, the user has to edit the files and set some
variables to their correct values. Because of this fact I regard those
scripts more as examples on how to use ipmitool than as ready-made
scripts the user can expect to use right out of the box.

Maybe a better solution would be to move the scripts to
share/examples/ipmitool instead of share/ipmitool but this would
probably _not_ shut up the tests from mk/check/check-files.mk...


ciao
     Klaus