From nobody Thu Jun 20 08:03:49 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 4W4Y0Q1Bbwz5NFPR; Thu, 20 Jun 2024 08:03:50 +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 4W4Y0Q0N2hz4v52; Thu, 20 Jun 2024 08:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718870630; 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=NJus3RoUI6zrC0sPjQ0Jsf2uMTEr0R6nMA4haslh0Lc=; b=X+Exbo2/YERI+cGUT6fQHpBawe8+w1MCxsBuEyvqlmO3tY3fFb6b0iXqUDnaVPO0EnKy67 WZbQhHU8EzDkD+iOEEV4+KhhnleNdfqjfRdavg5PDXeGoN+AkDXmCqNWALhjOVeRCXxMj3 ZH7IBTywIOunu4o7w9aD4f6Xk2SW/RHbOhewwc+cpI7lJPHFDlayyMyRB+XjNWOXnyrJo9 QIPPngzjZQeuBTthhP4s6rsrcpVy5PwIuBvx0QHG59ocx7K3RP4OxeVu11mIaBkFqCa/9P 254uTb5yO4iKEQGuAMhz/xq2e7z7hJZPW8uuKPALGjDEpSueCw8oCzV6aGQmtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718870630; a=rsa-sha256; cv=none; b=ncoxTPftbW0a0+rb3UYrlg4QLS1bGLSKqbHGy/I4tkesKbWEUqzqMn7ObY+DUSdhlaVvUm pmt1PR1Ec+kVMczVvdTahP6atqyf88F4Hwj3ul+BxzrBQuMuDroF0UG/B0wWcjDV7DXxLy p6Pi5rdIUf4C9Q7TAzvCUGFEUUiTj0SdTrZhKW5LC+B+cYr7zBUYNik0Fa4gS4D92CutdN Tq6iW805DJDlUHW9cZQPuhjxeqympSPlKQjBDnJwMUj+Un/FgWg0MyX5Ua56LEwyLFULoz Jtbev0xAZQZYFOIOvcir+/tLMx0PSyle0TYbfHKSOXRBUNVnWprdLyUswcQjiQ== 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=1718870630; 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=NJus3RoUI6zrC0sPjQ0Jsf2uMTEr0R6nMA4haslh0Lc=; b=EGMAUSAkPhi9vdIurTBe2bwWF/u61UiBr6sC67+jYPemylcFNEvvlWbN+H5Lnx4wkNQUp+ C5fDYRsASzVnVfAcdhLOpUI+GcKf6V/XZMGSTQzkmXvan2jOmd9ufmpS1crjhcILRUGxvU B/C/H2ivGB0OCdloP2DSmow4VFFatzMAcJysIK1yohpRz9zcYUwfLC6f++H7AUTr4h7QM9 fPjTIrazPgGKg4yUZVDJ+o4rGRUATX5dyD9BqMgI1xpGFrgUZv9x2FTd1CjvgL5wpbrd/H o81PsX5vzFxdrYMa5mqcFZUYUW8TMDASy4m+kzVZ/+ZjxKAsQpQm9dOdcx/aLQ== 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 4W4Y0P74zPzHPV; Thu, 20 Jun 2024 08:03:49 +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 45K83ngJ068134; Thu, 20 Jun 2024 08:03:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45K83nh7068130; Thu, 20 Jun 2024 08:03:49 GMT (envelope-from git) Date: Thu, 20 Jun 2024 08:03:49 GMT Message-Id: <202406200803.45K83nh7068130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 4231a5e50404 - main - release: don't keep old packages if the BRANCH changes 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4231a5e5040403f4ae46a63bf6e1209d5eb7adb8 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=4231a5e5040403f4ae46a63bf6e1209d5eb7adb8 commit 4231a5e5040403f4ae46a63bf6e1209d5eb7adb8 Author: Siva Mahadevan AuthorDate: 2024-06-05 18:11:38 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-20 08:02:34 +0000 release: don't keep old packages if the BRANCH changes --- Makefile.inc1 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 28ab291928ff..91d59e57b396 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -576,17 +576,23 @@ MAJOR_REVISION= ${_REVISION:R} _PKG_REVISION= ${_REVISION} _STRTIMENOW= %Y%m%d%H%M%S _TIMENOW= ${_STRTIMENOW:gmtime} +BRANCH_EXT= .if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} _PKG_REVISION= ${MAJOR_REVISION} -EXTRA_REVISION= .snap${_TIMENOW} +BRANCH_EXT= snap +EXTRA_REVISION= .${BRANCH_EXT}${_TIMENOW} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= a${_BRANCH:C/ALPHA([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= b${_BRANCH:C/BETA([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= rc${_BRANCH:C/RC([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:M*-p*} -EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} +BRANCH_EXT= p${_BRANCH:C/.*-p([0-9]+$)/\1/} +EXTRA_REVISION= ${BRANCH_EXT} .endif PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif @@ -2020,9 +2026,11 @@ PKG_EXT= pkg .if exists(${REPODIR}/${PKG_ABI}) PKG_VERSION_FROM!=/usr/bin/readlink ${REPODIR}/${PKG_ABI}/latest PKG_VERSION_FROM_DIR= ${REPODIR}/${PKG_ABI}/${PKG_VERSION_FROM} +BRANCH_EXT_FROM= ${PKG_VERSION_FROM:C/.*([[:alpha:]][^\.]*).*/\1/} .else PKG_VERSION_FROM= PKG_VERSION_FROM_DIR= +BRANCH_EXT_FROM= .endif .endif .endif @@ -2060,7 +2068,7 @@ real-update-packages: stage-packages .PHONY continue; \ fi ; \ newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \ - if [ "$${oldsum}" == "$${newsum}" ]; then \ + if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT}" -a $${oldsum}" == "$${newsum}" ]; then \ echo "==> Keeping old ${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION_FROM}.${PKG_EXT}" ; \ rm ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ; \ cp $${pkg} ${REPODIR}/${PKG_ABI}/${PKG_VERSION} ; \