summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2011-09-16 20:41:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-16 18:07:26 +0100
commit99dd3c0b2c0a3b116baa5bbd5e390768d699865b (patch)
tree199b27432082d58cc55c49efeccc91a28105697d /meta/classes/image.bbclass
parentaab71071d73d82ae6301dbd910422a311b5ecf4e (diff)
downloadpoky-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.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: