Subject: CVS commit: pkgsrc/mk
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 01/28/2005 07:37:55
Module Name:	pkgsrc
Committed By:	jlam
Date:		Fri Jan 28 07:37:55 UTC 2005

Modified Files:
	pkgsrc/mk: bsd.pkg.install.mk
	pkgsrc/mk/install: deinstall header install
Added Files:
	pkgsrc/mk/install: usergroup

Log Message:
Continue with install script cleanup -- we now create a +USERGROUP
script that is unpacked by the +INSTALL script at PRE-INSTALL time
before any other actions take place, and invoke +USERGROUP to create
any necessary users and groups.  Remove the now-unused code for
PKG_USERS and PKG_GROUPS from the install and deinstall templates.

We also reference count the users and groups and store the reference
counts in ${PKG_DBDIR}/.refcount/{users,groups}.  This allows multiple
packages to register that they use same users and groups, and allows
+USERGROUP to be invoked at any time to repair an installed package.

Also fix the install and deinstall templates to invoke the CHECK-*
actions with ${PKG_METADATA_DIR} so that the correct PKGNAME can be
derived.  This fixes the weird messages asking the user to create
directories for ".pkgdb" during a "make install".


To generate a diff of this commit:
cvs rdiff -r1.73 -r1.74 pkgsrc/mk/bsd.pkg.install.mk
cvs rdiff -r1.30 -r1.31 pkgsrc/mk/install/deinstall
cvs rdiff -r1.28 -r1.29 pkgsrc/mk/install/header
cvs rdiff -r1.34 -r1.35 pkgsrc/mk/install/install
cvs rdiff -r0 -r1.1 pkgsrc/mk/install/usergroup

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.