From 99f35c333814f9c7fa320a928a98bbbacdd66e92 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 27 Mar 2019 13:06:46 -0700 Subject: spack chain (#8772) * initial work to make use of an 'upstream' spack installation: this uses the DB of the upstream installation to check if a package is installed * need to query upstream dbs when adding new record to local db * prevent reindexing upstream DBs * set prefix on specs read from DB based on path stored in install record * check that Spack does not install packages that are recorded as installed in an upstream db * externals do not add their path to install records - need to use 'external_path' to get path of upstream externals * views need to check for upstream installations when linking metadata * package and spec now calculate upstream installation properties on-demand themselves rather than depending on concretization to set these properties up-front. The added tests for upstream installations don't work with this new strategy so they need to be updated * only refresh modules for local specs (not those in upstream packages); optionally generate local module files for packages installed upstream * when a user tries to locate a module file for a package installed upstream, tell them to use the upstream spack instance to locate it * support recursive upstream databases (allow upstream databases to use their own upstream databases) * separate upstream config into separate file with its own schema; each entry now also includes a name * metadata_dir is no longer customizable on a per-instance basis for YamlDirectoryLayout * treat metadata_dir as an instance variable but dont set it from kwargs; this follows several other hardcoded variables which must be consistent between upstream and downstream DBs. Also update DirectoryLayout.metadata_path to work entirely with Spec.prefix, since Spec.prefix is set from the DB when available (so metadata_path was duplicating that logic) --- var/spack/repos/builtin.mock/packages/externaltest/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin.mock/packages/externaltest/package.py b/var/spack/repos/builtin.mock/packages/externaltest/package.py index d3e663508d..80593200f2 100644 --- a/var/spack/repos/builtin.mock/packages/externaltest/package.py +++ b/var/spack/repos/builtin.mock/packages/externaltest/package.py @@ -16,4 +16,4 @@ class Externaltest(Package): depends_on('externaltool') def install(self, spec, prefix): - pass + touch(join_path(prefix, 'an_installation_file')) -- cgit v1.2.3-70-g09d2