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:   rillig
Date:           Sun Oct 12 17:01:28 UTC 2025

Modified Files:
        pkgsrc/mk: bsd.pkg.mk
        pkgsrc/mk/misc: can-be-built-here.mk

Log Message:
mk: add location information for PKG_FAIL_REASON and PKG_SKIP_REASON

Reword the messages from can-be-built-here.mk to be less ambiguous. The
previous wording wrongly suggested that the package itself issued the
reason, when in fact the reason could also be issued by the pkgsrc
infrastructure.

https://mail-index.netbsd.org/pkgsrc-users/2025/10/11/msg042064.html


To generate a diff of this commit:
cvs rdiff -u -r1.2059 -r1.2060 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mk/misc/can-be-built-here.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/bsd.pkg.mk
diff -u pkgsrc/mk/bsd.pkg.mk:1.2059 pkgsrc/mk/bsd.pkg.mk:1.2060
--- pkgsrc/mk/bsd.pkg.mk:1.2059 Wed Apr 30 20:35:28 2025
+++ pkgsrc/mk/bsd.pkg.mk        Sun Oct 12 17:01:28 2025
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.2059 2025/04/30 20:35:28 rillig Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.2060 2025/10/12 17:01:28 rillig Exp $
 #
 # This file is in the public domain.
 #
@@ -50,7 +50,7 @@ _DEF_VARS.pkgname=    PKGBASE PKGVERSION PK
 
 # Fail-safe in the case of circular dependencies
 .if defined(_PKGSRC_DEPS) && defined(PKGNAME) && !empty(_PKGSRC_DEPS:M${PKGNAME})
-PKG_FAIL_REASON+=      "Circular dependency detected"
+PKG_FAIL_REASON+=      "[bsd.pkg.mk] Circular dependency detected"
 .endif
 
 # Some packages are now hitting ARG_MAX limits as they contain thousands of
@@ -137,19 +137,19 @@ _INSTALL_UNSTRIPPED=      # set (flag used by
 
 .if defined(BUILDLINK_DEPTH) || defined(BUILDLINK_PACKAGES) || \
     defined(BUILDLINK_DEPENDS) || defined(BUILDLINK_ORDER)
-PKG_FAIL_REASON+=      "Out-dated buildlink3.mk detected, please update"
+PKG_FAIL_REASON+=      '[bsd.pkg.mk] Out-dated buildlink3.mk detected, please update'
 .endif
 
 .if !defined(CATEGORIES)
-PKG_FAIL_REASON+=      'CATEGORIES are mandatory.'
+PKG_FAIL_REASON+=      '[bsd.pkg.mk] CATEGORIES are mandatory.'
 .endif
 
 .if !defined(PKGNAME) && !defined(DISTNAME)
-PKG_FAIL_REASON+=      'PKGNAME and/or DISTNAME are mandatory.'
+PKG_FAIL_REASON+=      '[bsd.pkg.mk] PKGNAME and/or DISTNAME are mandatory.'
 .endif
 
 .if defined(PKG_PATH)
-PKG_FAIL_REASON+=      'Please unset PKG_PATH before doing pkgsrc work!'
+PKG_FAIL_REASON+=      '[bsd.pkg.mk] Please unset PKG_PATH before doing pkgsrc work!'
 .endif
 
 # Allow variables to be set on a per-OS basis
@@ -495,8 +495,8 @@ PATH=       ${_PATH_COMPONENTS:ts::S,__space_i
 # Don't build a package if it's broken.
 ################################################################
 .if ${X11_TYPE} == "xorg"
-PKG_FAIL_REASON+=      "Support for X11_TYPE=xorg was removed."
-PKG_FAIL_REASON+=      "Please switch to X11_TYPE=modular."
+PKG_FAIL_REASON+=      "[bsd.pkg.mk] Support for X11_TYPE=xorg was removed."
+PKG_FAIL_REASON+=      "[bsd.pkg.mk] Please switch to X11_TYPE=modular."
 X11_TYPE:=             native
 X11BASE:=              /usr
 .endif
@@ -504,25 +504,25 @@ X11BASE:=         /usr
 .if !defined(NO_SKIP)
 .  if (defined(NO_BIN_ON_CDROM) && defined(FOR_CDROM))
 PKG_SKIP_REASON+=      \
-       "${PKGNAME} may not be distributed on physical media in binary form:" \
+       "[bsd.pkg.mk] ${PKGNAME} may not be distributed on physical media in binary form:" \
          "    "${NO_BIN_ON_CDROM:Q}
 .  endif
 .  if (defined(NO_SRC_ON_CDROM) && defined(FOR_CDROM))
 PKG_SKIP_REASON+=      \
-       "${PKGNAME} may not be distributed on physical media in source form:" \
+       "[bsd.pkg.mk] ${PKGNAME} may not be distributed on physical media in source form:" \
          "    "${NO_SRC_ON_CDROM:Q}
 .  endif
 .  if (defined(RESTRICTED) && defined(NO_RESTRICTED))
 PKG_SKIP_REASON+=      \
-       "${PKGNAME} is restricted:" \
+       "[bsd.pkg.mk] ${PKGNAME} is restricted:" \
         "    "${RESTRICTED:Q}
 .  endif
 .  if defined(USE_X11) && (${USE_X11} != "weak") && (${X11_TYPE} == "native") && !exists(${X11BASE})
 PKG_FAIL_REASON+=      \
-       "${PKGNAME} uses X11, but ${X11BASE} not found"
+       "[bsd.pkg.mk] ${PKGNAME} uses X11, but ${X11BASE} not found"
 .  endif
 .  if ${BROKEN:U:M*}
-PKG_FAIL_REASON+=      "${PKGNAME} is marked as broken:"
+PKG_FAIL_REASON+=      "[bsd.pkg.mk] ${PKGNAME} is marked as broken:"
 PKG_FAIL_REASON+=      ${BROKEN}
 .  endif
 
@@ -573,11 +573,11 @@ __PLATFORM_OK?=   yes
 # Check OK (NOT_FOR/ONLY_FOR) before WORKS (BROKEN_ON)
 .  if !defined(__PLATFORM_OK)
 PKG_SKIP_REASON+=      \
-       "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
+       "[bsd.pkg.mk] ${PKGNAME} is not available for ${MACHINE_PLATFORM}"
 .  endif       # !__PLATFORM_OK
 .  if !defined(__PLATFORM_WORKS)
 PKG_FAIL_REASON+=      \
-       "${PKGNAME} is marked broken on ${MACHINE_PLATFORM}"
+       "[bsd.pkg.mk] ${PKGNAME} is marked broken on ${MACHINE_PLATFORM}"
 .  endif       # !__PLATFORM_WORKS
 
 .endif # NO_SKIP

Index: pkgsrc/mk/misc/can-be-built-here.mk
diff -u pkgsrc/mk/misc/can-be-built-here.mk:1.10 pkgsrc/mk/misc/can-be-built-here.mk:1.11
--- pkgsrc/mk/misc/can-be-built-here.mk:1.10    Sun Apr 26 06:56:29 2020
+++ pkgsrc/mk/misc/can-be-built-here.mk Sun Oct 12 17:01:28 2025
@@ -1,4 +1,4 @@
-# $NetBSD: can-be-built-here.mk,v 1.10 2020/04/26 06:56:29 rillig Exp $
+# $NetBSD: can-be-built-here.mk,v 1.11 2025/10/12 17:01:28 rillig Exp $
 #
 # This file checks whether a package can be built in the current pkgsrc
 # environment. It checks the following variables:
@@ -129,7 +129,7 @@ _CBBH.nunpriv=              no
 
 # Check PKG_FAIL_REASON
 _CBBH_CHECKS+=         fail
-_CBBH_MSGS.fail=       "This package has set PKG_FAIL_REASON:" ${PKG_FAIL_REASON}
+_CBBH_MSGS.fail=       "[can-be-built-here.mk] This package has PKG_FAIL_REASON set:" ${PKG_FAIL_REASON}
 
 _CBBH.fail=            yes
 .if defined(PKG_FAIL_REASON) && !empty(PKG_FAIL_REASON)
@@ -138,7 +138,7 @@ _CBBH.fail=         no
 
 # Check PKG_SKIP_REASON
 _CBBH_CHECKS+=         skip
-_CBBH_MSGS.skip=       "This package has set PKG_SKIP_REASON:" ${PKG_SKIP_REASON}
+_CBBH_MSGS.skip=       "[can-be-built-here.mk] This package has PKG_SKIP_REASON set:" ${PKG_SKIP_REASON}
 
 _CBBH.skip=            yes
 .if defined(PKG_SKIP_REASON) && !empty(PKG_SKIP_REASON)



Home | Main Index | Thread Index | Old Index