From 2e8d0028763fdbeb434e5d0987c4605159c1d978 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 3 Aug 2020 14:21:30 -0400 Subject: [PATCH] Preserve distribution fingerprint Useful for breaking out the profile copy over stage. --- confluent_server/confluent/osimage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index e96f9863..4c506ac1 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -418,6 +418,8 @@ def import_image(filename, callback, backend=False): basename = identity.get('copyto', os.path.basename(filename)) targpath = os.path.join(targpath, basename) shutil.copyfile(filename, targpath) + with open(targpath + '/distinfo.yaml', 'w') as distinfo: + distinfo.write(yaml.dump(identity, default_flow_style=False)) printit({'progress': 1.0}) sys.stdout.write('\n')