Page MenuHomeFreeBSD

D47378.id145889.diff
No OneTemporary

D47378.id145889.diff

Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh
+++ usr.sbin/freebsd-update/freebsd-update.sh
@@ -1110,12 +1110,13 @@
if ! pkg -c ${BASEDIR} -N >/dev/null 2>/dev/null; then
return
fi
- # Presence of FreeBSD-* package(s) indicates packaged base.
- if ! pkg -c ${BASEDIR} info -q -x '^FreeBSD' 2>/dev/null; then
+ # uname(1) is used by pkg to determine ABI, so it should exist.
+ # If it comes from a package then this system uses packaged base.
+ if ! pkg -c ${BASEDIR} which /usr/bin/uname >/dev/null; then
return
fi
cat <<EOF
-FreeBSD-update is incompatible with the use of packaged base. Please see
+freebsd-update is incompatible with the use of packaged base. Please see
https://wiki.freebsd.org/PkgBase for more information.
EOF
exit 1
@@ -3551,7 +3552,6 @@
# Fetch files for upgrading to a new release.
cmd_upgrade () {
- check_pkgbase
finalize_components_config ${COMPONENTS}
upgrade_check_params
upgrade_check_kmod_ports
@@ -3586,7 +3586,6 @@
# Install downloaded updates.
cmd_install () {
- check_pkgbase
finalize_components_config ${COMPONENTS}
install_check_params
install_create_be
@@ -3595,7 +3594,6 @@
# Rollback most recently installed updates.
cmd_rollback () {
- check_pkgbase
finalize_components_config ${COMPONENTS}
rollback_check_params
rollback_run || exit 1
@@ -3632,6 +3630,9 @@
# Clear environment variables that may affect operation of tools that we use.
unset GREP_OPTIONS
+# Disallow use with packaged base.
+check_pkgbase
+
get_params $@
for COMMAND in ${COMMANDS}; do
cmd_${COMMAND}

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 13, 4:25 AM (6 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29588651
Default Alt Text
D47378.id145889.diff (1 KB)

Event Timeline