From nobody Tue Apr 02 20:44:54 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 4V8Kd25YFWz5Fk4s; Tue, 2 Apr 2024 20:44:54 +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 4V8Kd24xwzz54Nf; Tue, 2 Apr 2024 20:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712090694; 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=qZVM726yTkuNRF5MvtCM68LT50JlFicniZAx1JbkQMo=; b=YQmAZGdguOU4DT+u8osapSdA/G2zsCasyz7zwj2imEgmCIvd2jeW5ovxyPeYPihGGSGAMo O+aLTezM7Gzpea/AjYGp6O65Ps9OUb8fHCKP+itwAI72SI1Gi6lpAFHHL0xb7yUaQU3Pmc 63w7rW/KigrD3I8fkNPH7O/3Hd9Am0qHVjUclPNSrOaGdAbg0/lIOQknDpnXoM8wGgG6ur YukRZ6BYTxDDd6NA4uKS3XeQj7w87tu2Ce44AprH60d+jEkXzyO7KB+jLB/QUObx4u7VEH q7cATycN+Ae/84g8OYlXIOp/wScEN0wh8jPMKukGlOOlPbF6bc80qlSx+qa/5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712090694; a=rsa-sha256; cv=none; b=SeBiCSVGM7whlZcxDkGRHdKS0kudQl2cQJyEh5aOCmDCn3xq0XRel76Nv0JJw72IZjjUE2 g9nWZ6Yl8AGOw/TVdowzHP3nEY/RK9lDGyUllm9Czn1PBUd5MnnG3ktBCes3AWxBNsbLqy 2N3RLzHsVpd5ZHeQvay7wEl068z0xQqmtF6t6VHfA2O2790O4hLRquoGL3IzXsmqdq5S5x FWIaiL4Kej1YeXzy4QKm7+SPMDfDL/lab+Ts8X5zGwNNp0uwQQbTNgDud0/palBu6FIkBo n0jHDbKBZ+BrpYaw5Uo0E+NHHhNMap20Y0Eg77VlGaHHD3wrB5BekUtA0Eo0MQ== 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=1712090694; 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=qZVM726yTkuNRF5MvtCM68LT50JlFicniZAx1JbkQMo=; b=EOsyTjkrIXJaOLKE8S7qzQ8BwXSssQS39sx4b0GwN8ELiz0EcAScaWXj0GcaC5HAiJwQ8Q cxuyccNtxuqkJe8nsbWHFqzKcAY57oTicqcNyAz/ZDarYkBda9++Mw2Mlq0UdzyMJDx05w ZGlddRl9dGPjbgx9XLtFTtq5Waz43nFPYgklgxOKsDDLGrsM5VDbgO15WnMjUafSDGU9um NePSTt1O0Mcxc/4/HLPEmAEYtOb0BA8oKGiYnYAGgVRhvhYDYSOWKisboeox57Urtx/7kY bbS00jiDgbJ4rH1m5DYcpZGdR8HoymF7CFctFtAjjLIk3QBOX3KvN13FvbUR7A== 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 4V8Kd24TYfz14Ng; Tue, 2 Apr 2024 20:44:54 +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 432Kissq015609; Tue, 2 Apr 2024 20:44:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 432KisTv015606; Tue, 2 Apr 2024 20:44:54 GMT (envelope-from git) Date: Tue, 2 Apr 2024 20:44:54 GMT Message-Id: <202404022044.432KisTv015606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 853241218da2 - stable/13 - release.sh: Don't install git if already 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 853241218da2d2eed02e76683b77842451fcdf0f Auto-Submitted: auto-generated The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=853241218da2d2eed02e76683b77842451fcdf0f commit 853241218da2d2eed02e76683b77842451fcdf0f Author: Colin Percival AuthorDate: 2024-03-29 07:10:50 +0000 Commit: Colin Percival CommitDate: 2024-04-02 20:44:46 +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 (cherry picked from commit 6baddb6b117664f51e2b1d2427fced946913a08f) --- 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)