Commit graph

6 commits

Author SHA1 Message Date
dbj
06b5331c6d this script was not visiting packages in the proper order when subpackages
had common dependencies.  This change hopefully fixes that.
2009-01-05 02:37:05 +00:00
jlam
ae4a2129c3 While walking the dependency graph, push the dependencies onto the
stack in the reverse order that show-depends-pkgpaths outputs them.
This makes the top element of the stack the first child dependency
that was marked as "pushed".  This change orders the default "postfix"
output of this script in such a way that for any package listed in
the output, there is no earlier package that depends on it.

In other words, you can take the default output and install from first
to last and never need to install any dependencies, because any
dependencies are guaranteed to have already been installed earlier.
2006-01-21 22:16:13 +00:00
jlam
d04be0cdcb duh... stacks are LIFOs not FIFOs. 2006-01-21 21:46:24 +00:00
jlam
eb3653b4a8 whitespace nit. 2006-01-18 17:43:08 +00:00
jlam
8eef20de06 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.
2006-01-18 03:58:19 +00:00
jlam
5c5ac03ec1 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.
2006-01-18 00:10:07 +00:00