pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/buildlink3



Module Name:    pkgsrc
Committed By:   dholland
Date:           Mon Mar 19 03:53:29 UTC 2018

Modified Files:
        pkgsrc/mk/buildlink3: bsd.buildlink3.mk

Log Message:
Add more diagnostic info for when packages are forced to non-builtin.

The voodoo that checks this now keeps track of which packages caused
what, and in addition to the list FORCED_PKGSRC of packages that have
been forced to non-builtin, it also produces a list FORCED_PKGSRC_REASONS
of the form pkg:causing-pkg{,causing-pkg...}.

(which means that USE_BUILTIN.pkg has been set to no because
USE_BUILTIN.causing-pkg is set to no.)

This could probably just be one list but I'm not sure if anything is
relying on the format of the current FORCED_PKGSRC.


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 pkgsrc/mk/buildlink3/bsd.buildlink3.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/buildlink3/bsd.buildlink3.mk
diff -u pkgsrc/mk/buildlink3/bsd.buildlink3.mk:1.239 pkgsrc/mk/buildlink3/bsd.buildlink3.mk:1.240
--- pkgsrc/mk/buildlink3/bsd.buildlink3.mk:1.239        Tue Aug  1 05:48:12 2017
+++ pkgsrc/mk/buildlink3/bsd.buildlink3.mk      Mon Mar 19 03:53:29 2018
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.239 2017/08/01 05:48:12 dbj Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.240 2018/03/19 03:53:29 dholland Exp $
 #
 # Copyright (c) 2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -146,18 +146,23 @@ _ignore_:=${IGNORE_PKG.${_pkg_:S/^-//}:M
      # leaving a package (in the buildlink tree)
 .    if !empty(_use_)
        # this package is going to use the builtin version
-.      if ${_ok_} == no
+.      if ${_ok_} != yes
          # not ok for it to be builtin; force it to pkgsrc
          USE_BUILTIN.${_pkg_:S/^-//}:=no
          FORCED_PKGSRC+=${_pkg_:S/^-//}
-         #.say "${_stack_:C/.*/  /} ${_pkg_:S/^-//} pkgsrc FORCED"
+         # using += here fails to evaluate ${_ok_} until after the loop
+         FORCED_PKGSRC_REASONS:=${FORCED_PKGSRC_REASONS} ${_pkg_:S/^-//}:${_ok_:S/^no,//}
+         #.say "${_stack_:C/.*/  /} ${_pkg_:S/^-//} pkgsrc FORCED by ${_ok_:S/^no,//}"
 .      else
          #.say "${_stack_:C/.*/  /} ${_pkg_:S/^-//} built-in"
 .      endif
 .    elif empty(_ignore_)
        # no builtin version or not using it
        #.say "${_stack_:C/.*/  /} ${_pkg_:S/^-//} pkgsrc"
-       _ok_:=no
+.      if ${_ok_} == yes
+         _ok_:=no
+.      endif
+       _ok_:=${_ok_},${_pkg_:S/^-//}
 .    endif
      # pop the stack
 .    if ${_ok_} == yes
@@ -170,6 +175,11 @@ _ignore_:=${IGNORE_PKG.${_pkg_:S/^-//}:M
 .error "The above loop through BUILDLINK_TREE failed to balance"
 .endif
 
+# This comes out with a stray leading space currently.
+.if defined(FORCED_PKGSRC_REASONS)
+FORCED_PKGSRC_REASONS:=${FORCED_PKGSRC_REASONS:S/^ //}
+.endif
+
 # Sorted and unified version of BUILDLINK_TREE without recursion
 # data.
 _BUILDLINK_TREE:=      ${BUILDLINK_TREE:N-*:O:u}



Home | Main Index | Thread Index | Old Index