summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-scheme/racket/racket-8.2-r1.ebuild39
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() {