Skip to content

Commit ca19a3c

Browse files
committed
When testing, build test-depends too, and install the depends as root.
1 parent a3a5644 commit ca19a3c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/share/poudriere/common.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,7 +2198,7 @@ _real_build_port() {
21982198
# Don't need to install if only making packages and not
21992199
# testing.
22002200
[ -n "${PORTTESTING}" ] && \
2201-
install_order="${install_order} test install-mtree install"
2201+
install_order="${install_order} test-depends test install-mtree install"
22022202
fi
22032203
targets="check-sanity pkg-depends fetch-depends fetch checksum \
22042204
extract-depends extract patch-depends patch build-depends \
@@ -3252,10 +3252,13 @@ prefix_output() {
32523252
}
32533253
32543254
list_deps() {
3255-
[ $# -ne 1 ] && eargs list_deps directory
3255+
[ $# -ne 1 -a $# -ne 2 ] && eargs list_deps directory '[testing]'
32563256
local dir="/usr/ports/$1"
32573257
local makeargs="-VPKG_DEPENDS -VBUILD_DEPENDS -VEXTRACT_DEPENDS -VLIB_DEPENDS -VPATCH_DEPENDS -VFETCH_DEPENDS -VRUN_DEPENDS"
32583258
3259+
[ -n "$2" ] && \
3260+
makeargs="${makeargs} -VTEST_DEPENDS"
3261+
32593262
prefix_stderr_quick "(${COLOR_PORT}$1${COLOR_RESET})${COLOR_WARN}" \
32603263
injail /usr/bin/make -C ${dir} $makeargs | tr ' ' '\n' | \
32613264
awk -F: '{ gsub(/\/usr\/ports\//,"", $2); print $2 }' | \
@@ -3890,7 +3893,7 @@ compute_deps_port() {
38903893
38913894
msg_verbose "Computing deps for ${COLOR_PORT}${port}"
38923895
3893-
for dep_port in `list_deps ${port}`; do
3896+
for dep_port in `list_deps ${port} ${PORTTESTING}`; do
38943897
msg_debug "${COLOR_PORT}${port}${COLOR_DEBUG} depends on ${COLOR_PORT}${dep_port}"
38953898
if [ "${port}" = "${dep_port}" ]; then
38963899
msg_error "${COLOR_PORT}${port}${COLOR_RESET} incorrectly depends on itself. Please contact maintainer of the port to fix this."

src/share/poudriere/testport.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ if [ $CONFIGSTR -eq 1 ]; then
172172
unset PORTSDIR PORT_DBDIR TERM
173173
fi
174174

175-
LISTPORTS=$(list_deps ${ORIGIN} )
175+
LISTPORTS=$(list_deps ${ORIGIN} testing )
176176
prepare_ports
177177
markfs prepkg ${MASTERMNT}
178178

0 commit comments

Comments
 (0)