The NetBSD Project

CVS log for pkgsrc/mk/bsd.utils.mk

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / mk

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Oct 11 08:24:48 2024 UTC (2 years, 1 month ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2026Q3-base, pkgsrc-2026Q3, pkgsrc-2026Q2-base, pkgsrc-2026Q2, pkgsrc-2026Q1-base, pkgsrc-2026Q1, pkgsrc-2025Q4-base, pkgsrc-2025Q4, pkgsrc-2025Q3-base, pkgsrc-2025Q3, pkgsrc-2025Q2-base, pkgsrc-2025Q2, pkgsrc-2025Q1-base, pkgsrc-2025Q1, pkgsrc-2024Q4-base, pkgsrc-2024Q4, HEAD
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -2 lines
mk: Add support for stricter USE_INDIRECT_DEPENDS.

The current and historical behaviour is that the BUILDLINK_DEPMETHOD for
a package defaults to "full", regardless of what any parent package that
included it has set for its BUILDLINK_DEPMETHOD.  In addition, only
direct dependencies and indirect "build" dependencies are logged as
dependencies in the files that are used for check-shlibs verification
and package dependency metadata for pkg_install.  Any indirect "full"
dependency is ignored.

This combination of factors can lead to a broken package being produced.
A package may end up linking against a pkgsrc library, but because it is
an indirect dependency, and because indirect "full" dependencies are not
registered, check-shlibs will have no knowledge of it and has to assume
that it is correct.  This situation will occur if any packages that are
a parent dependency of the required library have set BUILDLINK_DEPMETHOD
to "build".

To mitigate this problem, a more accurate algorithm is implemented to
calculate BUILDLINK_DEFAULT_DEPMETHOD for each package based on the
setting of its parent(s), rather than simply defaulting to "full".  If
USE_INDIRECT_DEPENDS is enabled, then the output of this algorithm is
used, and both "build" and "full" indirect dependencies are calculated
and added to the dependency metadata files.  check-shlibs can then use
this extra information to issue an error if a library is found to belong
to an indirect build dependency.

Unfortunately due to buildlink3.mk inclusion guards, we cannot currently
guarantee that the BUILDLINK_DEFAULT_DEPMETHOD setting for each package
is 100% accurate, and so there may be the occasional false positive when
USE_INDIRECT_DEPENDS is enabled.  For this reason it is currently not
enabled by default, but it is strongly recommended that developers, and
especially anyone producing public binary packages, enable it.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Apr 13 22:02:36 2022 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1, pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +6 -5 lines
mk: rename show-depends-all to show-depends-recursive

This avoids confusing the target with the similarly named
show-all-depends, which lists makefile variables related to the depends
phase.

Suggested by J. Lewis Muir on pkgsrc-users.

https://mail-index.netbsd.org/pkgsrc-users/2022/04/13/msg035470.html

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Apr 9 00:46:12 2022 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +50 -4 lines
mk: add show-depends-all

Previously, there was no easy way to list all dependencies of a package.
The target show-depends only lists the direct missing dependencies, the
target show-depends-dirs lists all direct dependencies, but neither
lists the indirect dependencies as well.  The newly added target
show-depends-all includes the indirect dependencies.

While here, document the existing targets since they differ subtly.

https://mail-index.netbsd.org/pkgsrc-users/2022/04/07/msg035444.html

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Jan 25 00:33:56 2018 UTC (8 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2 lines
Fix spelling, it is PKGSRC_RUN_TEST.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Jan 13 12:48:56 2018 UTC (8 years, 10 months ago) by joerg
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -1 lines
Introduce TEST_DEPENDS.

Place them in ALL_DEPENDS iff PKGSRC_RUN_TESTS is set, so that bulk
builds will pick them up.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu May 9 23:37:25 2013 UTC (13 years, 6 months ago) by riastradh
Branches: MAIN
CVS tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -2 lines
Split BUILD_DEPENDS into TOOL_DEPENDS and BUILD_DEPENDS in mk/.

Build depends are target packages that are needed at build-time for,
e.g., static libraries to link against, header files to include, &c.
Tool depends are native packages that are needed at build-time for,
e.g., compilers/linkers/&c. to run.

ok agc

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Sep 8 20:17:15 2011 UTC (15 years, 2 months ago) by abs
Branches: MAIN
CVS tags: pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -3 lines
Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Jul 27 22:01:28 2006 UTC (20 years, 3 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkgsrc-2008Q1-base, pkgsrc-2008Q1, pkgsrc-2007Q4-base, pkgsrc-2007Q4, pkgsrc-2007Q3-base, pkgsrc-2007Q3, pkgsrc-2007Q2-base, pkgsrc-2007Q2, pkgsrc-2007Q1-base, pkgsrc-2007Q1, pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3, jlam-pkgviews-base, jlam-pkgviews, cwrapper, cube-native-xorg-base, cube-native-xorg
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -15 lines
Remove all uses of the following targets from pkgsrc:

	show-all-depends-dirs
	show-all-depends-dirs-excl

Replace them with calls to pkgsrc/mk/scripts/depends-depth-first.awk
which does the same thing but without the extra overhead of invoking
a recursive make.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Jul 13 14:02:34 2006 UTC (20 years, 4 months ago) by jlam
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
* Add a new stage "bootstrap-depends" that happens before all other
  stages, and that installs dependencies listed in BOOTSTRAP_DEPENDS.
  The bootstrap-depends step works just like the normal depends step
  and honors the value of DEPENDS_TARGET.  It's now possible to add
  dependencies solely to facilitate fetching the distfiles, e.g.

	BOOTSTRAP_DEPENDS+=	curl-[0-9]*:../../www/curl

* Teach the tools framework about ":bootstrap" as a tools modifier
  which indicates the tool should be added as a dependency via
  BOOTSTRAP_DEPENDS.

* Add "digest" to the tools framework.

* Use USE_TOOLS+=digest:bootstrap to force pkgsrc to install digest
  before anything else.  Get rid of unused "uptodate-digest" target
  and related digest version-checking code.

* Finish the refactoring work: split checksum-related code out of
  bsd.pkg.mk and into pkgsrc/mk/checksum and replace the "checksum"
  target command list with a script that does all the real work.

* Make DIGEST_ALGORITHMS and PATCH_DIGEST_ALGORITHM into private
  variables by prepending them with an underscore.  Also, rename
  _PATCH_DIGEST_ALGORITHM to _PATCH_DIGEST_ALGORITHMS and adjust the
  makepatchsum target to allow that variable to contain a list of
  algorithms, all of which are used when creating the patch checksums
  for ${DISTINFO_FILE}.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Jan 23 15:01:39 2006 UTC (20 years, 9 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2006Q2-base, pkgsrc-2006Q2, pkgsrc-2006Q1-base, pkgsrc-2006Q1
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -4 lines
Instead of accumulating _ALL_DEPENDS_PKGSRCDIRS, accumulate _ALL_DEPENDS
instead -- this keeps more information around.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Jan 19 00:40:00 2006 UTC (20 years, 10 months ago) by jlam
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -3 lines
Remove some unnecessary parens... we don't need to invoke a new shell
just to run the depends-walk command.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Jan 18 20:18:04 2006 UTC (20 years, 10 months ago) by jlam
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +17 -3 lines
Move the following targets from bsd.pkg.mk to bsd.utils.mk:

	show-depends-dirs
	show-all-depends-dirs
	show-all-depends-dirs-excl

While we're here, reimplement them using the new pkg_paths and
depends-depth-first.awk scripts.  As a side effect, this speeds up
the execution of these targets by around 5-15% depending on the
complexity of the dependency graph.

NOTE: This *does* change the behavior of these targets slightly because
      the output is now newline-separated instead of space-separated,
      and the order of the output lines doesn't match the original
      targets because the dependency graph is now walked depth-first
      instead of breadth first.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Jan 18 18:03:08 2006 UTC (20 years, 10 months ago) by jlam
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +12 -8 lines
Modify the show-depends-pkgpaths implementation so that we don't assume
package directories specified in DEPENDS lines begin with "../..".  The
new standalone script pkgsrc/mk/scripts/pkg_path will canonicalize them
into package paths relative to ${PKGSRCDIR}.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Jan 18 03:58:19 2006 UTC (20 years, 10 months ago) by jlam
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +6 -4 lines
Pass MAKEFLAGs to the depends-depth-first.awk script, which will be
used by the "make show-depends-pkgpaths" process to short-circuit some
of the rather lengthy computations that are spread throughout bsd.pkg.mk
and files included by bsd.pkg.mk.  This causes the script to speed up
noticeably.

Also, rename the _DEPENDS_DEPTH_FIRST_CMD variable to _DEPENDS_WALK_CMD
for brevity and to allow for other implementations in the future.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Jan 18 00:10:07 2006 UTC (20 years, 10 months ago) by jlam
Branches: MAIN
Create a standalone awk script, depends-depth-first.awk, that encapsulates
the code that performs the dependency graph traversal (in depth-first
fashion).  This script has a hook that allows executing a shell command
line upon visiting a dependency's package directory in either prefix
or postfix order, and may be used to simplify the code in bsd.pkg.mk
that iterates over dependencies.

This awk script requires the target "show-depends-pkgpaths", which is
defined in a new Makefile pkgsrc/mk/bsd.utils.mk.  This file should
accumulate "utility" targets that current exist in bsd.pkg.mk, i.e.,
"helper" targets for various actions.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>