summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-04-13 13:29:36 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2023-04-13 16:50:02 -0300
commit1221046d7ece2f051420b1dfc1f897e088750626 (patch)
tree4a9421470acf280b24023057e9c4bb78159baa5f /classes
parent19b3aceb1c8fefc437d291ea595b51f473cca689 (diff)
downloadmeta-freescale-1221046d7ece2f051420b1dfc1f897e088750626.tar.gz
classes/image_populate_mfgtool: avoid error copying duplicated files
Eventually, multiple `uuu` script may install same binaries. We need to ensure we install them once, otherwise it'll fail as it might try to override a existing binary. This commit ensure all dependencies and binaries are mentioned once, removing duplication. Fixes: ae7af6f8 ("classes/image_populate_mfgtool: init") Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'classes')
-rw-r--r--classes/image_populate_mfgtool.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/image_populate_mfgtool.bbclass b/classes/image_populate_mfgtool.bbclass
index 90226e35..ab5c78ef 100644
--- a/classes/image_populate_mfgtool.bbclass
+++ b/classes/image_populate_mfgtool.bbclass
@@ -61,7 +61,7 @@ do_populate_mfgtool[depends] += "uuu-bin:do_populate_sysroot"
61 61
62python () { 62python () {
63 depends = [] 63 depends = []
64 deploy_files = [] 64 deploy_files = ""
65 scripts = (d.getVar('MFGTOOLCONFIG') or "").split() 65 scripts = (d.getVar('MFGTOOLCONFIG') or "").split()
66 scripts_and_flags = d.getVarFlags('MFGTOOLCONFIG') or {} 66 scripts_and_flags = d.getVarFlags('MFGTOOLCONFIG') or {}
67 for flag, flagval in sorted(scripts_and_flags.items()): 67 for flag, flagval in sorted(scripts_and_flags.items()):
@@ -72,12 +72,12 @@ python () {
72 72
73 if flag in scripts: 73 if flag in scripts:
74 if num >= 2 and items[1]: 74 if num >= 2 and items[1]:
75 deploy_files.append(items[1]) 75 deploy_files += ' ' + items[1]
76 if num >= 1 and items[0]: 76 if num >= 1 and items[0]:
77 depends.append(items[0]) 77 depends.append(items[0])
78 78
79 d.appendVarFlag('do_populate_mfgtool', 'depends', ' ' + ' '.join(depends)) 79 d.appendVarFlag('do_populate_mfgtool', 'depends', ' ' + ' '.join(depends))
80 d.setVar('_SCRIPT_DEPLOY_FILES', ' '.join(deploy_files)) 80 d.setVar('_SCRIPT_DEPLOY_FILES', ' '.join(list(set(deploy_files.split()))))
81} 81}
82 82
83python do_populate_mfgtool() { 83python do_populate_mfgtool() {