From fbc2b847e9c25b435252ce4fdbf23912a86e8675 Mon Sep 17 00:00:00 2001 From: Guillaume Raffin Date: Fri, 4 Oct 2019 12:37:04 +0200 Subject: [PATCH] Fix ArchLinux package cache issues by giving a unique name to install.py --- project/ReleaseUtils.scala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/project/ReleaseUtils.scala b/project/ReleaseUtils.scala index 720eaeae71..a1755408be 100644 --- a/project/ReleaseUtils.scala +++ b/project/ReleaseUtils.scala @@ -243,12 +243,18 @@ object ReleaseUtils { origin: FormulaOrigin, installSha: String ): String = { - val source = archPackageSource(origin) // Note: pkgver must only contain letters, numbers and periods to be valid + val safeVersion = version.replace('-', '.').replace('+', '.').replace(' ', '.') + + // Replace "install.py" by a unique name to avoid conflicts with the other packages + // and caching problems with older versions of the bloop package. + val script = s"install-bloop-$safeVersion.py" + val source = script + "::" + archPackageSource(origin) + s"""# Maintainer: Guillaume Raffin |# Generator: Bloop release utilities |pkgname=bloop - |pkgver=${version.replace('-', '.').replace('+', '.')} + |pkgver=$safeVersion |pkgrel=1 |pkgdesc="Bloop gives you fast edit/compile/test workflows for Scala." |arch=(any) @@ -259,7 +265,7 @@ object ReleaseUtils { |sha256sums=('$installSha') | |build() { - | python ./install.py --dest "$$srcdir/bloop" + | python ./$script --dest "$$srcdir/bloop" | # fix paths | sed -i "s|$$srcdir/bloop|/usr/bin|g" bloop/systemd/bloop.service | sed -i "s|$$srcdir/bloop/xdg|/usr/share/pixmaps|g" bloop/xdg/bloop.desktop