From nobody Tue Sep 10 16:08:10 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 4X37sR1mZ4z5W5nQ; Tue, 10 Sep 2024 16:08:11 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X37sR191Zz3wwJ; Tue, 10 Sep 2024 16:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725984491; 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=9GiR0LxHI4YmB1mTWu/hqixX6Gowb0dtw/Ujxu/5hW0=; b=w810wvT97zQU4N0zEDht3ZJM86dHpYmXf9nMg/gxAIQ/PxJEHZwlxEUeVQtwAHz5RhhCtp hNlkxpPu69zGt7tZWFqVLsATsEqj409KfhEc19dQXw1PrPvJQ+j1RawJpzX33IN/62qa0Z s996j9yxEuE5YC9nSfVf06Ch9eHnPOhJut4z9HFf0Ec+y46lPd8LfwkTZEYBeDWkuD89o7 iK47MidY7N165+QFLPjDxSGgZv/bQW/hTmoLfbRbq4LmHUvVFIy8FT9p/IzmgnhNK7ItNt Rm1an1hzimUbigbdTkn+fvVs97/mr/Ml7GfYKgV+CjbmHbaQ1PrF07LSEZlA7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725984491; a=rsa-sha256; cv=none; b=jafoGOimgSiBDEkjnwVg64vTbOQKpJenymBfXSU0suZXFJIlXD4hRZlU9hhyLRosTt9+8h 3nYyuNnri49IkgwZDGqgAAJnSyZcHecLwTyRFTUEm3XuipyEZiYAqBNRJwTqQoBLAA5QGK z1SJnTqiS9ng6eB/kVR7c2fPvOpUqzbKdZSVL+KrRLgfo3hcBelFNS2mUBFw7v/pu/bgAu Bt50iWq9oSMT1/cVnQ9K4M8bAymK5wx+WFJRbFElBBmpNesXlU74bdTTO7DngEENS0g+vb cDAdnkBgCSXNFduzh010gYSY77NU72+x9CL7dljp5pnTTwWDEHNDCWGQL1fh6g== 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=1725984491; 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=9GiR0LxHI4YmB1mTWu/hqixX6Gowb0dtw/Ujxu/5hW0=; b=N2BnuhhaLLns9K8xeBd94nMnn81Qs2J7jfqiwzfMdkZF89wlK+9HqCPJpF6wK2TJX7ewtn 5VkJYvHBJam3rGghDoSU9KD49yRdlBNCpMKeWSaRhMzTzGgNcLmOuffgrcdiyyMAwaM9A3 JANrM6icgaVHV0yDoDwUejCdvqpeVwuxjLZcH+X98ZkdawpqBMHHlBW9cKGbf9U2mKa1Ue lP0btmBMzy2m2FLeqtJpAZgSdmg4BaeGQ9dB5V4Lfx7l74drgygB3Y/oVxTuguPALE8lms LHdeZ7uy4wmxxR992yOfsC5aOHLU4/fAIKU0nxdcdMQbPP7FUVro/2xr0N7pbA== 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 4X37sR0m2hztWx; Tue, 10 Sep 2024 16:08:11 +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 48AG8BwM000724; Tue, 10 Sep 2024 16:08:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48AG8AEp000721; Tue, 10 Sep 2024 16:08:10 GMT (envelope-from git) Date: Tue, 10 Sep 2024 16:08:10 GMT Message-Id: <202409101608.48AG8AEp000721@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: 2b9c818d8db3 - main - pkgbase: fix decision logic to keep the old packages 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: 2b9c818d8db30389c366746e60efa665c0d591cc Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2b9c818d8db30389c366746e60efa665c0d591cc commit 2b9c818d8db30389c366746e60efa665c0d591cc Author: Baptiste Daroussin AuthorDate: 2024-09-10 15:56:44 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-10 16:05:29 +0000 pkgbase: fix decision logic to keep the old packages when running update-package, we try to keep as much as possible the old packages to avoid wasting users bandwidth. the previous code was failing at catching properly the "snap" extension and we lost incremental build. With this new code we only stop checking we we have an old package with the same checksum if we transition from: - alpha to beta - beta to rc - rc to release but we keep old packages when we transition from release to p1 or when we stay on a given snapshot PR: 281393 Reported by: Evgenii Khramtsov --- Makefile.inc1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index ec1db75234b2..57141a482433 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2038,7 +2038,7 @@ PKG_EXT= pkg .if exists(${PKG_ABI_FILE}) && 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/} +BRANCH_EXT_FROM= ${PKG_VERSION_FROM:C/^[^[:alpha:]]+p?([[:alpha:]]*)[0-9]+$/\1/} .else PKG_VERSION_FROM= PKG_VERSION_FROM_DIR= @@ -2079,7 +2079,7 @@ real-update-packages: stage-packages .PHONY continue; \ fi ; \ newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \ - if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT}" -a "$${oldsum}" == "$${newsum}" ]; then \ + if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT:C/[0-9]+$//}" -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} ; \