Commit 0e4488e9 authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Ayush Tiwari

bt5_package: Update createInstallationData function to remove data from conflicted_data list

parent 39883f2b
......@@ -452,7 +452,7 @@ def createInstallationData(package_list):
for package in package_list:
path_list.extend(package.getTemplatePathList())
path_list = list(set(path_list))
import copy
for package in package_list:
obj_dict = package._path_item._objects
hash_dict = package._path_item._hash
......@@ -474,11 +474,14 @@ def createInstallationData(package_list):
# compare hash of the objects
else:
# Leave the metadata in final_data in case the hash matches,
# else add it to conflicted_data
# else add it to conflicted_data and remove the older
if final_data[path]['sha'] == object_metadata['sha']:
continue
else:
conflicted_data[path] = [object_metadata]
conflict_object_metadata = copy.copy(final_data[path])
conflicted_data[path].append(conflict_object_metadata)
del final_data[path]
return final_data, conflicted_data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment