From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4F7BB158086 for ; Fri, 3 Dec 2021 00:12:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9FA942BC035; Fri, 3 Dec 2021 00:12:38 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 73F132BC035 for ; Fri, 3 Dec 2021 00:12:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C328134320B for ; Fri, 3 Dec 2021 00:12:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 78CA2218 for ; Fri, 3 Dec 2021 00:12:29 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1638489817.b0023c0225317857adaaa1a79b05408ed8248c29.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-scheme/racket/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-scheme/racket/racket-8.2-r1.ebuild X-VCS-Directories: dev-scheme/racket/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b0023c0225317857adaaa1a79b05408ed8248c29 X-VCS-Branch: master Date: Fri, 3 Dec 2021 00:12:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5175f141-9409-4a9b-af5b-26a961237a33 X-Archives-Hash: 4607f090ccd289b36efbe1833d692e51 commit: b0023c0225317857adaaa1a79b05408ed8248c29 Author: Maciej Barć riseup net> AuthorDate: Mon Nov 22 15:22:06 2021 +0000 Commit: Sam James gentoo org> CommitDate: Fri Dec 3 00:03:37 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0023c02 dev-scheme/racket: use has_version instead of REPLACING_VERSIONS Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Maciej Barć riseup.net> Closes: https://github.com/gentoo/gentoo/pull/23041 Signed-off-by: Sam James gentoo.org> dev-scheme/racket/racket-8.2-r1.ebuild | 39 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/dev-scheme/racket/racket-8.2-r1.ebuild b/dev-scheme/racket/racket-8.2-r1.ebuild index e4cd39eca5fd..ebb87fe339c6 100644 --- a/dev-scheme/racket/racket-8.2-r1.ebuild +++ b/dev-scheme/racket/racket-8.2-r1.ebuild @@ -19,7 +19,10 @@ LICENSE=" chez? ( Apache-2.0 ) !chez? ( LGPL-3 ) " -# Bytecode generated by Racket is not compatible between versions +# Bytecode generated by Racket is not compatible between versions. +# The bytecode version should be denoted by SLOT, in most cases +# PV == SLOT but this has to be checked carefully and in cases +# where we use _p, _pre, etc it will have to be set manually. SLOT="0/${PV}" KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86" IUSE="X +chez +doc +futures +jit minimal +places +threads" @@ -134,25 +137,21 @@ src_install() { } pkg_preinst() { - # If we are merging the same version (NOT revision!) - # check if pkg database files exist and do not overwrite them - local pvr rel - for pvr in ${REPLACING_VERSIONS}; do - rel="${pvr%-r*}" - if [[ "${rel}" == "${PV}" ]]; then - echo "We are installing the same version: ${rel}" - local rktd - for rktd in "${PKGDB[@]}"; do - if [[ -f "${EROOT}/${rktd}" ]]; then - einfo "Keeping old file: ${rktd}" - mv "${ED}"/${rktd} "${ED}"/${rktd}.bak || - die "failed to create a backup of ${rktd}" - cp "${EROOT}"/${rktd} "${ED}"/${rktd} || - die "failed to create a copy of ${rktd}" - fi - done - fi - done + # If we are merging the same SLOT check if package + # database files exist and do not overwrite them + if has_version "${CATEGORY}/${PN}:${SLOT}"; then + echo "We are installing the same SLOT: ${SLOT}" + local rktd + for rktd in "${PKGDB[@]}"; do + if [[ -f "${EROOT}/${rktd}" ]]; then + einfo "Keeping old file: ${rktd}" + mv "${ED}"/${rktd} "${ED}"/${rktd}.bak || + die "failed to create a backup of ${rktd}" + cp "${EROOT}"/${rktd} "${ED}"/${rktd} || + die "failed to create a copy of ${rktd}" + fi + done + fi } pkg_postinst() {