Skip to content

Commit 4319d02

Browse files
committed
download_from_repo: Only query and fetch from FreeBSD repo
e37cf98 changed `pkg update` to only update FreeBSD repo. 14.3 now ships with two repos configured - FreeBSD and FreeBSD-kmods. Later calls to `pkg rquery` and `pkg fetch` failed with this multi-repo configuration. Change-Id: Ic9870a0efc9ab9545eecd2e10281ea746a6a6964
1 parent 8d0dd09 commit 4319d02

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/share/poudriere/common.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4508,13 +4508,13 @@ download_from_repo() {
45084508
return 0
45094509
fi
45104510
# Don't trust pkg-update to return its error
4511-
if ! injail ${pkg_bin} rquery -U %n pkg >/dev/null; then
4511+
if ! injail ${pkg_bin} rquery -U -r FreeBSD %n pkg >/dev/null; then
45124512
msg "Package fetch: Failed to fetch package repository."
45134513
rm -f "${missing_pkgs}"
45144514
return 0
45154515
fi
45164516

4517-
remote_pkg_ver="$(injail ${pkg_bin} rquery -U %v "${P_PKG_PKGBASE:?}")"
4517+
remote_pkg_ver="$(injail ${pkg_bin} rquery -U -r FreeBSD %v "${P_PKG_PKGBASE:?}")"
45184518
local_pkg_name="${P_PKG_PKGNAME:?}"
45194519
local_pkg_ver="${local_pkg_name##*-}"
45204520
case "$(pkg_version -t "${remote_pkg_ver}" "${local_pkg_ver}")" in
@@ -4529,25 +4529,25 @@ download_from_repo() {
45294529
# (like pkg rquery -U), and it uses various locking that isn't needed
45304530
# here. Grab all the options for comparison.
45314531
remote_all_options=$(mktemp -t remote_all_options)
4532-
injail ${pkg_bin} rquery -U '%n %Ok %Ov' > "${remote_all_options}"
4532+
injail ${pkg_bin} rquery -U -r FreeBSD '%n %Ok %Ov' > "${remote_all_options}"
45334533
remote_all_pkgs=$(mktemp -t remote_all_pkgs)
4534-
injail ${pkg_bin} rquery -U '%n %n-%v %?O' > "${remote_all_pkgs}"
4534+
injail ${pkg_bin} rquery -U -r FreeBSD '%n %n-%v %?O' > "${remote_all_pkgs}"
45354535
remote_all_deps=$(mktemp -t remote_all_deps)
4536-
injail ${pkg_bin} rquery -U '%n %dn-%dv' > "${remote_all_deps}"
4536+
injail ${pkg_bin} rquery -U -r FreeBSD '%n %dn-%dv' > "${remote_all_deps}"
45374537
remote_all_annotations=$(mktemp -t remote_all_annotations)
45384538
remote_all_cats=$(mktemp -t remote_all_cats)
45394539
case "${IGNORE_OSVERSION-}" in
45404540
"yes") ;;
45414541
*)
4542-
injail ${pkg_bin} rquery -U '%n %At %Av' > "${remote_all_annotations}"
4543-
injail ${pkg_bin} rquery -U '%n %C' > "${remote_all_cats}"
4542+
injail ${pkg_bin} rquery -U -r FreeBSD '%n %At %Av' > "${remote_all_annotations}"
4543+
injail ${pkg_bin} rquery -U -r FreeBSD '%n %C' > "${remote_all_cats}"
45444544
;;
45454545
esac
45464546
abi="$(injail "${pkg_bin}" config ABI)"
45474547
remote_all_abi=$(mktemp -t remote_all_abi)
4548-
injail ${pkg_bin} rquery -U '%n %q' > "${remote_all_abi}"
4548+
injail ${pkg_bin} rquery -U -r FreeBSD '%n %q' > "${remote_all_abi}"
45494549
remote_all_prefix=$(mktemp -t remote_all_prefix)
4550-
injail ${pkg_bin} rquery -U '%n %p' > "${remote_all_prefix}"
4550+
injail ${pkg_bin} rquery -U -r FreeBSD '%n %p' > "${remote_all_prefix}"
45514551

45524552
parallel_start
45534553
wantedpkgs=$(mktemp -t wantedpkgs)
@@ -4589,7 +4589,7 @@ download_from_repo() {
45894589
err 1 "null mount failed for pkg cache"
45904590
if ! JNETNAME="n" injail xargs \
45914591
env ASSUME_ALWAYS_YES=yes \
4592-
${pkg_bin} fetch -U < "${wantedpkgs}"; then
4592+
${pkg_bin} fetch -U -r FreeBSD < "${wantedpkgs}"; then
45934593
msg "Package fetch: Error fetching packages"
45944594
umountfs "${MASTERMNT:?}/var/cache/pkg"
45954595
rm -f "${wantedpkgs}"

0 commit comments

Comments
 (0)