Patchwork package_deb: Map TARGET_ARCH x86_64 to DPKG_ARCH amd64

login
register
mail settings
Submitter Ricardo Ribalda Delgado
Date March 11, 2014, 10:07 a.m.
Message ID <1394532455-17512-1-git-send-email-ricardo.ribalda@gmail.com>
Download mbox | patch
Permalink /patch/68387/
State Accepted
Commit 3beb4821122edbc9bedb4473d0b361d18e959add
Headers show

Comments

Ricardo Ribalda Delgado - March 11, 2014, 10:07 a.m.
Without this patch packages are generated as x86_64. Which cannot be
installed by default.

root@qt5022:~# dpkg -i alsa-utils_1.0.27.2-r0_x86-64.deb
dpkg: error processing alsa-utils_1.0.27.2-r0_x86-64.deb (--install):
 package architecture (x86-64) does not match system (amd64)
Errors were encountered while processing:
 alsa-utils_1.0.27.2-r0_x86-64.deb

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 meta/classes/package_deb.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 6a8e080..b391e5c 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -430,6 +430,8 @@  python () {
     darch = d.getVar('DPKG_ARCH', True)
     if darch in ["x86", "i486", "i586", "i686", "pentium"]:
          d.setVar('DPKG_ARCH', 'i386')
+    elif darch == "x86_64":
+         d.setVar('DPKG_ARCH', 'amd64')
     elif darch == "arm":
          d.setVar('DPKG_ARCH', 'armel')
 }