]> code.ossystems Code Review - openembedded-core.git/commitdiff
Improve handling of 'all' architecture recipes and their interaction with sstate
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 May 2011 23:03:02 +0000 (00:03 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 May 2011 11:56:38 +0000 (12:56 +0100)
The existing PACKAGE_ARCH = "all" mechanism of sharing packages is problematic
with sstate since there are a variety of variables which have target specific
values and the sstate package therefore correctly changes signature depending
on the MACHINE setting.

This patch creates a new "allarch" class which sets:

PACKAGE_ARCH = "all"

(as per the existing convention)

INHIBIT_DEFAULT_DEPS = "1"

(since its not target specific and therefore can't depend on the cross
compiler or target libc)

TARGET_ARCH = "all"
TARGET_OS = "linux"
TARGET_CC_ARCH = "none"

(since these variables shouldn't change between the different packages and
target compiler flags shouldn't be getting used)

PACKAGE_EXTRA_ARCHS = ""

(since we shouldn't be depending on any architecture specific package architectures)

Not all PACKAGE_ARCH = "all" recipes can use this class since some run configure
checks on the compiler. This means they have target specific components and therefore
the "all" classification is incorrect.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
13 files changed:
meta/classes/allarch.bbclass [new file with mode: 0644]
meta/classes/siteinfo.bbclass
meta/recipes-bsp/hostap/hostap-conf_1.0.bb
meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
meta/recipes-bsp/qemu-config/qemu-config.bb
meta/recipes-connectivity/bluez/bluez-dtl1-workaround_1.0.bb
meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
meta/recipes-graphics/x11-common/x11-common_0.1.bb
meta/recipes-kernel/update-modules/update-modules_1.0.bb

diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
new file mode 100644 (file)
index 0000000..b7c37c3
--- /dev/null
@@ -0,0 +1,15 @@
+#
+# This class is used for architecture independent recipes/data files (usally scripts)
+#
+
+PACKAGE_ARCH = "all"
+
+# No need for virtual/libc or a cross compiler
+INHIBIT_DEFAULT_DEPS = "1"
+
+# Set these to a common set of values, we shouldn't be using them other that for WORKDIR directory
+# naming anyway
+TARGET_ARCH = "all"
+TARGET_OS = "linux"
+TARGET_CC_ARCH = "none"
+PACKAGE_EXTRA_ARCHS = ""
index 0b59e578fc686120cf7834c09a009c4d60c87cdc..6c272a75bcd5ad2f66e26704d1674619a7fdf846 100644 (file)
@@ -19,6 +19,7 @@ def get_siteinfo_list(d):
        target = bb.data.getVar('HOST_ARCH', d, 1) + "-" + bb.data.getVar('HOST_OS', d, 1)
 
        targetinfo = {\
+               "all-linux":               "",\
                "armeb-linux":             "endian-big bit-32 common-glibc arm-common",\
                "armeb-linux-gnueabi":     "endian-big bit-32 common-glibc arm-common armeb-linux",\
                "armeb-linux-uclibc":      "endian-big bit-32 common-uclibc arm-common",\
index de72b769a952b3d2231b06b2934ec2f0ab4e4236..c602e8c6406860dda81ba4f543a3dfdf402d6531 100644 (file)
@@ -4,12 +4,13 @@ PRIORITY = "optional"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
 RDEPENDS_${PN} = "update-modules"
-PACKAGE_ARCH = "all"
-PR = "r12"
+PR = "r14"
 
 SRC_URI = "file://hostap_cs.modalias \
            file://COPYING.patch"
 
+inherit allarch
+
 do_compile() {
 }
 
index 1c25e02dccf55b271c68708619f5463b0030b2c8..98d3aed2ca7f7eb8ccca7705edeefedbb5307e83 100644 (file)
@@ -4,12 +4,13 @@ PRIORITY = "optional"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
 RDEPENDS_${PN} = "update-modules"
-PACKAGE_ARCH = "all"
-PR = "r6"
+PR = "r7"
 
 SRC_URI = "file://orinoco_cs.conf \
            file://COPYING.patch"
 
+inherit allarch
+
 do_install() {
         install -d ${D}${sysconfdir}/modutils
         install -m 0644 ${WORKDIR}/orinoco_cs.conf ${D}${sysconfdir}/modutils/
index f91875e74e38107cc0b59fdd1b747bd18e4803f1..70a113e8dc05dfd2d421b6829ebd44ff7bf9d36e 100644 (file)
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa
 
 COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemumips|qemuppc)"
 
-PR = "r20"
+PR = "r21"
 
 SRC_URI = "file://distcc.sh \
            file://anjuta-remote-run \
@@ -33,9 +33,8 @@ do_install() {
 }
 
 RDEPENDS_${PN} = "distcc dbus-x11 task-core-nfs-server oprofileui-server rsync bash"
-PACKAGE_ARCH = "all"
 
-inherit update-rc.d
+inherit update-rc.d allarch
 
 INITSCRIPT_NAME = "qemu-autostart"
 INITSCRIPT_PARAMS = "start 999 5 2 . stop 20 0 1 6 ."
index 4dfdcb247ac031c14a3c20a68b220b791e667119..b6b3d7dcfda527bb5af19d80e75c9f0143476e16 100644 (file)
@@ -3,11 +3,13 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
 SECTION = "console" 
 PRIORITY = "optional" 
-PR = "r2"
+PR = "r3"
  
 SRC_URI = "file://02dtl1_cs.sh \
            file://COPYING.patch"
 
+inherit allarch
+
 do_install() { 
         install -d ${D}${sysconfdir}/apm/event.d/ 
         install -m 0755 ${WORKDIR}/02dtl1_cs.sh ${D}${sysconfdir}/apm/event.d/ 
@@ -15,5 +17,3 @@ do_install() {
 
 #Package 02dtl1_cs.sh, which is a nasty hack to get dtl1c_cs cards working with suspend/resume
 FILES_${PN} += "${sysconfdir}/apm/"
-
-PACKAGE_ARCH = "all"
index 5cdba2ba110d16fb87fee3de7b6f32ffc37f9b2b..d4ac77e9210f151df5ca559cfa28009ff5c82ca8 100644 (file)
@@ -2,7 +2,7 @@ SECTION = "console/network"
 DESCRIPTION = "Enables PPP dial-in through a serial connection"
 DEPENDS = "ppp"
 RDEPENDS_${PN} = "ppp"
-PR = "r6"
+PR = "r7"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -10,6 +10,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 SRC_URI = "file://host-peer \
            file://ppp-dialin"
 
+inherit allarch
+
 do_install() {
        install -d ${D}${sysconfdir}/ppp/peers
        install -m 0644 ${WORKDIR}/host-peer ${D}${sysconfdir}/ppp/peers/host
@@ -18,8 +20,6 @@ do_install() {
        install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir}
 }
 
-PACKAGE_ARCH = "all"
-
 pkg_postinst_${PN} () {
 if test "x$D" != "x"; then
        exit 1
index b372fddbbaf6a2f5e822cdb13a552f71cfcaafd4..704c2718a049f2132c875820379d9d85588e9e38 100644 (file)
@@ -3,11 +3,12 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-boot.sh"
 
-PR = "r0"
+PR = "r1"
 
 do_install() {
         install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
 }
 
-PACKAGE_ARCH = "all"
+inherit allarch
+
 FILES_${PN} += " /init "
index f6a6a8a4cbc50852709f21efdca14a6319941b17..7051cbd32afd946bedd1cf3b9584cf189753fbfc 100644 (file)
@@ -3,11 +3,12 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-live.sh"
 
-PR = "r2"
+PR = "r3"
 
 do_install() {
         install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
 }
 
-PACKAGE_ARCH = "all"
+inherit allarch
+
 FILES_${PN} += " /init "
index c599be5c58eab86f3d9f32741a60898d989806eb..fdda71819f7146ebb5208bd55e251e3fc04afa8c 100644 (file)
@@ -3,7 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-install.sh"
 
-PR = "r3"
+PR = "r4"
 
 RDEPENDS="grub parted e2fsprogs-mke2fs"
 
@@ -11,7 +11,8 @@ do_install() {
         install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
 }
 
-PACKAGE_ARCH = "all"
+inherit allarch
+
 FILES_${PN} = " /install.sh "
 
 # Alternatives to grub need adding for other arch support
index 6a43d809ed9fa49a1f22a472f320b75d19abec08..38da4233ea45b8687841412d7178d505986b2740 100644 (file)
@@ -2,18 +2,18 @@ SUMMARY = "manage symlinks in /etc/rcN.d."
 DESCRIPTION = "update-rc.d is a utilities that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure."
 SECTION = "base"
 PRIORITY = "standard"
-PACKAGE_ARCH = "all"
 
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=148a48321b10eb37c1fa3ee02b940a75"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "git://github.com/philb/update-rc.d.git;tag=update-rc.d_${PV};protocol=git \
            file://add-verbose.patch;striplevel=1"
 
 S = "${WORKDIR}/git"
 
+inherit allarch
 
 do_compile() {
 }
index 6951cf377174f7db3de38948cf448513b1dba4ea..b6bd61a74ca19efbcb2a322cb97c986dc1621947 100644 (file)
@@ -2,13 +2,15 @@ DESCRIPTION = "Common X11 scripts and configuration files"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 SECTION = "x11"
-PR = "r43"
+PR = "r44"
 
 SRC_URI = "file://etc \
            file://gplv2-license.patch"
 
 S = ${WORKDIR}
 
+inherit allarch
+
 do_install() {
        cp -R ${S}/etc ${D}/etc
        chmod -R 755 ${D}/etc
@@ -17,5 +19,4 @@ do_install() {
 }
 
 RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xtscal xinit formfactor"
-PACKAGE_ARCH = "all"
 
index 336bca2e9b18866d4347af0a916fa0a61e7b7fba..1ea97a85300dc4fc3bcd65d26f1df188f256db55 100644 (file)
@@ -3,13 +3,14 @@ SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
 
-PACKAGE_ARCH = "all"
 RDEPENDS_${PN} = "${@base_contains("MACHINE_FEATURES", "kernel26",  "module-init-tools-depmod","modutils-depmod",d)} "
-PR = "r9"
+PR = "r10"
 
 SRC_URI = "file://update-modules \
            file://COPYING.GPL"
 
+inherit allarch
+
 pkg_postinst_${PN} () {
 if [ "x$D" != "x" ]; then
        exit 1