diff options
author | wiz <wiz@pkgsrc.org> | 2020-12-02 10:22:39 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2020-12-02 10:22:39 +0000 |
commit | 1411c5f921f6851c5ff615b622680c8824ff4863 (patch) | |
tree | 03e1b7d580180b7caeb414c5db7418dbd3d6f9f7 /mk | |
parent | 0d9ec1dd67278084e7516e19ea30c795efda6d9b (diff) | |
download | pkgsrc-1411c5f921f6851c5ff615b622680c8824ff4863.tar.gz |
*: move default database directory from /var/db/pkg to ${PREFIX}/pkgdb
As discussed in August 2020 and previously on pkgsrcCon 2019.
Ok pkgsrc-pmc@
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pbulk/pbulk.sh | 4 | ||||
-rw-r--r-- | mk/pkgformat/pkg/depends.mk | 6 | ||||
-rw-r--r-- | mk/pkgformat/pkg/pkgformat-vars.mk | 14 | ||||
-rwxr-xr-x | mk/pkgformat/pkg/register-dependencies | 6 |
4 files changed, 17 insertions, 13 deletions
diff --git a/mk/pbulk/pbulk.sh b/mk/pbulk/pbulk.sh index 43628935809..a96dfcc144c 100644 --- a/mk/pbulk/pbulk.sh +++ b/mk/pbulk/pbulk.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: pbulk.sh,v 1.8 2018/10/29 02:47:08 sevan Exp $ +# $NetBSD: pbulk.sh,v 1.9 2020/12/02 10:22:39 wiz Exp $ set -e usage="usage: ${0##*/} [-lun] [-c mk.conf.fragment] [-d nodes]" @@ -40,7 +40,7 @@ fi # setting pkgdb directory: if [ -n "$unprivileged" -o -n "${PREFIX}" ]; then -: ${PKGDBDIR:=${PREFIX}/var/db/pkg} +: ${PKGDBDIR:=${PREFIX}/pkgdb} fi # Do it early since adding it after it fails is problematic: diff --git a/mk/pkgformat/pkg/depends.mk b/mk/pkgformat/pkg/depends.mk index 76016be8886..8081cad644c 100644 --- a/mk/pkgformat/pkg/depends.mk +++ b/mk/pkgformat/pkg/depends.mk @@ -1,4 +1,4 @@ -# $NetBSD: depends.mk,v 1.11 2020/01/14 22:22:34 rillig Exp $ +# $NetBSD: depends.mk,v 1.12 2020/12/02 10:22:39 wiz Exp $ # This command prints out the dependency patterns for all full (run-time) # dependencies of the package. @@ -188,8 +188,12 @@ ${_RRDEPENDS_FILE}: ${_RDEPENDS_FILE} # _pkgformat-install-dependencies: # Installs any missing dependencies. # +# The ${TEST} at the beginning is for the default change for the +# database directory from /var/db/pkg to ${PREFIX}/pkgdb in December 2020. +# _pkgformat-install-dependencies: .PHONY ${_DEPENDS_FILE} ${RUN} \ + ${TEST} -n "${PKG_DBDIR_ERROR}" && ${ERROR_MSG} ${PKG_DBDIR_ERROR:Q} && exit 1; \ exec 3<&0; \ ${CAT} ${_DEPENDS_FILE} | \ while read type pattern dir; do \ diff --git a/mk/pkgformat/pkg/pkgformat-vars.mk b/mk/pkgformat/pkg/pkgformat-vars.mk index 6c046988ba2..b196f6bc812 100644 --- a/mk/pkgformat/pkg/pkgformat-vars.mk +++ b/mk/pkgformat/pkg/pkgformat-vars.mk @@ -1,4 +1,4 @@ -# $NetBSD: pkgformat-vars.mk,v 1.8 2020/01/12 23:38:42 joerg Exp $ +# $NetBSD: pkgformat-vars.mk,v 1.9 2020/12/02 10:22:39 wiz Exp $ # # This Makefile fragment is included indirectly by bsd.prefs.mk and # defines some variables which must be defined earlier than where @@ -16,7 +16,11 @@ USE_TOOLS+= date .endif # This is the package database directory for the default view. -PKG_DBDIR?= /var/db/pkg +PKG_DBDIR?= ${PREFIX}/pkgdb + +.if exists(/var/db/pkg) && !exists(${PKG_DBDIR}) +PKG_DBDIR_ERROR= The default package database directory has changed. Please run: mv /var/db/pkg ${PKG_DBDIR} +.endif # _PKG_DBDIR is the actual packages database directory where we register # packages. @@ -32,11 +36,7 @@ PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm # Latest versions of tools required for correct pkgsrc operation. -.if !empty(USE_PKG_ADMIN_DIGEST:M[Yy][Ee][Ss]) -PKGTOOLS_REQD= 20191008 -.else -PKGTOOLS_REQD= 20100914 -.endif +PKGTOOLS_REQD= 20200828 # Latest version of pkg_install required to extract packages PKGTOOLS_VERSION_REQD= 20091115 diff --git a/mk/pkgformat/pkg/register-dependencies b/mk/pkgformat/pkg/register-dependencies index 148ef8ac340..9b7d19afa26 100755 --- a/mk/pkgformat/pkg/register-dependencies +++ b/mk/pkgformat/pkg/register-dependencies @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: register-dependencies,v 1.1 2011/10/15 00:23:09 reed Exp $ +# $NetBSD: register-dependencies,v 1.2 2020/12/02 10:22:39 wiz Exp $ # ###################################################################### # @@ -18,14 +18,14 @@ # ENVIRONMENT # PKG_DBDIR # This is the package meta-data directory in which the -# packages are registered. By default, this is /var/db/pkg. +# packages are registered. By default, this is ${PREFIX}/pkgdb . # ###################################################################### : ${AWK:=awk} : ${CP:=cp} : ${ECHO:=echo} -: ${PKG_DBDIR:=/var/db/pkg} +: ${PKG_DBDIR:=${PREFIX}/pkgdb} : ${RM:=rm} : ${TEST:=test} : ${TOUCH:=touch} |