summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-09-29 10:39:22 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-09-29 10:39:22 +0000
commita76818e2745b8cc4aeb9e26f8257c69ece37baa7 (patch)
treead21ac9d91b7494c4f8ab87fe29a21f1043cf1d4 /classes
parent4db71c3a65096e3186abeb14a8eec3b5d6e1909c (diff)
package_deb.bbclass: Map TARGET_ARCH to DPKG_ARCH to keep dpkg/apt happy with 'valid' archs (from poky)
Diffstat (limited to 'classes')
-rw-r--r--classes/package_deb.bbclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index 2ab537f174..57c79f997e 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -8,6 +8,14 @@ BOOTSTRAP_EXTRA_RDEPENDS += "dpkg"
DISTRO_EXTRA_RDEPENDS += "dpkg"
IMAGE_PKGTYPE ?= "deb"
+# Map TARGET_ARCH to Debian's ideas about architectures
+DPKG_ARCH ?= "${TARGET_ARCH}"
+DPKG_ARCH_x86 ?= "i386"
+DPKG_ARCH_i486 ?= "i386"
+DPKG_ARCH_i586 ?= "i386"
+DPKG_ARCH_i686 ?= "i386"
+DPKG_ARCH_pentium ?= "i386"
+
python package_deb_fn () {
from bb import data
bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d)
@@ -141,6 +149,7 @@ python do_package_deb () {
note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1)))
unlockfile(lf)
continue
+
controldir = os.path.join(root, 'DEBIAN')
bb.mkdirhier(controldir)
os.chmod(controldir, 0755)
@@ -161,7 +170,7 @@ python do_package_deb () {
fields.append(["Section: %s\n", ['SECTION']])
fields.append(["Priority: %s\n", ['PRIORITY']])
fields.append(["Maintainer: %s\n", ['MAINTAINER']])
- fields.append(["Architecture: %s\n", ['TARGET_ARCH']])
+ fields.append(["Architecture: %s\n", ['DPKG_ARCH']])
fields.append(["OE: %s\n", ['PN']])
fields.append(["Homepage: %s\n", ['HOMEPAGE']])
@@ -175,7 +184,7 @@ python do_package_deb () {
data = bb.data.getVar(i, d, 1)
if data is None:
raise KeyError(f)
- if i == 'TARGET_ARCH' and bb.data.getVar('PACKAGE_ARCH', d, 1) == 'all':
+ if i == 'DPKG_ARCH' and bb.data.getVar('PACKAGE_ARCH', d, 1) == 'all':
data = 'all'
l2.append(data)
return l2