summaryrefslogtreecommitdiff
path: root/mk/pkgformat
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2016-04-10 15:58:02 +0000
committerjoerg <joerg@pkgsrc.org>2016-04-10 15:58:02 +0000
commita497b4efbc4f2224de42dbe984d4ba19106f256d (patch)
treeca139b801ca51ee063165400f44be14eed94369e /mk/pkgformat
parentb6b9f4a1e6d214b96f03df58daa363d33e5e9f93 (diff)
downloadpkgsrc-a497b4efbc4f2224de42dbe984d4ba19106f256d.tar.gz
Remove support for USE_DESTDIR=no.
Diffstat (limited to 'mk/pkgformat')
-rw-r--r--mk/pkgformat/README3
-rw-r--r--mk/pkgformat/pkg/install.mk70
-rw-r--r--mk/pkgformat/pkg/metadata.mk27
-rw-r--r--mk/pkgformat/pkg/package.mk42
-rw-r--r--mk/pkgformat/pkg/pkgformat.mk12
-rw-r--r--mk/pkgformat/pkg/replace.mk11
6 files changed, 13 insertions, 152 deletions
diff --git a/mk/pkgformat/README b/mk/pkgformat/README
index 23a39d2f411..34c6db20635 100644
--- a/mk/pkgformat/README
+++ b/mk/pkgformat/README
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.2 2014/12/30 15:13:19 wiz Exp $
+$NetBSD: README,v 1.3 2016/04/10 15:58:03 joerg Exp $
= Introduction =
@@ -57,7 +57,6 @@ The following make targets must be implemented:
* _pkgformat-show-depends
* _pkgformat-install-dependencies
* bootstrap-depends
-* _pkgformat-register
* tarup (XXX: This doesn't sound like a target that should be defined
here.)
* tarup-pkg
diff --git a/mk/pkgformat/pkg/install.mk b/mk/pkgformat/pkg/install.mk
index 7fcbc274ffb..82feab95165 100644
--- a/mk/pkgformat/pkg/install.mk
+++ b/mk/pkgformat/pkg/install.mk
@@ -1,75 +1,7 @@
-# $NetBSD: install.mk,v 1.1 2011/10/15 00:23:09 reed Exp $
-#
-# _pkgformat-check-conflicts:
-# Checks for conflicts between the package and installed packages.
-#
-# XXX: Needs WRKDIR.
-#
-# _pkgformat-check-installed:
-# Checks if the package (or an older version of it) is already
-# installed on the system.
-#
-# XXX: Needs WRKDIR.
-#
-# _pkgformat-register:
-# Populates the package database with the appropriate entries to
-# register the package as being installed on the system.
+# $NetBSD: install.mk,v 1.2 2016/04/10 15:58:03 joerg Exp $
#
# _pkgformat-install-clean:
# Removes the state files from the run of an ``install'' target.
#
-_pkgformat-check-conflicts: .PHONY error-check
- ${RUN}${RM} -f ${WRKDIR}/.CONFLICTS
-.for _conflict_ in ${CONFLICTS}
- ${RUN} \
- found="`${_PKG_BEST_EXISTS} ${_conflict_:Q} || ${TRUE}`"; \
- case "$$found" in \
- "") ;; \
- *) ${ECHO} "$$found" >> ${WRKDIR}/.CONFLICTS ;; \
- esac
-.endfor
- ${RUN} \
- ${TEST} -f ${WRKDIR}/.CONFLICTS || exit 0; \
- exec 1>${ERROR_DIR}/${.TARGET}; \
- ${ECHO} "${PKGNAME} conflicts with installed package(s):"; \
- ${CAT} ${WRKDIR}/.CONFLICTS | ${SED} -e "s|^| |"; \
- ${ECHO} "They install the same files into the same place."; \
- ${ECHO} "Please remove conflicts first with pkg_delete(1)."; \
- ${RM} -f ${WRKDIR}/.CONFLICTS
-
-_pkgformat-check-installed: .PHONY error-check
- ${RUN} \
- found="`${_PKG_BEST_EXISTS} ${PKGWILDCARD:Q} || ${TRUE}`"; \
- ${TEST} -n "$$found" || exit 0; \
- exec 1>${ERROR_DIR}/${.TARGET}; \
- ${ECHO} "$$found is already installed - perhaps an older version?"; \
- ${ECHO} "If so, you may use either of:"; \
- ${ECHO} " - \"pkg_delete $$found\" and \"${MAKE} reinstall\""; \
- ${ECHO} " to upgrade properly"; \
- ${ECHO} " - \"${MAKE} update\" to rebuild the package and all"; \
- ${ECHO} " of its dependencies"; \
- ${ECHO} " - \"${MAKE} replace\" to replace only the package without"; \
- ${ECHO} " re-linking dependencies, risking various problems."
-
-_REGISTER_DEPENDENCIES= \
- ${PKGSRC_SETENV} PKG_DBDIR=${_PKG_DBDIR:Q} \
- AWK=${TOOLS_AWK:Q} \
- ${SH} ${PKGSRCDIR}/mk/pkgformat/pkg/register-dependencies
-
-_pkgformat-register: .PHONY _pkgformat-generate-metadata ${_RDEPENDS_FILE}
- @${STEP_MSG} "Registering installation for ${PKGNAME}"
- ${RUN}${RM} -fr ${_PKG_DBDIR}/${PKGNAME}
- ${RUN}${MKDIR} ${_PKG_DBDIR}/${PKGNAME}
- ${RUN}${CP} ${PKG_DB_TMPDIR}/* ${_PKG_DBDIR}/${PKGNAME}
- ${RUN}${PKG_ADMIN} add ${PKGNAME}
- ${RUN} \
- case ${_AUTOMATIC:Q}"" in \
- [yY][eE][sS]) ${PKG_ADMIN} set automatic=yes ${PKGNAME} ;; \
- esac
- ${RUN}${_FULL_DEPENDS_CMD} | \
- ${SORT} -u | ${_REGISTER_DEPENDENCIES} ${PKGNAME}
- ${RUN}${GREP} '^@pkgdir ' < ${_PKG_DBDIR}/${PKGNAME}/+CONTENTS | \
- while read tag dir; do ${MKDIR} ${PREFIX}/$$dir; done
-
_pkgformat-install-clean: .PHONY _pkgformat-clean-metadata
diff --git a/mk/pkgformat/pkg/metadata.mk b/mk/pkgformat/pkg/metadata.mk
index 45ad0ad8496..d3aa1c5679e 100644
--- a/mk/pkgformat/pkg/metadata.mk
+++ b/mk/pkgformat/pkg/metadata.mk
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.12 2015/07/04 16:18:38 joerg Exp $
+# $NetBSD: metadata.mk,v 1.13 2016/04/10 15:58:03 joerg Exp $
######################################################################
### The targets below are all PRIVATE.
@@ -247,27 +247,6 @@ ${_MESSAGE_FILE}: ${MESSAGE_SRC}
${RUN}${MKDIR} ${.TARGET:H}
${RUN}${CAT} ${.ALLSRC} | \
${SED} ${_MESSAGE_SUBST_SED} > ${.TARGET}
-
-# Display MESSAGE file and optionally mail the contents to
-# PKGSRC_MESSAGE_RECIPIENTS.
-#
-.PHONY: install-display-message
-_pkgformat-register: install-display-message
-install-display-message: ${_MESSAGE_FILE}
- @${STEP_MSG} "Please note the following:"
- @${ECHO_MSG} ""
- @${CAT} ${_MESSAGE_FILE}
- @${ECHO_MSG} ""
-. if !empty(PKGSRC_MESSAGE_RECIPIENTS)
- ${RUN} \
- (${ECHO} "The ${PKGNAME} package was installed on `${HOSTNAME_CMD}` at `date`"; \
- ${ECHO} ""; \
- ${ECHO} "Please note the following:"; \
- ${ECHO} ""; \
- ${CAT} ${_MESSAGE_FILE}; \
- ${ECHO} "") | \
- ${MAIL_CMD} -s"Package ${PKGNAME} installed on `${HOSTNAME_CMD}`" ${PKGSRC_MESSAGE_RECIPIENTS}
-. endif
.endif # MESSAGE_SRC
######################################################################
@@ -364,11 +343,7 @@ _PKG_CREATE_ARGS+= ${INSTALL_FILE:D ${_INSTALL_ARG_cmd:sh}}
_PKG_CREATE_ARGS+= ${DEINSTALL_FILE:D ${_DEINSTALL_ARG_cmd:sh}}
_PKG_ARGS_INSTALL+= ${_PKG_CREATE_ARGS}
-.if ${_USE_DESTDIR} == "no"
-_PKG_ARGS_INSTALL+= -p ${PREFIX}
-.else
_PKG_ARGS_INSTALL+= -I ${PREFIX} -p ${DESTDIR}${PREFIX}
-.endif
_DEINSTALL_ARG_cmd= if ${TEST} -f ${DEINSTALL_FILE}; then \
${ECHO} "-k "${DEINSTALL_FILE:Q}; \
diff --git a/mk/pkgformat/pkg/package.mk b/mk/pkgformat/pkg/package.mk
index d9116e369fe..f360e06e668 100644
--- a/mk/pkgformat/pkg/package.mk
+++ b/mk/pkgformat/pkg/package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.13 2016/02/02 08:15:07 rillig Exp $
+# $NetBSD: package.mk,v 1.14 2016/04/10 15:58:03 joerg Exp $
.if defined(PKG_SUFX)
WARNINGS+= "PKG_SUFX is deprecated, please use PKG_COMPRESSION"
@@ -13,32 +13,11 @@ WARNINGS+= "Unsupported value for PKG_SUFX"
PKG_SUFX?= .tgz
FILEBASE?= ${PKGBASE}
PKGFILE?= ${PKGREPOSITORY}/${FILEBASE}-${PKGVERSION}${PKG_SUFX}
-.if ${_USE_DESTDIR} == "no"
-. if !empty(SIGN_PACKAGES:Mgpg)
STAGE_PKGFILE?= ${WRKDIR}/.packages/${FILEBASE}-${PKGVERSION}${PKG_SUFX}
-. elif !empty(SIGN_PACKAGES:Mx509)
-STAGE_PKGFILE?= ${WRKDIR}/.packages/${FILEBASE}-${PKGVERSION}${PKG_SUFX}
-. else
-STAGE_PKGFILE?= ${PKGFILE}
-. endif
-.else
-STAGE_PKGFILE?= ${WRKDIR}/.packages/${FILEBASE}-${PKGVERSION}${PKG_SUFX}
-.endif
PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
PKGREPOSITORYSUBDIR?= All
######################################################################
-### package-check-installed (PRIVATE, pkgsrc/mk/package/package.mk)
-######################################################################
-### package-check-installed verifies that the package is installed on
-### the system.
-###
-.PHONY: package-check-installed
-package-check-installed:
- ${RUN} ${PKG_INFO} -qe ${PKGNAME} \
- || ${FAIL_MSG} "${PKGNAME} is not installed."
-
-######################################################################
### package-create (PRIVATE, pkgsrc/mk/package/package.mk)
######################################################################
### package-create creates the binary package.
@@ -52,21 +31,13 @@ package-create: ${PKGFILE} package-links
### stage-package-create creates the binary package for stage install.
###
.PHONY: stage-package-create
-.if ${_USE_DESTDIR} == "no"
-stage-package-create: package-create
-.else
stage-package-create: stage-install ${STAGE_PKGFILE}
-.endif
_PKG_ARGS_PACKAGE+= ${_PKG_CREATE_ARGS}
_PKG_ARGS_PACKAGE+= -F ${PKG_COMPRESSION}
-.if ${_USE_DESTDIR} == "no"
-_PKG_ARGS_PACKAGE+= -p ${PREFIX}
-.else
_PKG_ARGS_PACKAGE+= -I ${PREFIX} -p ${DESTDIR}${PREFIX}
-. if ${_USE_DESTDIR} == "user-destdir"
+.if ${_USE_DESTDIR} == "user-destdir"
_PKG_ARGS_PACKAGE+= -u ${REAL_ROOT_USER} -g ${REAL_ROOT_GROUP}
-. endif
.endif
${STAGE_PKGFILE}: ${_CONTENTS_TARGETS}
@@ -187,15 +158,10 @@ stage-package-install: stage-package-create real-package-install
stage-package-install: barrier
.endif
-.if ${_USE_DESTDIR} != "no"
-. if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
real-package-install: su-real-package-install
-. else
-real-package-install: su-target
-. endif
.else
-real-package-install:
- @${DO_NADA}
+real-package-install: su-target
.endif
MAKEFLAGS.su-real-package-install= PKGNAME_REQD=${PKGNAME_REQD:Q}
diff --git a/mk/pkgformat/pkg/pkgformat.mk b/mk/pkgformat/pkg/pkgformat.mk
index 5bf736fe4e4..34b304644e6 100644
--- a/mk/pkgformat/pkg/pkgformat.mk
+++ b/mk/pkgformat/pkg/pkgformat.mk
@@ -1,19 +1,13 @@
-# $NetBSD: pkgformat.mk,v 1.2 2014/12/30 15:13:20 wiz Exp $
+# $NetBSD: pkgformat.mk,v 1.3 2016/04/10 15:58:03 joerg Exp $
#
# This Makefile fragment provides variable and target overrides that are
# specific to the pkgsrc native package format.
#
-# PKG_FILELIST_CMD outputs the list of files owned by ${PKGNAME} as
-# registered on the system.
+# PKG_FILELIST_CMD outputs the list of files in the package based on
+# _DEPENDS_PLIST.
#
-# For DESTDIR support, just use _DEPENDS_PLIST instead.
-#
-.if ${_USE_DESTDIR} == "no"
-PKG_FILELIST_CMD= ${PKG_INFO} -qL ${PKGNAME:Q}
-.else
PKG_FILELIST_CMD= ${SED} -e "/^@/d" -e "s|^|${PREFIX}/|" ${_DEPENDS_PLIST}
-.endif
.include "depends.mk"
.include "check.mk"
diff --git a/mk/pkgformat/pkg/replace.mk b/mk/pkgformat/pkg/replace.mk
index 93d976e8fa1..14da7155630 100644
--- a/mk/pkgformat/pkg/replace.mk
+++ b/mk/pkgformat/pkg/replace.mk
@@ -1,19 +1,14 @@
-# $NetBSD: replace.mk,v 1.2 2013/05/23 13:18:56 obache Exp $
+# $NetBSD: replace.mk,v 1.3 2016/04/10 15:58:03 joerg Exp $
#
-# _pkgformat-replace:
-# Updates a package in-place on the system (USE_DESTDIR=no).
-#
# _pkgformat-destdir-replace:
-# Updates a package in-place on the system (USE_DESTDIR=yes).
+# Updates a package in-place on the system.
#
# See also:
# replace
#
# XXX: The whole replacement, from deinstalling the old package up
-# to installing the new package, should be one transaction. It
-# currently isn't, and the check-files target for other packages
-# can be confused when a +REQUIRED_BY files suddenly disappears.
+# to installing the new package, should be one transaction.
#
_pkgformat-replace: \
replace-names \