Skip to content

Commit

Permalink
Fix ArchLinux package cache issues (#1050)
Browse files Browse the repository at this point in the history
Fix ArchLinux package cache issues
  • Loading branch information
jvican authored Oct 6, 2019
2 parents 634874d + fbc2b84 commit 23d8d02
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions project/ReleaseUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 <theelectronwill@gmail.com>
|# Generator: Bloop release utilities <https://github.com/scalacenter/bloop>
|pkgname=bloop
|pkgver=${version.replace('-', '.').replace('+', '.')}
|pkgver=$safeVersion
|pkgrel=1
|pkgdesc="Bloop gives you fast edit/compile/test workflows for Scala."
|arch=(any)
Expand All @@ -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
Expand Down

0 comments on commit 23d8d02

Please sign in to comment.