summaryrefslogtreecommitdiff
path: root/morphlib/artifactresolver.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-09-10 13:17:54 +0000
committerRichard Maw <richard.maw@gmail.com>2014-09-17 15:51:10 +0000
commitb3dcb7963988e204d8d8651f006a6791b04b3cb6 (patch)
tree7f875b5d2ddcdcd86b9ad2fae3762bcaf8a3bf78 /morphlib/artifactresolver.py
parent776961cdf1890aaed5a64cf5afb067ee86e88a80 (diff)
downloadmorph-b3dcb7963988e204d8d8651f006a6791b04b3cb6.tar.gz
Don't validate morphologies during ArtifactResolver
Diffstat (limited to 'morphlib/artifactresolver.py')
-rw-r--r--morphlib/artifactresolver.py30
1 files changed, 9 insertions, 21 deletions
diff --git a/morphlib/artifactresolver.py b/morphlib/artifactresolver.py
index 9e3cea48..49e03664 100644
--- a/morphlib/artifactresolver.py
+++ b/morphlib/artifactresolver.py
@@ -37,15 +37,6 @@ class DependencyOrderError(cliapp.AppException):
(stratum_source, chunk, dependency_name))
-class DependencyFormatError(cliapp.AppException):
-
- def __init__(self, stratum_source, chunk):
- cliapp.AppException.__init__(
- self, 'In stratum %s, chunk %s uses an invalid '
- 'build-depends format' % (stratum_source, chunk))
-
-
-
class ArtifactResolver(object):
'''Resolves sources into artifacts that would be build from the sources.
@@ -214,18 +205,15 @@ class ArtifactResolver(object):
chunk_artifact.add_dependency(other_stratum)
# Add dependencies between chunks mentioned in this stratum
- if isinstance(build_depends, list):
- for name in build_depends:
- if name not in name_to_processed_artifacts:
- raise DependencyOrderError(
- source, info['name'], name)
- other_artifacts = name_to_processed_artifacts[name]
- for other_artifact in other_artifacts:
- for ca_name in chunk_source.split_rules.artifacts:
- chunk_artifact = chunk_source.artifacts[ca_name]
- chunk_artifact.add_dependency(other_artifact)
- else:
- raise DependencyFormatError(source, info['name'])
+ for name in build_depends:
+ if name not in name_to_processed_artifacts:
+ raise DependencyOrderError(
+ source, info['name'], name)
+ other_artifacts = name_to_processed_artifacts[name]
+ for other_artifact in other_artifacts:
+ for ca_name in chunk_source.split_rules.artifacts:
+ chunk_artifact = chunk_source.artifacts[ca_name]
+ chunk_artifact.add_dependency(other_artifact)
# Add build dependencies between our stratum's artifacts
# and the chunk artifacts produced by this stratum.