Subject: Re: CVS commit: pkgsrc/mk/install
To: None <pkgsrc-changes@NetBSD.org>
From: Roland Illig <rillig@NetBSD.org>
List: pkgsrc-changes
Date: 11/05/2006 18:55:23
Joerg Sonnenberger wrote:
> On Sat, Nov 04, 2006 at 07:42:51AM +0000, Roland Illig wrote:
> 
>>Module Name:	pkgsrc
>>Committed By:	rillig
>>Date:		Sat Nov  4 07:42:51 UTC 2006
>>
>>Modified Files:
>>	pkgsrc/mk/install: bsd.install-vars.mk install.mk
>>
>>Log Message:
>>When a package sets INSTALLATION_DIRS_FROM_PLIST to "yes", it does not
>>need to specify INSTALLATION_DIRS itself. Instead, the list is generated
>>from the static PLIST files. Like for INSTALLATION_DIRS, mtree is
>>disabled when this variable is set.
> 
> 
> I don't like it. IMO this can be considered a recursive dependency as it
> won't help when creating a new package or updating one with changing
> directory list.

That may be the case for _some_ packages. Assuming that most packages 
only have "bin" and "man/*" in that list, they will usually find these 
directories precreated when the packages are installed for the first 
time, with an empty PLIST.

Another effect is that an error message is printed whenever something 
that should be a directory already exists as a file. Before, one had to 
wait until the check-files target caught that error. Now, the error 
message is as clear as possible.

> The list of entries in INSTALLATION_DIRS is typically
> short enough as well, so the new variable is often even longer...

It depends. I had been annoyed by writing ${PKGMANDIR}/man1 instead of 
man/man1, for example. That is converted automatically now.

Another benefit is that many packages will only need the same definition 
(INSTALLATION_DIRS_FROM_PLIST=yes) instead of slightly different ones 
(INSTALLATION_DIRS=...).

Using this variable, it is also possible to eliminate many of the 
${INSTALL_*_DIR} commands in self-written do-install targets. Taking all 
these reasons into account, it felt quite good to me.

Roland