trace the dependency information. This is computed and stored in .depends directly now before anything else is done. The output is locked and the locking is supposed to work before the bootstrap-depends are installed. Add a new hook for flavors after all dependencies are added and before the depends-cookie is created. Use this to compute which package is used to fulfill each dependency and store it in .rdepends. Adjust register-dependencies and some other places to use this information directly instead of recomputing it all the time. The code to list all dependencies and to recursively install missing ones is moved to a separate shell script. This makes it easier to understand what is going on and extend them later. Change the calling of pkg_create to prepend the dependencies directly to the passed-in PLIST and not via -P and -T. This is in preperation of changing the way they are stored in the packages. Discussed with, recieved minor disagreement about install-dependencies, but otherwise OKed by jlam.
67 lines
1.3 KiB
Bash
Executable file
67 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
######################################################################
|
|
#
|
|
# NAME
|
|
# list-dependencies -- build package dependencies list
|
|
#
|
|
# SYNOPSIS
|
|
# list-dependencies bootstrap build full
|
|
#
|
|
# DESCRIPTION
|
|
# For each (reduced) dependency a line of the following format is
|
|
# printed:
|
|
#
|
|
# <depends_type> <pattern> <directory>
|
|
#
|
|
# Valid dependency types are "bootstrap", "build" and "full".
|
|
#
|
|
# ENVIRONMENT
|
|
# AWK
|
|
# This is the path to the awk interpreter.
|
|
#
|
|
# PKGSRCDIR
|
|
# This is the root of the pkgsrc tree.
|
|
#
|
|
# SED
|
|
# This is the path to the sed command.
|
|
#
|
|
# The following variables are used by the reduce-depends.awk script:
|
|
#
|
|
# PKG_ADMIN
|
|
# This is the path to the pkg_admin command.
|
|
#
|
|
# PWD_CMD
|
|
# This is the path to the pwd command.
|
|
#
|
|
######################################################################
|
|
|
|
: ${ECHO:=echo}
|
|
: ${TEST:=test}
|
|
: ${CAT:=cat}
|
|
|
|
set -e
|
|
|
|
reduce_depends() {
|
|
${AWK} -f ${PKGSRCDIR}/mk/flavor/pkg/reduce-depends.awk "$1"
|
|
}
|
|
|
|
print_entries() {
|
|
reduce_depends "$2" | while read dep; do
|
|
pattern=`${ECHO} "$dep" | ${SED} -e "s,:.*,,"`
|
|
dir=`${ECHO} "$dep" | ${SED} -e "s,.*:,,"`
|
|
[ "$pattern" ]
|
|
[ "$dir" ]
|
|
${ECHO} "$1 $pattern $dir"
|
|
done
|
|
}
|
|
|
|
if ${TEST} $# != 3;
|
|
then
|
|
${ECHO} "list-dependencies must be called with 3 arguments" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
print_entries bootstrap "$1"
|
|
print_entries build "$2"
|
|
print_entries full "$3"
|