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>
This commit is contained in:
		| @@ -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 @@ def setup(self): | ||||
|         with working_dir(self.stage.source_path): | ||||
|             # Allow git-describe to get last tag so flux-version works: | ||||
|             git = which("git") | ||||
|             # 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() | ||||
|   | ||||
| @@ -5,6 +5,7 @@ | ||||
| 
 | ||||
| import os | ||||
| 
 | ||||
| import spack.util.executable | ||||
| from spack.package import * | ||||
| 
 | ||||
| 
 | ||||
| @@ -107,9 +108,13 @@ def setup(self): | ||||
|         with working_dir(self.stage.source_path): | ||||
|             # Allow git-describe to get last tag so flux-version works: | ||||
|             git = which("git") | ||||
|             # 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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Vanessasaurus
					Vanessasaurus