diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2011-09-16 20:41:36 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-16 18:07:26 +0100 |
commit | 99dd3c0b2c0a3b116baa5bbd5e390768d699865b (patch) | |
tree | 199b27432082d58cc55c49efeccc91a28105697d /meta/classes/image.bbclass | |
parent | aab71071d73d82ae6301dbd910422a311b5ecf4e (diff) | |
download | poky-99dd3c0b2c0a3b116baa5bbd5e390768d699865b.tar.gz |
image/package.bbclass: Revise multilib support for DEBIAN_NAME.
[YOCTO #1486]
1. image.bbclass: In multilib_sanity_check, duplicated files except
those matching to MULTILIBRE_ALLOW_REP are allowed if they're equal.
2. pacakge.bbclass: Allow DEBIAN_NOAUTONAMES variable to be
automatically mapped in multilib case.
(From OE-Core rev: 66f9045e17c39f5c64a0699b72ea460a0701717a)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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: |