diff options
Diffstat (limited to 'meta/classes/image.bbclass')
| -rw-r--r-- | meta/classes/image.bbclass | 17 |
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 | ||
| 215 | MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|" | 215 | MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|" |
| 216 | MULTILIBRE_FORCE_SAME =. "${sysconfdir}|${datadir}|" | ||
| 217 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" | 216 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" |
| 218 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" | 217 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" |
| 219 | 218 | ||
| @@ -223,7 +222,6 @@ import sys, os, os.path | |||
| 223 | import re,filecmp | 222 | import re,filecmp |
| 224 | 223 | ||
| 225 | allow_rep=re.compile(re.sub("\|$","","${MULTILIBRE_ALLOW_REP}")) | 224 | allow_rep=re.compile(re.sub("\|$","","${MULTILIBRE_ALLOW_REP}")) |
| 226 | force_same=re.compile(re.sub("\|$","","${MULTILIBRE_FORCE_SAME}")) | ||
| 227 | error_promt="Multilib check error:" | 225 | error_promt="Multilib check error:" |
| 228 | 226 | ||
| 229 | files={} | 227 | files={} |
| @@ -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: |
