pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   maya
Date:           Fri Dec 18 17:14:58 UTC 2020

Modified Files:
        pkgsrc/mk/pkgformat/pkg: pkgformat-vars.mk
        pkgsrc/mk/platform: NetBSD.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk
cvs rdiff -u -r1.61 -r1.62 pkgsrc/mk/platform/NetBSD.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk
diff -u pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk:1.10 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk:1.11
--- pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk:1.10      Thu Dec  3 10:04:48 2020
+++ pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk   Fri Dec 18 17:14:58 2020
@@ -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.
 #

Index: pkgsrc/mk/platform/NetBSD.mk
diff -u pkgsrc/mk/platform/NetBSD.mk:1.61 pkgsrc/mk/platform/NetBSD.mk:1.62
--- pkgsrc/mk/platform/NetBSD.mk:1.61   Mon Dec 14 21:45:43 2020
+++ pkgsrc/mk/platform/NetBSD.mk        Fri Dec 18 17:14:58 2020
@@ -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



Home | Main Index | Thread Index | Old Index