diff options
author | Maciej Barć <xgqt@riseup.net> | 2021-11-22 16:22:06 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-12-03 00:03:37 +0000 |
commit | b0023c0225317857adaaa1a79b05408ed8248c29 (patch) | |
tree | 60d95c37c6305a8d0db7b1cb747e1facb371df1d /dev-scheme | |
parent | dev-scheme/racket: libedit is not necessary to build/run (diff) | |
download | gentoo-b0023c0225317857adaaa1a79b05408ed8248c29.tar.gz gentoo-b0023c0225317857adaaa1a79b05408ed8248c29.tar.bz2 gentoo-b0023c0225317857adaaa1a79b05408ed8248c29.zip |
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ć <xgqt@riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/23041
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-scheme')
-rw-r--r-- | dev-scheme/racket/racket-8.2-r1.ebuild | 39 |
1 files 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() { |