summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuchesar V. ILIEV2018-06-02 23:58:16 +0300
committerLuchesar V. ILIEV2018-06-03 00:20:59 +0300
commite2cd1bb94c98d0fcbd70afd53056a4df2e568e45 (patch)
tree389a40e5891cfc710e0fd6a71534a9a448067ca9
parent65206a5a16bbdb8d5db49295e4b85dfb1b1d1529 (diff)
downloadaur-e2cd1bb94c98d0fcbd70afd53056a4df2e568e45.tar.gz
Fix _ocamlver() for Pacman 5.1.0
Makepkg apparently now parses the PKGBUILDS in advance and doesn't like seeing empty pkgvers for dependencies. With our split package for the OCaml bindings we declare a dependency on the installed OCaml version, so that upgrades to OCaml wouldn't break the bindings. When llvm-ocaml is built, OCaml is installed and thus _ocamlver() returns a valid version. But now we also need to return a valid version before OCaml is installed. It doesn't need to be meaningful, as it'll get updated again to the real version if package_llvm-ocaml-svn() gets to be run later.
-rw-r--r--PKGBUILD3
1 files changed, 2 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2151cf8f8ff1..44127275a7b3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -77,7 +77,8 @@ _py_sitepkg_dir="/usr/lib/python2.7/site-packages"
# Determine the installed OCaml package version
# Arguments: NONE
_ocamlver() {
- pacman -Q ocaml | awk '{ print $2 }' | cut -d - -f 1 | cut -d . -f 1,2,3
+ { pacman -Q ocaml 2>/dev/null || echo 'ocaml 0.0.0-0' ;} \
+ | awk '{ print $2 }' | cut -d - -f 1 | cut -d . -f 1,2,3
}
# Fix the Python interpreter path in .py files to point to python2