summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-02-28 11:21:13 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-02-28 11:21:13 +0000
commit6624345b50fbf744e9819e9f3c86665279f7714e (patch)
tree63bdadd3eb37a71128ed7502b62ae72ad382ff3b
parentc13d497e04ef3f57f1b619b1dcf927128d5b2422 (diff)
downloadmorph-6624345b50fbf744e9819e9f3c86665279f7714e.tar.gz
Revert "blix the cat"
This reverts commit c13d497e04ef3f57f1b619b1dcf927128d5b2422.
-rw-r--r--distbuild/serialise.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/distbuild/serialise.py b/distbuild/serialise.py
index a4d1cd99..caf8398b 100644
--- a/distbuild/serialise.py
+++ b/distbuild/serialise.py
@@ -40,16 +40,15 @@ def serialise_artifact(artifact):
def encode_artifact(artifact):
artifact_dic = {
+ # source? - that will be constructed during deserialisation
'name': artifact.name,
'cache_id': artifact.cache_id,
'cache_key': artifact.cache_key,
'dependencies': artifact.dependencies,
- 'dependents': artifact.dependents,
+ 'dependants': artifact.dependants,
'metadata_version': artifact.metadata_version,
}
- return artifact_dic
-
def encode_artifacts(artifacts):
return {name: encode_artifact(artifact)
for (name, artifact) in artifacts.iteritems()}
@@ -63,12 +62,8 @@ def serialise_artifact(artifact):
'tree': source.tree,
'morphology': encode_morphology(source.morphology),
'filename': source.filename,
- 'artifacts': 'Blix the cat'
- #'artifacts': encode_artifacts(source.artifacts),
+ 'artifacts': encode_artifacts(source.artifacts),
}
-
- logging.debug('source_dic: %s' % source_dic)
-
if source.morphology['kind'] == 'chunk':
source_dic['build_mode'] = source.build_mode
source_dic['prefix'] = source.prefix
@@ -105,9 +100,6 @@ def serialise_artifact(artifact):
encoded[a.cache_key] = encode_single_artifact(a, encoded)
encoded['_root'] = artifact.cache_key
-
- logging.debug('encoded: %s' % encoded)
-
return json.dumps(encoded)
@@ -160,8 +152,6 @@ def deserialise_artifact(encoded):
def unserialise_source(le_dict):
'''Convert a dict into a Source object.'''
- logging.debug('unserialise_source: le_dict: %s' % le_dict)
-
morphology = unserialise_morphology(le_dict['morphology'])
source = morphlib.source.Source(le_dict['repo_name'],
le_dict['original_ref'],
@@ -195,8 +185,6 @@ def deserialise_artifact(encoded):
with open('/tmp/%s', 'w') as f:
f.write(encoded)
- logging.debug('encoded: %s' % encoded)
-
le_dicts = json.loads(encoded)
cache_keys = [k for k in le_dicts.keys() if k != '_root']
artifacts = {}