start trying to deduplicate

This commit is contained in:
Steev Klimaszewski
2022-07-18 14:09:44 -05:00
parent 6e7c36dd9f
commit 4e9179d5c3

View File

@@ -135,7 +135,10 @@ def hash_file(filename):
h.update(chunk)
return h.hexdigest()
# We don't want to dedupe everything, we want it to only do so based on the "name"
# and we want to remove the stanza, rather than just that line.
# Ideally, we look at vendor, then check if the "name" already exists
# if so, leave off that stanza.
def deduplicate(data):
# Remove duplicate lines
clean_data = ""
@@ -187,7 +190,7 @@ def main(argv):
# Get data
res = yaml_parse(data)
manifest_list = generate_manifest(res)
manifest_list = deduplicate(generate_manifest(res))
# Create output directory if required
createdir(outputdir)