Subject: CVS commit: pkgsrc
To: None <source-changes@netbsd.org>
From: Jim Wise <jwise@netbsd.org>
List: source-changes
Date: 01/29/2001 03:56:52
Module Name:	pkgsrc
Committed By:	jwise
Date:		Mon Jan 29 01:56:52 UTC 2001

Modified Files:
	pkgsrc/mk: bsd.pkg.mk

Log Message:
As per discussion on tech-pkg, correct behavior of `make package' in the
case where DESTDIR is set.

Previously, if DESTDIR was set when a pkg was installed, $DESTDIR/var/db/pkg/+CONTENT
would get `@cwd $DESTDIR/$PREFIX', as would the +CONTENT archived in the
binary package.  The first is correct, the second is not.

Now, @cwd in the +CONTENT recorded in the binary package gets $PREFIX (no $DESTDIR).
This allows binary packages built into a DESTDIR to be installed on a
real system.  The @cwd in the installed PKG_DBDIR ($DESTDIR/var/db/pkg)
remains the same.

In addition, the full path ($DESTDIR/$PREFIX) is recorded in @src in the
binary package's +CONTENT, for reference purposes.

This patch is the same as that posted to tech-pkg, except that variable
names have been clarified as suggested by hubertf.


To generate a diff of this commit:
cvs rdiff -r1.652 -r1.653 pkgsrc/mk/bsd.pkg.mk

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