tech-pkg archive

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

Re: pkgsrc RC scripts



On Mon, Oct 19, 2009 at 03:13:14PM +1300, Steven Drake wrote:
> So heres the code. The first patch to pkg_install passes anything that 
> looks like a variable in pkg_install.conf to the environment of any 
> sub processes.  

I dislike this a lot. Pushing down a random amount of variables is the
wrong approach, IMO. This is also violating a number of constraints:
(1) It overrides mk.conf, so it changes existing behavior.
(2) It parses variables differently than the internal use.
(3) No changes to the ignore / keep white space without proper
discussion, please.

> I've noted that some of the script templates in pkgsrc/mk/pkginstall are 
> already setup to use varialbles passed to them, i.e.:
> PKG_CREATE_USERGROUP, PKG_CONFIG, PKG_CONFIG_PERMS, PKG_RCD_SCRIPTS,
> PKG_UPDATE_FONTS_DB, FONTS_VERBOSE, INFO_FILES_VERBOSE, PKG_REGISTER_SHELLS.

Exactly, as that is the way it gets the data from mk.conf too. If
anything, it should query the variables explicitly, IMO.

> The second patch to files in pkgsrc/mk/ adds RCD_SCRIPTS_DIR and
> RC_SUBR_DIR to the variables the +FILES script uses as well as code to
> modify the rcd scripts when they are installed to RCD_SCRIPTS_DIR.

I don't like this either. If RC scripts should be special cased, it
should be done properly. Copying should warn if a script of that name
already exists for RC files. It might also be nice to setup a rc.conf.d
entry, but that's a more involved question. It should definitely not be
mangled into the existing logic when the behavior is different.

Joerg


Home | Main Index | Thread Index | Old Index