diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-02-25 10:13:34 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-03-13 15:20:02 +0000 |
commit | 0cc3de60d6282d22108ea59f169a0749be5e59ea (patch) | |
tree | 2bef9ed79c0b4d9e128b3095e72ccce4a525a532 /morphlib/artifact.py | |
parent | 84807d4d7c23f45d4f0a0f87e6c7ba7ba7470936 (diff) | |
download | morph-0cc3de60d6282d22108ea59f169a0749be5e59ea.tar.gz |
Add 'prefix' property for chunks within strata
Morph no longer supports setting the prefix using the --prefix
argument / setting. This was only used in tests and during bootstrap.
If a chunk build-depends on a chunk within a stratum which has
a custom prefix, that prefix is appended to the PATH in the build
environment.
Diffstat (limited to 'morphlib/artifact.py')
-rw-r--r-- | morphlib/artifact.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/morphlib/artifact.py b/morphlib/artifact.py index 5f084384..82680709 100644 --- a/morphlib/artifact.py +++ b/morphlib/artifact.py @@ -61,6 +61,20 @@ class Artifact(object): self.name, metadata_name) + def get_dependency_prefix_set(self): + '''Collects all install prefixes of this artifact's build dependencies + + If any of the build dependencies of a chunk artifact are installed + to non-standard prefixes, we need to add those prefixes to the + PATH of the current artifact. + + ''' + result = set() + for d in self.dependencies: + if d.source.morphology['kind'] == 'chunk': + result.add(d.source.prefix) + return result + def __str__(self): # pragma: no cover return '%s|%s' % (self.source, self.name) |