pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Avoid hardcoding the refcount database into the INS...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/16ab6296b63f
branches:  trunk
changeset: 488358:16ab6296b63f
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Jan 28 19:06:07 2005 +0000

description:
Avoid hardcoding the refcount database into the INSTALL scripts.  We
now simply make ${PKG_REFCOUNT_DBDIR} always be ${PKG_DBDIR}.refcount
so that it always follows the location of ${PKG_DBDIR}.  This preserves
the ability for PKG_DBDIR (and PKG_REFCOUNT_DBDIR) to be different on
different machines despite using the same binary packages.

diffstat:

 mk/bsd.pkg.install.mk |  10 +---------
 mk/install/dirs       |   3 ++-
 mk/install/usergroup  |   6 +++---
 3 files changed, 6 insertions(+), 13 deletions(-)

diffs (62 lines):

diff -r 084c0a2521bb -r 16ab6296b63f mk/bsd.pkg.install.mk
--- a/mk/bsd.pkg.install.mk     Fri Jan 28 18:32:40 2005 +0000
+++ b/mk/bsd.pkg.install.mk     Fri Jan 28 19:06:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.install.mk,v 1.77 2005/01/28 18:32:40 jlam Exp $
+# $NetBSD: bsd.pkg.install.mk,v 1.78 2005/01/28 19:06:07 jlam Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk to use the common
 # INSTALL/DEINSTALL scripts.  To use this Makefile fragment, simply:
@@ -78,14 +78,6 @@
 FILES_SUBST+=          PKGBASE=${PKGBASE}
 FILES_SUBST+=          PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}
 
-# Database directory for reference-counted package objects.  Subdirectories
-# represent different classes of package objects, e.g. dirs, users,
-# group, etc.  The default value is ${PKG_DBDIR} with ".refcount"
-# appended to the name.
-#
-PKG_REFCOUNT_DBDIR?=   ${PKG_DBDIR}.refcount
-FILES_SUBST+=          PKG_REFCOUNT_DBDIR=${PKG_REFCOUNT_DBDIR:Q}
-
 # PKG_USERS represents the users to create for the package.  It is a
 #      space-separated list of elements of the form
 #
diff -r 084c0a2521bb -r 16ab6296b63f mk/install/dirs
--- a/mk/install/dirs   Fri Jan 28 18:32:40 2005 +0000
+++ b/mk/install/dirs   Fri Jan 28 19:06:07 2005 +0000
@@ -47,8 +47,9 @@
 SELF=$0
 ACTION=$1
 PKG_METADATA_DIR="${2-`${PWD_CMD}`}"
-PKG_REFCOUNT_DBDIR="@PKG_REFCOUNT_DBDIR@"
 : ${PKGNAME=${PKG_METADATA_DIR##*/}}
+: ${PKG_DBDIR=${PKG_METADATA_DIR%/*}}
+: ${PKG_REFCOUNT_DBDIR=${PKG_DBDIR}.refcount}
 
 PKG_REFCOUNT_DIRS_DBDIR="${PKG_REFCOUNT_DBDIR}/dirs"
 
diff -r 084c0a2521bb -r 16ab6296b63f mk/install/usergroup
--- a/mk/install/usergroup      Fri Jan 28 18:32:40 2005 +0000
+++ b/mk/install/usergroup      Fri Jan 28 19:06:07 2005 +0000
@@ -54,9 +54,9 @@
 SELF=$0
 ACTION=$1
 PKG_METADATA_DIR="${2-`${PWD_CMD}`}"
-PKG_REFCOUNT_DBDIR="@PKG_REFCOUNT_DBDIR@"
 : ${PKGNAME=${PKG_METADATA_DIR##*/}}
-: ${PKGBASE=${PKGNAME%-[0-9]*}}
+: ${PKG_DBDIR=${PKG_METADATA_DIR%/*}}
+: ${PKG_REFCOUNT_DBDIR=${PKG_DBDIR}.refcount}
 
 PKG_REFCOUNT_USERS_DBDIR="${PKG_REFCOUNT_DBDIR}/users"
 PKG_REFCOUNT_GROUPS_DBDIR="${PKG_REFCOUNT_DBDIR}/groups"
@@ -158,7 +158,7 @@
                case $user in
                "")     continue ;;
                esac
-               : ${descr:="${PKGBASE} $user user"}
+               : ${descr:="${PKGNAME%-[0-9]*} $user user"}
                : ${home:="${PKG_USER_HOME}"}
                : ${shell:="${PKG_USER_SHELL}"}
                shadow_dir="${PKG_REFCOUNT_USERS_DBDIR}/$user"



Home | Main Index | Thread Index | Old Index