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-26 04:59:49 +0300
committerBryan Drewery <bryan@shatow.net>2021-10-26 05:13:10 +0300
commit9561ea00e26a3fe98ce43ee778f932d5ad907b49 (patch)
tree84525edcc04b2d001743fd0ddf5c33943f2f0ffb /src
parent1dfdac878ac86a25a18634b6bbacdf2a473f8b9c (diff)
download_from_repo: Never fetch packages if remote pkg is newer than ports
Diffstat (limited to 'src')
-rw-r--r--src/share/poudriere/common.sh21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index 120fa45b..02eb6650 100644
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -3667,19 +3667,16 @@ download_from_repo() {
PACKAGESITE="${packagesite}" \
${pkg_bin} update -f
- # Make sure the bootstrapped pkg is not newer.
- if [ "${pkg_bin}" = "pkg" ]; then
- local_pkg_name="${P_PKG_PKGNAME:?}"
- local_pkg_ver="${local_pkg_name##*-}"
- remote_pkg_ver=$(injail ${pkg_bin} rquery -U %v \
- ${P_PKG_PKGBASE:?})
- if [ "$(pkg_version -t "${remote_pkg_ver}" \
- "${local_pkg_ver}")" = ">" ]; then
- msg "Package fetch: Not fetching due to remote pkg being newer than local: ${remote_pkg_ver} vs ${local_pkg_ver}"
- rm -f "${missing_pkgs}"
- return 0
- fi
+ remote_pkg_ver=$(injail ${pkg_bin} rquery -U %v ${P_PKG_PKGBASE:?})
+ local_pkg_name="${P_PKG_PKGNAME:?}"
+ local_pkg_ver="${local_pkg_name##*-}"
+ if [ "$(pkg_version -t "${remote_pkg_ver}" \
+ "${local_pkg_ver}")" = ">" ]; then
+ msg "Package fetch: Not fetching due to remote pkg being newer than local: ${remote_pkg_ver} vs ${local_pkg_ver}"
+ rm -f "${missing_pkgs}"
+ return 0
fi
+
# pkg insists on creating a local.sqlite even if we won't use it
# (like pkg rquery -U), and it uses various locking that isn't needed
# here. Grab all the options for comparison.