summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass17
1 files changed, 5 insertions, 12 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3cd5e7aae0..f17e989289 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -213,7 +213,6 @@ log_check() {
213} 213}
214 214
215MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|" 215MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|"
216MULTILIBRE_FORCE_SAME =. "${sysconfdir}|${datadir}|"
217MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" 216MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py"
218MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" 217MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
219 218
@@ -223,7 +222,6 @@ import sys, os, os.path
223import re,filecmp 222import re,filecmp
224 223
225allow_rep=re.compile(re.sub("\|$","","${MULTILIBRE_ALLOW_REP}")) 224allow_rep=re.compile(re.sub("\|$","","${MULTILIBRE_ALLOW_REP}"))
226force_same=re.compile(re.sub("\|$","","${MULTILIBRE_FORCE_SAME}"))
227error_promt="Multilib check error:" 225error_promt="Multilib check error:"
228 226
229files={} 227files={}
@@ -236,19 +234,14 @@ for dir in dirs.split():
236 234
237 valid=True; 235 valid=True;
238 if files.has_key(key): 236 if files.has_key(key):
239 #check whether files are the same 237 #check whether the file is allow to replace
240 if force_same.match(key): 238 if allow_rep.match(key):
239 valid=True
240 else:
241 if not filecmp.cmp(files[key],item): 241 if not filecmp.cmp(files[key],item):
242 valid=False 242 valid=False
243 print("%s %s is not the same as %s\n" % (error_promt, item, files[key])) 243 print("%s duplicate files %s %s is not the same\n" % (error_promt, item, files[key]))
244 sys.exit(1) 244 sys.exit(1)
245 #check whether the file is allow to replace
246 elif allow_rep.match(key):
247 valid=True
248 else:
249 valid=False
250 print("%s duplicated files %s %s not allowed\n" % (error_promt, item, files[key]))
251 sys.exit(1)
252 245
253 #pass the check, add to list 246 #pass the check, add to list
254 if valid: 247 if valid: