Skip to content

Commit

Permalink
When testing, build test-depends too, and install the depends as root.
Browse files Browse the repository at this point in the history
  • Loading branch information
mat813 committed Oct 27, 2015
1 parent ee5bc5b commit 017be2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/share/poudriere/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ _real_build_port() {
# Don't need to install if only making packages and not
# testing.
[ -n "${PORTTESTING}" ] && \
install_order="${install_order} test install-mtree install"
install_order="${install_order} test-depends test install-mtree install"
fi
targets="check-sanity pkg-depends fetch-depends fetch checksum \
extract-depends extract patch-depends patch build-depends \
Expand Down Expand Up @@ -3117,10 +3117,13 @@ prefix_output() {
}
list_deps() {
[ $# -ne 1 ] && eargs list_deps directory
[ $# -ne 1 -a $# -ne 2 ] && eargs list_deps directory '[testing]'
local dir="/usr/ports/$1"
local makeargs="-VPKG_DEPENDS -VBUILD_DEPENDS -VEXTRACT_DEPENDS -VLIB_DEPENDS -VPATCH_DEPENDS -VFETCH_DEPENDS -VRUN_DEPENDS"
[ -n "$2" ] && \
makeargs="${makeargs} -VTEST_DEPENDS"
prefix_stderr_quick "(${COLOR_PORT}$1${COLOR_RESET})${COLOR_WARN}" \
injail make -C ${dir} $makeargs | tr ' ' '\n' | \
awk -F: '{ gsub(/\/usr\/ports\//,"", $2); print $2 }' | \
Expand Down Expand Up @@ -3746,7 +3749,7 @@ compute_deps_port() {
msg_verbose "Computing deps for ${COLOR_PORT}${port}"
for dep_port in `list_deps ${port}`; do
for dep_port in `list_deps ${port} ${PORTTESTING}`; do
msg_debug "${COLOR_PORT}${port}${COLOR_DEBUG} depends on ${COLOR_PORT}${dep_port}"
if [ "${port}" = "${dep_port}" ]; then
msg_error "${COLOR_PORT}${port}${COLOR_RESET} incorrectly depends on itself. Please contact maintainer of the port to fix this."
Expand Down
2 changes: 1 addition & 1 deletion src/share/poudriere/testport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ if [ $CONFIGSTR -eq 1 ]; then
unset PORTSDIR PORT_DBDIR TERM
fi

LISTPORTS=$(list_deps ${ORIGIN} )
LISTPORTS=$(list_deps ${ORIGIN} testing )
prepare_ports
markfs prepkg ${MASTERMNT}

Expand Down

0 comments on commit 017be2e

Please sign in to comment.