aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-11-06 16:06:12 +0000
committerColin Percival <cperciva@FreeBSD.org>2025-11-10 18:49:08 +0000
commitee234a8f17039ca770fda42e45ba9559bc2eb24a (patch)
tree7f79617ff7a1d59008be8285ea92962df268d42b
parent854651d47e658d1ebf1d27f731a7c852be149da9 (diff)
freebsd-update: Swap pkg(8) flags in check_pkgbase()
Unbootstrapped pkg will ignore -N if -r is specified first. Flip the order. Prior to commit 66c75fa63aff this worked by accident. Approved by: re (cperciva) PR: 290393 Reported by: olgeni MFC after: 3 days Fixes: 66c75fa63aff ("freebsd-update: Fix the pkgbase check") (cherry picked from commit 645352316be6901077dc1a3ce26f41934136f412) (cherry picked from commit addc0556ce547425f9810fe081b46e8472340333)
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 7815502dba39..23f1106e3bde 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -1103,7 +1103,7 @@ IDS_check_params () {
check_pkgbase()
{
# Packaged base requires that pkg is bootstrapped.
- if ! pkg -r ${BASEDIR} -N >/dev/null 2>/dev/null; then
+ if ! pkg -N -r ${BASEDIR} >/dev/null 2>/dev/null; then
return 1
fi
# uname(1) is used by pkg to determine ABI, so it should exist.