Patchwork package_deb.bbclass: fix 'armel' override

login
register
mail settings
Submitter Bogdan Marinescu
Date April 2, 2013, 11:35 a.m.
Message ID <1364902556-351-1-git-send-email-bogdan.a.marinescu@intel.com>
Download mbox | patch
Permalink /patch/47271/
State Accepted
Commit 8866aeefb7e471d71cca0d2329ee48c87700abba
Headers show

Comments

Bogdan Marinescu - April 2, 2013, 11:35 a.m.
The 'armel' override for DKPG_ARCH was causing the meta-toolchain
build to fail. The assignment was moved to an anonymous fragment
of Python code, so it doesn't affect the assignments in
cross-canadian.bbclass anymore, thus fixing the issue.

[YOCTO #4080]

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
---
 meta/classes/package_deb.bbclass |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 4559199..853b5ea 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -7,7 +7,6 @@  inherit package
 IMAGE_PKGTYPE ?= "deb"
 
 DPKG_ARCH ?= "${TARGET_ARCH}" 
-DPKG_ARCH_arm ?= "armel"
 
 PKGWRITEDIRDEB = "${WORKDIR}/deploy-debs"
 
@@ -406,8 +405,11 @@  python () {
         d.setVarFlag('do_package_write_deb_setscene', 'fakeroot', "1")
 
     # Map TARGET_ARCH to Debian's ideas about architectures
-    if d.getVar('DPKG_ARCH', True) in ["x86", "i486", "i586", "i686", "pentium"]:
-        d.setVar('DPKG_ARCH', 'i386')
+    darch = d.getVar('DPKG_ARCH', True)
+    if darch in ["x86", "i486", "i586", "i686", "pentium"]:
+         d.setVar('DPKG_ARCH', 'i386')
+    elif darch == "arm":
+         d.setVar('DPKG_ARCH', 'armel')
 }
 
 python do_package_write_deb () {