Date: Thu, 31 Oct 2024 12:17:17 -0700 From: Mark Millard <marklmi@yahoo.com> To: Ed Maste <emaste@freebsd.org>, dev-commits-src-main@freebsd.org Subject: RE: git: cf1aba2857c1 - main - freebsd-update: refuse to operate on a pkgbase system Message-ID: <7FF78752-80EB-47CA-9E60-515607D3CFE5@yahoo.com> References: <7FF78752-80EB-47CA-9E60-515607D3CFE5.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ed Maste <emaste_at_FreeBSD.org> wrote on Date: Thu, 31 Oct 2024 18:35:59 UTC : > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcf1aba2857c1ec59c9a34d363cb18a61= ffa34a10 >=20 > commit cf1aba2857c1ec59c9a34d363cb18a61ffa34a10 > Author: Ed Maste <emaste@FreeBSD.org> > AuthorDate: 2024-10-30 19:15:13 +0000 > Commit: Ed Maste <emaste@FreeBSD.org> > CommitDate: 2024-10-31 18:35:44 +0000 >=20 > freebsd-update: refuse to operate on a pkgbase system >=20 > FreeBSD-update is not compatible with packaged base. >=20 > PR: 282252 > Reviewed by: bapt, markj (earlier) > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D47341 > --- > usr.sbin/freebsd-update/freebsd-update.sh | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) >=20 > diff --git a/usr.sbin/freebsd-update/freebsd-update.sh = b/usr.sbin/freebsd-update/freebsd-update.sh > index 459d54db0c57..80a8bf288251 100644 > --- a/usr.sbin/freebsd-update/freebsd-update.sh > +++ b/usr.sbin/freebsd-update/freebsd-update.sh > @@ -1099,6 +1099,25 @@ IDS_check_params () { > fetch_setup_verboselevel > } >=20 > +# Packaged base and freebsd-update are incompatible. Exit with an = error if > +# packaged base is in use. > +check_pkgbase() > +{ > + # Packaged base requires that pkg is bootstrapped. > + 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 Slight difference in the comment vs. the code's behavior? : Comment: FreeBSD-* Code: FreeBSD* Looks to me like possibly the code is not as intended ("-" required?). > + return > + fi > + cat <<EOF > +FreeBSD-update is incompatible with the use of packaged base. Please = see > +https://wiki.freebsd.org/PkgBase for more information. > +EOF > + exit 1 > +} . . . =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7FF78752-80EB-47CA-9E60-515607D3CFE5>