Deduplicate before picking merge strategy

I missed this when I refactored the code to fallback
to templating. We need to deduplicate before picking
the strategy for the fallback to work for symlinked files.

Change-Id: Iddd6c90a6daa41e1d1cdaa6b598491792c13394d
Closes-Bug: #2042689
This commit is contained in:
Will Szumski 2023-11-17 18:56:23 +00:00
parent 351e6b3173
commit 786a78d074
1 changed files with 3 additions and 3 deletions

View File

@ -128,14 +128,14 @@ class ConfigCollector(object):
if not os.path.exists(dirname):
missing_directories.add(dirname)
sources = map(os.path.realpath, sources)
sources = _dedup(sources)
rule = self._find_matching_rule(relative_path, sources)
if not rule:
continue
sources = map(os.path.realpath, sources)
sources = _dedup(sources)
if rule["strategy"] == 'copy':
copy = {
"src": sources[-1],