From nobody Thu May 23 04:11:14 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 4VlF8y4Xw7z5H1Mt; Thu, 23 May 2024 04:11:14 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlF8y40dVz4JLx; Thu, 23 May 2024 04:11:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716437474; 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=sDX3kYqtkgT8gjT881coc+VQe++F81JR7Bece5BHg7Q=; b=D1nBnWMcWjjt/4uYMocCs0mo0aMgZMpM33W31Xp0C760Ubjy+vLlAFGE3sASPYXgpN3X8d TfP9thgLpz4HRfCj/NIRfvcZNz00IzHeL8lUYvrNwO1vDtmpSW1AncjJuHG8fALJaJqRzY XJ7+JpID3eVyX54kHkcymFyVKzb8wPChXpGuJOOMmNia0REid4H6geJhRZd7wXYkbXxoI2 Kqcy0UCC9CVJ9ewX7Fu0IYouLv8rjaTOUPIRQhOLGKrSghifNrUByuL7XNN70npoMFdVtb TfIlmFQET7Z15YFt/KSE6o/4y0JwxjWXjL/llzA8MJLIA5LC69UVpGzQf3knNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716437474; a=rsa-sha256; cv=none; b=HOmVWA7ODfZ8fsUd/GggN3YkdZwILEu+oR5biUM9Bt0E82NFBjsnBi6K9QwepHwmUzjSO6 2y2GLXhKrnL3AQ1bCZ85S8BRh2XuH3JR1ul+lutewPixCUECyTpkWP8IVvRXvD6ibwdlhd 46BK6Ev3xp4esfBfOEY8TfvwHEMZ0xoaqE//1vNPX+i8peBmXUdoadyolkA6CepBDnuw0Q ShPAFyy0Xsj82wW/l89VgklGJ2JGVpmcWomgUfxX9PlIjYxPdlTPlktnrlylxX/tcxKQNy 8bQk58lsKbtSAgQ9/C8x9KF3lwLcRXkbRbzbe5FDr9gc7fHYR9G+x2AiSXHthQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716437474; 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=sDX3kYqtkgT8gjT881coc+VQe++F81JR7Bece5BHg7Q=; b=Y+KJQhAEuyqpceo0oqLii1yze9C/W8dMmtFmNbe9V/XyOSUHhOeTP1sskeQNqzjd1LvgKz W8a4t94m4EbRynqpS5S1Q1f0ogOm3aDx2ymy/00RjOBFDtnYIyzgwT8ZS2RDUvO8QjqmVa 0JsDGFPqdZEHs/hX2QVC+TcTh7xF/63PSPbH+Pzy4vywaivh9CIwY6Y2ZNlss6pj4dJJo6 NurM3itLtS1OG1CXZIg39ZcXVHNaLAM9+yuEks4Oo6E9eqXbWhNMPDmjZjcIH3N3wj9y6P LBKZFOsRBDGNT+z8oTDNircOml3SxsG6X7vThV7K2C6jnrM0hF7t+Vqyofio8A== 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 4VlF8y3Zr5zZ5W; Thu, 23 May 2024 04:11:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N4BETS009285; Thu, 23 May 2024 04:11:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N4BEIC009282; Thu, 23 May 2024 04:11:14 GMT (envelope-from git) Date: Thu, 23 May 2024 04:11:14 GMT Message-Id: <202405230411.44N4BEIC009282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: d76ef58d566c - main - freebsd-update: Correctly check if pkg(8) is present 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d76ef58d566ccf203b21a1c8fea55985f355d4d2 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d76ef58d566ccf203b21a1c8fea55985f355d4d2 commit d76ef58d566ccf203b21a1c8fea55985f355d4d2 Author: Zhenlei Huang AuthorDate: 2024-05-23 04:10:17 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-23 04:10:17 +0000 freebsd-update: Correctly check if pkg(8) is present On systems without pkg(8) installed, `command -v pkg` will return success and falsely report that pkg(8) is present. Fix that by checking via the `pkg -N` form. This is missing from the final revision of D39695. Reported by: delphij Reviewed by: fernape, delphij Fixes: bc0c6c9cf3a9 freebsd-update: Add check for kernel modules Differential Revision: https://reviews.freebsd.org/D45292 --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index fb9924ee60eb..1456601edf26 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -667,7 +667,7 @@ upgrade_check_kmod_ports() { local report local w - if ! command -v pkg >/dev/null; then + if ! pkg -N 2>/dev/null; then echo "Skipping kernel modules check. pkg(8) not present." return fi