summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-04-19 16:52:03 +0000
committerjoerg <joerg@pkgsrc.org>2007-04-19 16:52:03 +0000
commit5ca4038017cc380722765a9c4226bd7de9644686 (patch)
tree522a1399477a7fbf0f417902a2910554a34c5a67 /mk
parent9ddc172df04444c19964ffb79d5f5fe9d84b52d2 (diff)
downloadpkgsrc-5ca4038017cc380722765a9c4226bd7de9644686.tar.gz
Drop NO_MTREE by making it the default. Introduce USE_MTREE to get the
old behaviour back. Discussed on tech-pkg@.
Diffstat (limited to 'mk')
-rw-r--r--mk/flavor/pkg/metadata.mk10
-rw-r--r--mk/install/bsd.install-vars.mk32
-rw-r--r--mk/install/install.mk4
-rw-r--r--mk/unprivileged.mk6
4 files changed, 13 insertions, 39 deletions
diff --git a/mk/flavor/pkg/metadata.mk b/mk/flavor/pkg/metadata.mk
index bf69f691824..e6c3b530f3e 100644
--- a/mk/flavor/pkg/metadata.mk
+++ b/mk/flavor/pkg/metadata.mk
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.17 2007/03/14 16:23:48 joerg Exp $
+# $NetBSD: metadata.mk,v 1.18 2007/04/19 16:52:03 joerg Exp $
######################################################################
### The targets below are all PRIVATE.
@@ -326,7 +326,9 @@ _PKG_CREATE_ARGS+= -c ${_COMMENT_FILE}
_PKG_CREATE_ARGS+= ${_MESSAGE_FILE:D -D ${_MESSAGE_FILE}}
_PKG_CREATE_ARGS+= -d ${_DESCR_FILE}
_PKG_CREATE_ARGS+= -f ${PLIST}
-_PKG_CREATE_ARGS+= ${NO_MTREE:D:U -m ${_MTREE_FILE}}
+.if defined(USE_MTREE)
+_PKG_CREATE_ARGS+= -m ${_MTREE_FILE}}
+.endif
_PKG_CREATE_ARGS+= ${PKG_PRESERVE:D -n ${_PRESERVE_FILE}}
_PKG_CREATE_ARGS+= -S ${_SIZE_ALL_FILE}
_PKG_CREATE_ARGS+= -s ${_SIZE_PKG_FILE}
@@ -380,7 +382,9 @@ _CONTENTS_TARGETS+= plist
_CONTENTS_TARGETS+= ${_PRESERVE_FILE}
_CONTENTS_TARGETS+= ${_SIZE_ALL_FILE}
_CONTENTS_TARGETS+= ${_SIZE_PKG_FILE}
-_CONTENTS_TARGETS+= ${NO_MTREE:D:U${_MTREE_FILE}}
+.if defined(USE_MTRE)
+_CONTENTS_TARGETS+= ${_MTREE_FILE}
+.endif
${_CONTENTS_FILE}: ${_CONTENTS_TARGETS}
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
diff --git a/mk/install/bsd.install-vars.mk b/mk/install/bsd.install-vars.mk
index 332933ece6a..aee1c14c130 100644
--- a/mk/install/bsd.install-vars.mk
+++ b/mk/install/bsd.install-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install-vars.mk,v 1.5 2006/12/15 20:54:47 joerg Exp $
+# $NetBSD: bsd.install-vars.mk,v 1.6 2007/04/19 16:52:03 joerg Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -12,36 +12,10 @@
# the "real" installation should start.
#
-# If a package sets PKG_DESTDIR_SUPPORT to a non-empty value,
-# it is supposed to deal with missing directories already.
-#
-.if !empty(PKG_DESTDIR_SUPPORT)
-NO_MTREE= yes
-.endif
-
-# If a package sets INSTALLATION_DIRS, then it's known to pre-create
-# all of the directories that it needs at install-time, so we don't need
-# mtree to do it for us.
-#
-.if defined(INSTALLATION_DIRS) && !empty(INSTALLATION_DIRS)
-NO_MTREE= yes
-.endif
-
-INSTALLATION_DIRS_FROM_PLIST?= no
-.if !empty(INSTALLATION_DIRS_FROM_PLIST:M[Yy][Ee][Ss])
-NO_MTREE= yes
+.if defined(USE_MTREE)
+USE_TOOLS+= mtree:bootstrap
.endif
-#
-# Certain classes of packages never need to run mtree during installation
-# because they manage the creation of their own directories.
-#
-.if (${PKG_INSTALLATION_TYPE} == "pkgviews") && defined(CROSSBASE)
-NO_MTREE= yes
-.endif
-
-USE_TOOLS+= ${NO_MTREE:D:Umtree\:bootstrap}
-
# If MANZ is defined, then we want the final man pages to be compressed.
# If MANZ is not defined, then we want the final man pages to be
# uncompressed.
diff --git a/mk/install/install.mk b/mk/install/install.mk
index c172207a6ee..14fa3ead6b7 100644
--- a/mk/install/install.mk
+++ b/mk/install/install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.40 2007/03/09 03:28:58 rillig Exp $
+# $NetBSD: install.mk,v 1.41 2007/04/19 16:52:03 joerg Exp $
#
# This file provides the code for the "install" phase.
#
@@ -228,7 +228,7 @@ _INSTALL_ONE_DIR_CMD= { \
.PHONY: install-makedirs
install-makedirs:
${RUN} ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}
-.if !defined(NO_MTREE)
+.if defined(USE_MTREE)
${RUN} [ ! -f ${_MTREE_FILE} ] || \
${MTREE} ${_MTREE_ARGS} ${DESTDIR}${PREFIX}/
.endif
diff --git a/mk/unprivileged.mk b/mk/unprivileged.mk
index d37c6da9a0e..cea42952b16 100644
--- a/mk/unprivileged.mk
+++ b/mk/unprivileged.mk
@@ -1,4 +1,4 @@
-# $NetBSD: unprivileged.mk,v 1.9 2006/11/05 15:10:08 joerg Exp $
+# $NetBSD: unprivileged.mk,v 1.10 2007/04/19 16:52:03 joerg Exp $
#
# This file collects definitions that are useful when using pkgsrc as an
# unprivileged (non-root) user. It is included automatically by the
@@ -53,10 +53,6 @@ DOCOWN= ${UNPRIVILEGED_USER}
# when overwriting files if they are not writable.
BINMODE= 755
NONBINMODE= 644
-
-# mtree is useless as a regular user because it won't set directory
-# ownerships correctly.
-NO_MTREE= yes
.endif
.if (defined(UNPRIVILEGED) && !empty(UNPRIVILEGED:M[Yy][Ee][Ss]))