summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Bernede <51493078+adrienbernede@users.noreply.github.com>2024-05-02 09:50:10 +0200
committerGitHub <noreply@github.com>2024-05-02 09:50:10 +0200
commita0aa35667c5c21a6eba9c9f8dd79d19e17b477f5 (patch)
tree20388006cee5b44b346d937f782c6e43625752c4
parentb1d4fd14bc99c8c6d270bdadf897dbaf6ffc6b40 (diff)
downloadspack-a0aa35667c5c21a6eba9c9f8dd79d19e17b477f5.tar.gz
spack-a0aa35667c5c21a6eba9c9f8dd79d19e17b477f5.tar.bz2
spack-a0aa35667c5c21a6eba9c9f8dd79d19e17b477f5.tar.xz
spack-a0aa35667c5c21a6eba9c9f8dd79d19e17b477f5.zip
Ignore external packages when pushing to buildcache automatically (--autopush) (#43930)
-rw-r--r--lib/spack/spack/hooks/autopush.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/hooks/autopush.py b/lib/spack/spack/hooks/autopush.py
index b49f741ad9..1974c8d3ab 100644
--- a/lib/spack/spack/hooks/autopush.py
+++ b/lib/spack/spack/hooks/autopush.py
@@ -12,6 +12,10 @@ import spack.mirror
def post_install(spec, explicit):
# Push package to all buildcaches with autopush==True
+ # Do nothing if spec is an external package
+ if spec.external:
+ return
+
# Do nothing if package was not installed from source
pkg = spec.package
if pkg.installed_from_binary_cache: