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-10-23 02:49:27 +0300
committerBryan Drewery <bryan@shatow.net>2021-10-25 17:26:31 +0300
commitcb109b259dfd90b160ca3055368e517812b51203 (patch)
tree1c41b23baba02261b2eaf71de0717f2b79767f47 /src
parent162828a3312de96fc607dbb6d8776d2850219af4 (diff)
download_from_repo: Fix pkg bootstrap with fresh repo + version mismatch
Diffstat (limited to 'src')
-rw-r--r--src/share/poudriere/common.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index 9afd3106..62a33c16 100644
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -3758,17 +3758,25 @@ download_from_repo() {
# bootstrap and fetching.
err 1 "download_from_repo: Fetched pkg version ${remote_pkg_ver} does not match bootstrapped pkg version ${pkgname##*-}"
fi
- mkdir -p "${PACKAGES}/Latest"
# Avoid symlinking if remote PKG_SUFX does not match.
if [ -f "${PACKAGES}/All/${pkgname}.${PKG_EXT}" ]; then
+ mkdir -p "${PACKAGES}/Latest"
ln -fhs "../All/${pkgname}.${PKG_EXT}" \
"${PACKAGES}/Latest/pkg.${PKG_EXT}"
# Backwards compat for bootstrap
ln -fhs "../All/${pkgname}.${PKG_EXT}" \
"${PACKAGES}/Latest/pkg.txz"
- ensure_pkg_installed || \
- err 1 "download_from_repo: failure to bootstrap pkg"
- fi
+ else
+ # We bootstrapped pkg but skipped fetching the pkg
+ # for some reason. Let's just use the bootstrapped one
+ # internally as we need to inspect all of the fetched
+ # packages later. We will still build the local version
+ # of pkg.
+ cp -f "${MASTERMNT}${LOCALBASE:-/usr/local}/sbin/pkg-static" \
+ "${MASTERMNT}${PKG_BIN}"
+ fi
+ ensure_pkg_installed || \
+ err 1 "download_from_repo: failure to bootstrap pkg"
fi
}