pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/pbulk
Module Name: pkgsrc
Committed By: triaxx
Date: Thu Feb 8 12:59:28 UTC 2018
Modified Files:
pkgsrc/mk/pbulk: pbulk.sh
Log Message:
Fix an inconsistency for package database directory.
The pkgdb variable generated for pbulk.conf is ${PREFIX}/var/db/pkg but
bootstrap generates by default PKG_DBDIR=${PREFIX}/pkgdb.
This fix add a common PKGDBDIR variable used for both pbulk.conf and
bootstrapkit.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/mk/pbulk/pbulk.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/pbulk/pbulk.sh
diff -u pkgsrc/mk/pbulk/pbulk.sh:1.6 pkgsrc/mk/pbulk/pbulk.sh:1.7
--- pkgsrc/mk/pbulk/pbulk.sh:1.6 Sun Aug 27 18:18:57 2017
+++ pkgsrc/mk/pbulk/pbulk.sh Thu Feb 8 12:59:28 2018
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: pbulk.sh,v 1.6 2017/08/27 18:18:57 sevan Exp $
+# $NetBSD: pbulk.sh,v 1.7 2018/02/08 12:59:28 triaxx Exp $
set -e
usage="usage: ${0##*/} [-lun] [-c mk.conf.fragment] [-d nodes]"
@@ -38,6 +38,11 @@ fi
# almost constant:
: ${PKGSRCDIR:=/usr/pkgsrc}
+# setting pkgdb directory:
+if [ -n "$unprivileged" -o -n "${PREFIX}" ]; then
+: ${PKGDBDIR:=${PREFIX}/var/db/pkg}
+fi
+
# Do it early since adding it after it fails is problematic:
if [ ! -n "$unprivileged" ]; then
case "$(uname)" in
@@ -124,7 +129,7 @@ unprivileged_user=$(id -un)
pkgsrc=${PKGSRCDIR}
prefix=${PREFIX}
varbase=${PREFIX}/var
-pkgdb=${PREFIX}/var/db/pkg
+pkgdb=${PKGDBDIR}
EOF
elif [ -n "${PREFIX}" ]; then
# Non-default prefix:
@@ -132,7 +137,7 @@ cat >> ${PBULKPREFIX}/etc/pbulk.conf.ove
# Non-default prefix overrides:
prefix=${PREFIX}
varbase=${PREFIX}/var
-pkgdb=${PREFIX}/var/db/pkg
+pkgdb=${PKGDBDIR}
EOF
fi
@@ -187,6 +192,7 @@ ${PKGSRCDIR}/bootstrap/bootstrap \
${PREFIX:+--prefix=${PREFIX}} \
${mk_fragment:+--mk-fragment="$mk_fragment"} \
--workdir=${TMPDIR}/work \
+ ${PKGDBDIR:+--pkgdbdir=${PKGDBDIR}} \
--gzip-binary-kit=${PACKAGES}/bootstrap.tar.gz
rm -rf ${TMPDIR}/work
rm -f ${TMPDIR}/mk.conf.inc
Home |
Main Index |
Thread Index |
Old Index