diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-13 18:00:29 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-13 18:00:29 +0000 |
commit | ae1283e612ab8588e91dc79a1282d5c577afd14d (patch) | |
tree | de790c71ed42d8fa28bd1dfbfa92d7c56cdd10b0 /mk | |
parent | 7d43882e50a6adff678aec1043cc00f1904e5352 (diff) | |
download | pkgsrc-ae1283e612ab8588e91dc79a1282d5c577afd14d.tar.gz |
Don't use the new pkg_info options unless the the pkg_install tools are
new enough to support them. pkgsrc requires updated pkg_install for
older NetBSD releases and will ask the user to install them as the first
step to using pkgsrc, but the error messages about pkg_info not supporting
the "-K" option were confusing.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.prefs.mk | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 9a3568c1f85..0bf6c3ee5c7 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.150 2004/02/06 19:04:25 jlam Exp $ +# $NetBSD: bsd.prefs.mk,v 1.151 2004/02/13 18:00:29 jlam Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -393,10 +393,22 @@ PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info PKG_VIEW_CMD?= ${PKG_TOOLS_BIN}/pkg_view LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm +.if !defined(PKGTOOLS_VERSION) +PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302 +MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION} +.endif + # The binary pkg_install tools all need to consistently to refer to the # correct package database directory. # +#.if ${PKGTOOLS_VERSION} < 20030823 +.if ${OPSYS} == "NetBSD" +PKGTOOLS_ENV?= PKG_DBDIR=${_PKG_DBDIR} +PKGTOOLS_ARGS?= # empty +.else +PKGTOOLS_ENV?= # empty PKGTOOLS_ARGS?= -K ${_PKG_DBDIR} +.endif # Views are rooted in ${LOCALBASE}, all packages are depoted in # ${DEPOTBASE}, and the package database directory for the default view @@ -404,12 +416,12 @@ PKGTOOLS_ARGS?= -K ${_PKG_DBDIR} # PKG_VIEW_ARGS?= -W ${LOCALBASE} -d ${DEPOTBASE} -k ${PKG_DBDIR} -PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS} -PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS} -PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS} -PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS} -PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS} -PKG_VIEW?= ${PKG_VIEW_CMD} ${PKG_VIEW_ARGS} +PKG_ADD?= ${PKGTOOLS_ENV} ${PKG_ADD_CMD} ${PKGTOOLS_ARGS} +PKG_ADMIN?= ${PKGTOOLS_ENV} ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS} +PKG_CREATE?= ${PKGTOOLS_ENV} ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS} +PKG_DELETE?= ${PKGTOOLS_ENV} ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS} +PKG_INFO?= ${PKGTOOLS_ENV} ${PKG_INFO_CMD} ${PKGTOOLS_ARGS} +PKG_VIEW?= ${PKGTOOLS_ENV} ${PKG_VIEW_CMD} ${PKG_VIEW_ARGS} LINKFARM?= ${LINKFARM_CMD} # "${PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed @@ -419,11 +431,6 @@ LINKFARM?= ${LINKFARM_CMD} # PKG_BEST_EXISTS?= ${PKG_ADMIN} -b -d ${_PKG_DBDIR} -S lsbest -.ifndef PKGTOOLS_VERSION -PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302 -MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION} -.endif - USE_BUILDLINK2?= no # default to not using buildlink2 USE_BUILDLINK3?= no # default to not using buildlink3 .if ${PKG_INSTALLATION_TYPE} == "pkgviews" |