diff options
author | jlam <jlam@pkgsrc.org> | 2003-08-26 21:52:09 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-08-26 21:52:09 +0000 |
commit | 27bad764952c2d22b8638d883207522ff3dcc3c1 (patch) | |
tree | 9e918ebdec1e2149c411533a51047b01975f4cda | |
parent | 450cef9767cb7b6237cfc6820d436b639763a2f4 (diff) | |
download | pkgsrc-27bad764952c2d22b8638d883207522ff3dcc3c1.tar.gz |
Move the PKG_INSTALLATION_TYPE and _PKG_DBDIR definitions into
bsd.prefs.mk so that PKG_{INFO,ADD,ADMIN,etc.} all use the correct
package database directory and are set correctly before bsd.pkg.mk is
included. This is needed since some buildlink2.mk files use these
variables in != variable settings, and the buildlink2.mk files are included
before bsd.pkg.mk.
As a side effect of this change, we now require PKG_INSTALLATION_TYPE to be
defined *before* bsd.prefs.mk is included, so stick the definition near the
top of package Makefile.
-rw-r--r-- | mk/bsd.pkg.mk | 15 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 18 |
2 files changed, 19 insertions, 14 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 023debd6192..f704f952d19 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1216.2.34 2003/08/26 00:14:31 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1216.2.35 2003/08/26 21:52:09 jlam Exp $ # # This file is in the public domain. # @@ -87,11 +87,6 @@ _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} INTERACTIVE_STAGE?= none -# The style of installation to be performed for the package. -# Possible: overwrite, pkgviews -# -PKG_INSTALLATION_TYPE?= overwrite - # PKG_INSTALLATION_TYPE can only be one of two values: "pkgviews" or # "overwrite". # @@ -185,13 +180,7 @@ NO_MTREE= yes PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty." .endif -# _PKG_DBDIR is the actual packages database directory where we register -# packages. -# -.if ${PKG_INSTALLATION_TYPE} == "overwrite" -_PKG_DBDIR= ${PKG_DBDIR} -.elif ${PKG_INSTALLATION_TYPE} == "pkgviews" -_PKG_DBDIR= ${DEPOTBASE} +.if ${PKG_INSTALLATION_TYPE} == "pkgviews" # # _PLIST_IGNORE_FILES basically mirrors the list of ignored files found # in pkg_views(1). It's used by the dynamic PLIST generator to skip diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 68a38677748..e104db9b389 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.118.2.13 2003/08/25 19:37:47 jlam Exp $ +# $NetBSD: bsd.prefs.mk,v 1.118.2.14 2003/08/26 21:52:10 jlam Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -279,9 +279,25 @@ DIGEST_VERSION!= ${DIGEST} -V 2>/dev/null MAKEFLAGS+= DIGEST_VERSION="${DIGEST_VERSION}" .endif +# The style of installation to be performed for the package. +# Possible: overwrite, pkgviews +# +# NOTE: PKG_INSTALLATION_TYPE should be set *before* including bsd.prefs.mk. +# +PKG_INSTALLATION_TYPE?= overwrite + # This is the package database directory for the default view. PKG_DBDIR?= ${DESTDIR}/var/db/pkg +# _PKG_DBDIR is the actual packages database directory where we register +# packages. +# +.if ${PKG_INSTALLATION_TYPE} == "overwrite" +_PKG_DBDIR= ${PKG_DBDIR} +.elif ${PKG_INSTALLATION_TYPE} == "pkgviews" +_PKG_DBDIR= ${DEPOTBASE} +.endif + PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create |