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-03 22:58:13 +0300
committerBryan Drewery <bryan@shatow.net>2021-09-04 22:18:23 +0300
commit868b43b9cd805323afe7aae60f26c36910fe9586 (patch)
tree94f995ea6e06adb7cda62a2d665488dae96b5f19 /src
parent14d46f876b9d78711129cfc245080bd3056610a4 (diff)
Fix race with distfile fetch saving
This is more noticeable with FLAVORS. Fixes #758
Diffstat (limited to 'src')
-rw-r--r--src/share/poudriere/common.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index cf8312e9..5e686997 100644
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -3911,9 +3911,25 @@ gather_distfiles() {
shash_get pkgname-depend_specials "${pkgname}" specials || specials=
job_msg_dev "${COLOR_PORT}${origin}${flavor:+@${flavor}} | ${pkgname_main}${COLOR_RESET}: distfiles ${from} -> ${to}"
+ mkdir -p "${to}/${sub}"
+ (
+ cd "${to}/${sub}"
+ for d in ${dists}; do
+ case "${d}" in
+ */*) ;;
+ *) continue ;;
+ esac
+ echo "${d%/*}"
+ done | sort -u | xargs mkdir -p
+ )
for d in ${dists}; do
- [ -f ${from}/${sub}/${d} ] || continue
- do_clone "${from}/${sub}/${d}" "${to}/${sub}/${d}" || return 1
+ if [ ! -f "${from}/${sub}/${d}" ]; then
+ continue
+ fi
+ # XXX: A --relative would be nice
+ install -pS -m 0644 "${from}/${sub}/${d}" \
+ "${to}/${sub}/${d}" ||
+ return 1
done
for special in ${specials}; do