diff options
author | maya <maya@pkgsrc.org> | 2020-12-18 17:14:58 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2020-12-18 17:14:58 +0000 |
commit | df69ec5f6c5b6be08b73b1eb1b82560017752c43 (patch) | |
tree | a9c6801b5f46720ae5f7a57d93a54ba3e50dd3ee /mk | |
parent | f29030bec68df914911814c558458a678af8f1d1 (diff) | |
download | pkgsrc-df69ec5f6c5b6be08b73b1eb1b82560017752c43.tar.gz |
Move the pkgdb compatibility error to a NetBSD-specific file to avoid
breakage for users who have other package managers that use /var/db/pkg
(Reported by Frederic Cambus on FreeBSD, OpenBSD)
Adjust warning: specifying PKGDB_DIR in mk.conf should be sufficient
for building packages for the compatibility pkgdb location.
This is still an error message, because:
- While we can handle the existing references of PKGDB_DIR, new ones
might be created.
- It is a minor inconvenience to people building packages from source.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pkgformat/pkg/pkgformat-vars.mk | 6 | ||||
-rw-r--r-- | mk/platform/NetBSD.mk | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/mk/pkgformat/pkg/pkgformat-vars.mk b/mk/pkgformat/pkg/pkgformat-vars.mk index d240753b5fa..b602d6fb8c5 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.10 2020/12/03 10:04:48 wiz Exp $ +# $NetBSD: pkgformat-vars.mk,v 1.11 2020/12/18 17:14:58 maya Exp $ # # This Makefile fragment is included indirectly by bsd.prefs.mk and # defines some variables which must be defined earlier than where @@ -18,10 +18,6 @@ USE_TOOLS+= date # This is the package database directory for the default view. PKG_DBDIR?= ${LOCALBASE}/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. # diff --git a/mk/platform/NetBSD.mk b/mk/platform/NetBSD.mk index d8997350e05..da7ad98af68 100644 --- a/mk/platform/NetBSD.mk +++ b/mk/platform/NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.mk,v 1.61 2020/12/14 21:45:43 js Exp $ +# $NetBSD: NetBSD.mk,v 1.62 2020/12/18 17:14:58 maya Exp $ # # Variable definitions for the NetBSD operating system. @@ -165,6 +165,14 @@ _OPSYS_SUPPORTS_SSP= yes _OPSYS_SUPPORTS_STACK_CHECK= yes .endif +_OLD_DEFAULT_PKGDB_DIR= /var/db/pkg +.if exists(${_OLD_DEFAULT_PKGDB_DIR}) && \ + (${PKG_DBDIR:U${OLD_DEFAULT_PKGDB_DIR}} != ${_OLD_DEFAULT_PKGDB_DIR}) +PKG_DBDIR_ERROR= Compatibility pkgdb location exists, but PKG_DBDIR not specified. \ + This may cause unexpected issues. To avoid problems, add \ + PKG_DBDIR=${_OLD_DEFAULT_PKGDB_DIR} to /etc/mk.conf. +.endif + _OPSYS_SUPPORTS_CWRAPPERS= yes # use readelf in check/bsd.check-vars.mk |