From nobody Thu Oct 31 18:35:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XfXkS1J26z5c9YR; Thu, 31 Oct 2024 18:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfXkS0ZGwz478F; Thu, 31 Oct 2024 18:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730399760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDEv2wjB59X7DsTOoEAdnDM9zKTICOGWEi4wPpvvx84=; b=HQDpUo+CuN/5oN41AjemFozLNhL7J9XWSbPm0pqGaWm028DDbZKDa7VBf9DuPUpxCbkd/x Zp/rq0/UEcksKkfUupA9OUPXttAbT39OpeUb2JC2Og0x2yNumj10yclkYeK/8+hMMS1gEO g95xg/JmRlqPlsHpxA+hs67oxOt8+SjjsW/GhS3gYEaeGVQfeetAN4dfaXCCjzxAMoAa/0 dvfxR++33ek+jfeDND9S2R3gacODlLxsrV0t2BEVj20953TPWJZ6AllUxxiJCOh64y+UMK s+C9jydYV9ynOpMTlf5GRlDdeZVD1RKgTPgNOp+mN1zY9lc2U6sM0YTLG7+h5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730399760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDEv2wjB59X7DsTOoEAdnDM9zKTICOGWEi4wPpvvx84=; b=m6tjad1jCFy0TpKxh5KY8PQx43ORFJAQJNdnSEn73lCIIVKyFz/rHWXxXs+h5oPtfLO3Zr O7sHh12XBZwidAx5m7M8kA7hzZXYuW3M5598/y6LBl9EqgkKPqSkGSmQyfZBwF4gUuee7p /fWoZ/sjpOx9WcUus6fY2tepgmVsDC5ZvAlBHGv7pDVXvjmqz7SMfhGVBZrIJPB/QrdvBD aiKA1h+YMjD2aJgCr49N7sjzx7nRyMzfw1Nsj7ofgoru4s2Lh/AKeiSmBi/1liEJevaZMz pwegkOdzAxD/PLPlhfOJbEYmJ3o/lYubF13f1VuoJ0ghyi2GIw9XK7o0WdQCoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730399760; a=rsa-sha256; cv=none; b=Th8ifGptji6bEYrk2vebAW34WeUwMr7TuXTYqipkDvCUnGdPRfG2urGck6YaQBsUyauNoe nS6eXblhtQq+1OAc4imST8LLTTH/3hPCrOo+lHzAFOG8/W9U1pgTYdATUE23n/lKKf4q7m soG1prw9JvXHHg46reOsEuyeMD/DO5xTCzPwpHlIerf7wGwrxyZlbe2RdvBTYuL7mivB07 M3L/z63xXKAUrOX576kdMKhBs8MWfqJyfOI/GlOFmGmp7/Mu+admL2Z2RMuITm55Zrwxxa +dIjTlKqAT3PhRd3NQuR1s5HcoBQ7Db40PjJwdeNYBlXTvw3sljZI8ioFYcNTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XfXkS00rRznQ6; Thu, 31 Oct 2024 18:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49VIZxq3058484; Thu, 31 Oct 2024 18:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VIZxH6058481; Thu, 31 Oct 2024 18:35:59 GMT (envelope-from git) Date: Thu, 31 Oct 2024 18:35:59 GMT Message-Id: <202410311835.49VIZxH6058481@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: cf1aba2857c1 - main - freebsd-update: refuse to operate on a pkgbase system List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf1aba2857c1ec59c9a34d363cb18a61ffa34a10 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cf1aba2857c1ec59c9a34d363cb18a61ffa34a10 commit cf1aba2857c1ec59c9a34d363cb18a61ffa34a10 Author: Ed Maste AuthorDate: 2024-10-30 19:15:13 +0000 Commit: Ed Maste CommitDate: 2024-10-31 18:35:44 +0000 freebsd-update: refuse to operate on a pkgbase system FreeBSD-update is not compatible with packaged base. 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(+) 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 } +# 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 + return + fi + cat <