summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-06-28 11:26:56 +0200
committerGitHub <noreply@github.com>2024-06-28 11:26:56 +0200
commit0b3b49b4e0f19181e7e4a89a2fe9f954175dc5a7 (patch)
treeab9b790ecf402605145eece194276f1916469a3b
parentfa9642270210c08c92b4c208ec3401494b5f1eeb (diff)
downloadspack-0b3b49b4e0f19181e7e4a89a2fe9f954175dc5a7.tar.gz
spack-0b3b49b4e0f19181e7e4a89a2fe9f954175dc5a7.tar.bz2
spack-0b3b49b4e0f19181e7e4a89a2fe9f954175dc5a7.tar.xz
spack-0b3b49b4e0f19181e7e4a89a2fe9f954175dc5a7.zip
installer.py: handle external roots the same (#44917)
There was logic not to enqueue build requests for externals if they occur as roots. That's unnecessary.
-rw-r--r--lib/spack/spack/installer.py20
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py
index c37fac186e..65c3e78553 100644
--- a/lib/spack/spack/installer.py
+++ b/lib/spack/spack/installer.py
@@ -1542,17 +1542,6 @@ class PackageInstaller:
tty.warn(f"Installation request refused: {str(err)}")
return
- # Skip out early if the spec is not being installed locally (i.e., if
- # external or upstream).
- #
- # External and upstream packages need to get flagged as installed to
- # ensure proper status tracking for environment build.
- explicit = request.pkg.spec.dag_hash() in request.install_args.get("explicit", [])
- not_local = _handle_external_and_upstream(request.pkg, explicit)
- if not_local:
- self._flag_installed(request.pkg)
- return
-
install_compilers = spack.config.get("config:install_missing_compilers", False)
install_deps = request.install_args.get("install_deps")
@@ -2029,11 +2018,10 @@ class PackageInstaller:
# Skip the installation if the spec is not being installed locally
# (i.e., if external or upstream) BUT flag it as installed since
# some package likely depends on it.
- if not task.explicit:
- if _handle_external_and_upstream(pkg, False):
- term_status.clear()
- self._flag_installed(pkg, task.dependents)
- continue
+ if _handle_external_and_upstream(pkg, task.explicit):
+ term_status.clear()
+ self._flag_installed(pkg, task.dependents)
+ continue
# Flag a failed spec. Do not need an (install) prefix lock since
# assume using a separate (failed) prefix lock file.