summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessasaurus <814322+vsoch@users.noreply.github.com>2022-08-06 13:05:29 -0600
committerGitHub <noreply@github.com>2022-08-06 12:05:29 -0700
commit86be4666fcd5c036e90a335be68b0641a4b5cf3a (patch)
tree56900d0fdb676cdfd4dd5597f29618c3d7cd8e13
parent75d1cb469f4a5853ef4554efec8170ec7caf3770 (diff)
downloadspack-86be4666fcd5c036e90a335be68b0641a4b5cf3a.tar.gz
spack-86be4666fcd5c036e90a335be68b0641a4b5cf3a.tar.bz2
spack-86be4666fcd5c036e90a335be68b0641a4b5cf3a.tar.xz
spack-86be4666fcd5c036e90a335be68b0641a4b5cf3a.zip
flux packages used in a spack view will already be unshallow (#31955)
* flux packages used in a spack view will already be unshallow and this particular command will error and break the entire build. Instead we want to catch the ProcessError and allow for a regular fetch. * final tweaks to add missing sqlite and fallback to fetch Signed-off-by: vsoch <vsoch@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/flux-core/package.py12
-rw-r--r--var/spack/repos/builtin/packages/flux-sched/package.py11
2 files changed, 17 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py
index 6f8266770f..19551e99a2 100644
--- a/var/spack/repos/builtin/packages/flux-core/package.py
+++ b/var/spack/repos/builtin/packages/flux-core/package.py
@@ -5,6 +5,7 @@
import os
+import spack.util.executable
from spack.package import *
@@ -130,6 +131,7 @@ class FluxCore(AutotoolsPackage):
depends_on("jansson@2.10:", when="@0.21.0:")
depends_on("pkgconfig")
depends_on("lz4")
+ depends_on("sqlite")
depends_on("asciidoc", type="build", when="+docs")
depends_on("py-docutils", type="build", when="@0.32.0:")
@@ -173,9 +175,13 @@ class FluxCore(AutotoolsPackage):
with working_dir(self.stage.source_path):
# Allow git-describe to get last tag so flux-version works:
git = which("git")
- git("fetch", "--unshallow")
- git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*")
- git("fetch", "origin")
+ # When using spack develop, this will already be unshallow
+ try:
+ git("fetch", "--unshallow")
+ git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*")
+ git("fetch", "origin")
+ except spack.util.executable.ProcessError:
+ git("fetch")
def autoreconf(self, spec, prefix):
self.setup()
diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py
index 9d4a4caa19..337abf5faf 100644
--- a/var/spack/repos/builtin/packages/flux-sched/package.py
+++ b/var/spack/repos/builtin/packages/flux-sched/package.py
@@ -5,6 +5,7 @@
import os
+import spack.util.executable
from spack.package import *
@@ -107,9 +108,13 @@ class FluxSched(AutotoolsPackage):
with working_dir(self.stage.source_path):
# Allow git-describe to get last tag so flux-version works:
git = which("git")
- git("fetch", "--unshallow")
- git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*")
- git("fetch", "origin")
+ # When using spack develop, this will already be unshallow
+ try:
+ git("fetch", "--unshallow")
+ git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*")
+ git("fetch", "origin")
+ except spack.util.executable.ProcessError:
+ git("fetch")
def autoreconf(self, spec, prefix):
self.setup()