Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2021-09-10 07:14:27 +0300
committerBryan Drewery <bryan@shatow.net>2021-09-25 19:38:56 +0300
commitf2dc9bfdf238270d1bd469251d87da51c3a35b1c (patch)
treeca847e78c85884f52f604d665841df14c54276ad /src
parent1929cbb87281c05fcc90a94272663dc84fae08df (diff)
Replace some .. with MASTER_DATADIR
Diffstat (limited to 'src')
-rw-r--r--src/share/poudriere/common.sh12
-rw-r--r--src/share/poudriere/include/pkgqueue.sh12
2 files changed, 10 insertions, 14 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index 62115bc3..92b8cca4 100644
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -1227,15 +1227,11 @@ update_remaining() {
[ $# -eq 0 ] || eargs update_remaining
local log
- _log_path log
if [ "${HTML_TRACK_REMAINING}" != "yes" ]; then
return 0
fi
- (
- cd "${MASTER_DATADIR}/pool"
- pkgqueue_remaining | \
- write_atomic "${log}/.poudriere.ports.remaining"
- )
+ _log_path log
+ pkgqueue_remaining | write_atomic "${log}/.poudriere.ports.remaining"
}
sigpipe_handler() {
@@ -4667,7 +4663,7 @@ build_queue() {
MY_JOBID="${j}" spawn_job \
build_pkg "${pkgname}" "${porttesting}"
pid=$!
- echo "${pid}" > "../var/run/${j}.pid"
+ echo "${pid}" > "${MASTER_DATADIR}/var/run/${j}.pid"
hash_set builder_pids "${j}" "${pid}"
hash_set builder_pkgnames "${j}" "${pkgname}"
done
@@ -4829,7 +4825,7 @@ parallel_build() {
build_queue
- cd ..
+ cd "${MASTER_DATADIR}"
bset status "stopping_jobs:"
stop_builders
diff --git a/src/share/poudriere/include/pkgqueue.sh b/src/share/poudriere/include/pkgqueue.sh
index ccfb184e..db8ce4bc 100644
--- a/src/share/poudriere/include/pkgqueue.sh
+++ b/src/share/poudriere/include/pkgqueue.sh
@@ -41,7 +41,7 @@ pkgqueue_get_next() {
p=$(find ${POOL_BUCKET_DIRS} -type d -depth 1 -empty -print -quit || :)
if [ -n "$p" ]; then
_pkgname=${p##*/}
- if ! rename "${p}" "../building/${_pkgname}" \
+ if ! rename "${p}" "${MASTER_DATADIR}/building/${_pkgname}" \
2>/dev/null; then
# Was the failure from /unbalanced?
if [ -z "${p%%*unbalanced/*}" ]; then
@@ -57,7 +57,7 @@ pkgqueue_get_next() {
fi
fi
# Update timestamp for buildtime accounting
- touch "../building/${_pkgname}"
+ touch "${MASTER_DATADIR}/building/${_pkgname}"
fi
setvar "${pkgname_var}" "${_pkgname}"
@@ -305,10 +305,10 @@ pkgqueue_remaining() {
[ $# -eq 0 ] || eargs pkgqueue_remaining
{
# Find items in pool ready-to-build
- find . -type d -depth 2 | \
- sed -e 's,$, ready-to-build,'
+ ( cd "${MASTER_DATADIR}/pool"; find . -type d -depth 2 | \
+ sed -e 's,$, ready-to-build,' )
# Find items in queue not ready-to-build.
- ( cd ..; pkgqueue_list ) | \
+ ( cd "${MASTER_DATADIR}"; pkgqueue_list ) | \
sed -e 's,$, waiting-on-dependency,'
} 2>/dev/null | sed -e 's,.*/,,'
}
@@ -384,7 +384,7 @@ pkgqueue_empty() {
local n
if [ -z "${ALL_DEPS_DIRS}" ]; then
- ALL_DEPS_DIRS=$(find ../deps -mindepth 1 -maxdepth 1 -type d)
+ ALL_DEPS_DIRS=$(find ${MASTER_DATADIR}/deps -mindepth 1 -maxdepth 1 -type d)
fi
dirs="${ALL_DEPS_DIRS} ${POOL_BUCKET_DIRS}"