From nobody Fri Mar 29 07:13:09 2024 X-Original-To: dev-commits-src-main@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 4V5WpF4tdQz5Ff88; Fri, 29 Mar 2024 07:13:09 +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 4V5WpF48fSz4YcK; Fri, 29 Mar 2024 07:13:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711696389; 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=raTo3d3ZRIeEyZqElK/V3aRPTks0U9Wbgm1bCtwROG0=; b=gQP/TONaLkqp8etIeG7RikFiY+dKkPmA1GUE3tKSdRViOVD/LLJHNE1gp8C+kqPDescWY5 hZVuDkY1PSYODsTsq5PTeYzYmf9axfVATXkDlswmf6m98Kay//hWP2gLHidmn0gDNy43L5 04XorJlbuSOvnY0EekE3x4IQvBlx4fDZnAFuMgKGB4xOHjrTX1Rt5GtWT9OKRntVwUiJCF cDpKJGIqwYLUWgc6qUmPdW+4nHW6olGsrTsKlvrSQhlEqYs04/00RCgxrkccGzWmZGQwm9 I0OJmehCA5kJR2plDMFvWLYuKpKeNhV2PJReXF0e7tUeZXnGjlVrhVlrAKG6lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711696389; a=rsa-sha256; cv=none; b=bBQ4kv55bs2PcggSXRGsY0tBTAIHRSU27pTRgXrWt9SE0tBvTO2IWALvyqTiMK7QART8sc tiG+7v1Zc+azvciSOgsHANm4OoOQMyKHPX4YSZYx3oZ4fWTGlmfHactcas0K6rEiLp1df1 yNCflRNrrtUpgyNdFwvZ5/+9guevZ/7njQQclWwmYFQgSy5bnYuaHxcTuyDyfMni3P1VS5 Ovfu4362V+v0ieWAlGOZZa5oPQUUaJOLvFgshoS2ZyNg3mBT5G2jMdz1GXZu7RvRj53pVJ qmzZiqpsI3f/iHQ2sBoWfGlAEQnX86kbgjoNKmNkigduyMyPEpmInhKWH/NuZQ== 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=1711696389; 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=raTo3d3ZRIeEyZqElK/V3aRPTks0U9Wbgm1bCtwROG0=; b=FUtrNgcJWNwOrFgQbR9Sal6Uw98adqboMlBautcDQYwwtPLoP5ybLxe8/0KPym/GyiLRvp e/d1KcqiT++T1nCcfMdmG3itzQYxPjRspOMnNgNfbHLVQnQVTyKFJWuBS4Fv0cdl8mdVHQ dPdhSTL/Qbn7SsLu0h27FWiTf+Wsp2hYObx0/YdDFsBWzKdfO6bEZs3/9rFuE0Umgd1xAM H47Vcmh5Mcx+6tp/XNWL3kJ6zMO0wa2v4Eh04q0E7z8bWOtSy6A7aLiApFDcwbSXvoip4Q IgeGsk+eLBl6gCeU2XO8DZRGQyGlZfwE6VpGREG1FMgw0LS5pB9UorUHp1P8FA== 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 4V5WpF3k2mz11wr; Fri, 29 Mar 2024 07:13:09 +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 42T7D9E3060875; Fri, 29 Mar 2024 07:13:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42T7D9d3060872; Fri, 29 Mar 2024 07:13:09 GMT (envelope-from git) Date: Fri, 29 Mar 2024 07:13:09 GMT Message-Id: <202403290713.42T7D9d3060872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 6baddb6b1176 - main - release.sh: Don't install git if already present List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6baddb6b117664f51e2b1d2427fced946913a08f Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6baddb6b117664f51e2b1d2427fced946913a08f commit 6baddb6b117664f51e2b1d2427fced946913a08f Author: Colin Percival AuthorDate: 2024-03-29 07:10:50 +0000 Commit: Colin Percival CommitDate: 2024-03-29 07:12:52 +0000 release.sh: Don't install git if already present Prior to this commit, we install git from ports if there is a ports tree available and git is not installed, and we install git from pkg otherwise -- including the case where git is already installed. Rework the logic to not (re)install git at all if it is already installed. MFC after: 3 days --- release/release.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/release/release.sh b/release/release.sh index 75278a12daa6..c9d0203debd4 100755 --- a/release/release.sh +++ b/release/release.sh @@ -252,11 +252,11 @@ extra_chroot_setup() { cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF} fi - if [ -z "${NOGIT}" ]; then - # Install git from ports or packages if the ports tree is - # available and VCSCMD is unset. - _gitcmd="$(which git)" - if [ -d ${CHROOTDIR}/usr/ports -a -z "${_gitcmd}" ]; then + _gitcmd="$(which git)" + if [ -z "${NOGIT}" -a -z "${_gitcmd}" ]; then + # Install git from ports if the ports tree is available; + # otherwise install the pkg. + if [ -d ${CHROOTDIR}/usr/ports ]; then # Trick the ports 'run-autotools-fixup' target to do the right # thing. _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U)