Skip to contentSkip to conversation

Various dependency tweaks + nastivesdk fixes

PATCH New Richard Purdie 2 participants 12 messages Jun 13, 2011

lore
Share & tools
lore
#0 lore raw

cover Various dependency tweaks + nastivesdk fixes

This patch series contains various dependency tweaks simplifying the dependencies of some of the configuration file/script packages.

It also fixes some bugs in nativesdk handling which were recently introduced and improves some misleading package names.

The following changes since commit 6a3e57fcd3a172c9b2707510d65741734c98a143:

Revert "gcc: rebase the patch to avoid patch rejection" (2011-06-10 12:56:29 +0100)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rpurdie/for-master
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rpurdie/for-master

Richard Purdie (11):
pointercal: Inhibit toolchain dependencies as its just config files
formfactor: Inhibit toolchain dependencies as its just config files
keymaps: Inhibit toolchain dependencies as its just configuration
files
usbinit: Inherit allarch as its a generic script
base-files: Inherit toolchain dependencies as a compiler isn't used
poky-feed-opkg: Disable default toolchain dependencies as these are
just configuration files
initscripts: makedevs is no longer used anywhere so drop dependency.
Also inhibit compiler/libc dependencies as they're unused
sysvinit-inittab: Inhibit compiler/libc dependencies as this is just
a configuration file
initrdscripts: Inhibit compiler/libc dependencies as this is just a
configuration file
task-sdk-host: Add nativesdk to the task name so its clearer what the
contents of the task represent
nativesdk.bbclass: Correct ordering of manipulations

 meta/classes/nativesdk.bbclass                     |   53 ++++++++++++++------
 meta/classes/populate_sdk.bbclass                  |    2 +-
 meta/recipes-bsp/formfactor/formfactor_0.0.bb      |    1 +
 meta/recipes-bsp/keymaps/keymaps_1.0.bb            |    2 +
 meta/recipes-bsp/pointercal/pointercal_0.0.bb      |    1 +
 meta/recipes-bsp/usbinit/usbinit.bb                |    4 +-
 meta/recipes-core/base-files/base-files_3.0.14.bb  |    2 +
 .../feed-config/poky-feed-config-opkg_1.0.bb       |    1 +
 .../initrdscripts/initramfs-live-install_1.0.bb    |    1 +
 meta/recipes-core/initscripts/initscripts_1.0.bb   |    6 +-
 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |    2 +
 ...task-sdk-host.bb => task-sdk-host-nativesdk.bb} |    0
 meta/recipes-qt/meta/meta-toolchain-qte.bb         |    2 +-
 ...ost.bb => task-qte-toolchain-host-nativesdk.bb} |    2 +-
 14 files changed, 55 insertions(+), 24 deletions(-)
 rename meta/recipes-core/tasks/{task-sdk-host.bb => task-sdk-host-nativesdk.bb} (100%)
 rename meta/recipes-qt/tasks/{task-qte-toolchain-host.bb => task-qte-toolchain-host-nativesdk.bb} (70%)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/11 pointercal: Inhibit toolchain dependencies as its just config files

From: Richard Purdie <[email protected]>

---
 meta/recipes-bsp/pointercal/pointercal_0.0.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-bsp/pointercal/pointercal_0.0.bb +1 -0
index 069d850..c8233ea 100644
@@ -19,3 +19,4 @@ do_install() {
 
 ALLOW_EMPTY_${PN} = "1"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
+INHIBIT_DEFAULT_DEPS = "1"
\ No newline at end of file
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/11 formfactor: Inhibit toolchain dependencies as its just config files

From: Richard Purdie <[email protected]>

---
 meta/recipes-bsp/formfactor/formfactor_0.0.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-bsp/formfactor/formfactor_0.0.bb +1 -0
index 28624a6..abf20e0 100644
@@ -9,6 +9,7 @@ SRC_URI = "file://config file://machconfig"
 S = "${WORKDIR}"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
+INHIBIT_DEFAULT_DEPS = "1"
 
 do_install() {
 	# Only install file if it has a contents
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 3/11 keymaps: Inhibit toolchain dependencies as its just configuration files

In reply to [email protected]

From: Richard Purdie <[email protected]>

---
 meta/recipes-bsp/keymaps/keymaps_1.0.bb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-bsp/keymaps/keymaps_1.0.bb +2 -0
index 4683fa1..23a3051 100644
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 PR = "r19"
 
+INHIBIT_DEFAULT_DEPS = "1"
+
 inherit update-rc.d
 
 SRC_URI = "file://keymap.sh \
Signature · 1 line
1.7.4.1
#4 lore raw

PATCH 4/11 usbinit: Inherit allarch as its a generic script

In reply to [email protected]

From: Richard Purdie <[email protected]>

---
 meta/recipes-bsp/usbinit/usbinit.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-bsp/usbinit/usbinit.bb +2 -2
index 834649b..6170362 100644
@@ -14,9 +14,9 @@ do_install() {
     install -d ${D}/etc
     install -d ${D}/etc/init.d
     install usb-gether ${D}/etc/init.d
-}    
+}
 
-inherit update-rc.d
+inherit update-rc.d allarch
 
 INITSCRIPT_NAME = "usb-gether"
 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
Signature · 1 line
1.7.4.1
#5 lore raw

PATCH 5/11 base-files: Inherit toolchain dependencies as a compiler isn't used

In reply to [email protected]

From: Richard Purdie <[email protected]>

---
 meta/recipes-core/base-files/base-files_3.0.14.bb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +2 -0
index 4445081..e76fdf6 100644
@@ -29,6 +29,8 @@ SRC_URI = "file://rotation \
            file://licenses/Artistic"
 S = "${WORKDIR}"
 
+INHIBIT_DEFAULT_DEPS = "1"
+
 docdir_append = "/${P}"
 dirs1777 = "/tmp ${localstatedir}/volatile/lock ${localstatedir}/volatile/tmp"
 dirs2775 = "/home ${prefix}/src ${localstatedir}/local"
Signature · 1 line
1.7.4.1
#6 lore raw

PATCH 6/11 poky-feed-opkg: Disable default toolchain dependencies as these are just configuration files

In reply to [email protected]

From: Richard Purdie <[email protected]>

---
 .../feed-config/poky-feed-config-opkg_1.0.bb       |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb +1 -0
index 9b005d0..fc223c9 100644
@@ -3,6 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 PR = "r1"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
+INHIBIT_DEFAULT_DEPS = "1"
 
 #FEEDNAMEPREFIX ?= "INVALID"
 #FEEDURIPREFIX ?= "INVALID"
Signature · 1 line
1.7.4.1
#7 lore raw

PATCH 7/11 initscripts: makedevs is no longer used anywhere so drop dependency. Also inhibit compiler/libc dependencies as they're unused

In reply to [email protected]

From: Richard Purdie <[email protected]>

---
 meta/recipes-core/initscripts/initscripts_1.0.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +3 -3
index 720c252..48b65b9 100644
@@ -2,11 +2,11 @@ SUMMARY = "SysV init scripts"
 DESCRIPTION = "Initscripts provide the basic system startup initialization scripts for the system.  These scripts include actions such as filesystem mounting, fsck, RTC manipulation and other actions routinely performed at system startup.  In addition, the scripts are also used during system shutdown to reverse the actions performed at startup."
 SECTION = "base"
 PRIORITY = "required"
-DEPENDS = "makedevs"
-RDEPENDS_${PN} = "makedevs"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r125"
+PR = "r126"
+
+INHIBIT_DEFAULT_DEPS = "1"
 
 SRC_URI = "file://functions \
            file://halt \
Signature · 1 line
1.7.4.1
#8 lore raw

PATCH 8/11 sysvinit-inittab: Inhibit compiler/libc dependencies as this is just a configuration file

In reply to [email protected]

From: Richard Purdie <[email protected]>

---
 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +2 -0
index 9f34b27..ba60c74 100644
@@ -9,6 +9,8 @@ SRC_URI = "file://COPYING \
 
 S = "${WORKDIR}/sysvinit-${PV}"
 
+INHIBIT_DEFAULT_DEPS = "1"
+
 do_configure() {
 	cp ${WORKDIR}/COPYING ${S}/
 }
Signature · 1 line
1.7.4.1
#9 lore raw

PATCH 9/11 initrdscripts: Inhibit compiler/libc dependencies as this is just a configuration file

In reply to [email protected]

From: Richard Purdie <[email protected]>

---
 .../initrdscripts/initramfs-live-install_1.0.bb    |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb +1 -0
index c92ee31..c792fe0 100644
@@ -15,6 +15,7 @@ do_install() {
 # simple script, reality is that it is Host specific based
 # on the COMPATIBLE_HOST below, which needs to take precedence
 #inherit allarch
+INHIBIT_DEFAULT_DEPS = "1"
 
 FILES_${PN} = " /install.sh "
 
Signature · 1 line
1.7.4.1
#10 lore raw

PATCH 10/11 task-sdk-host: Add nativesdk to the task name so its clearer what the contents of the task represent

In reply to [email protected]

From: Richard Purdie <[email protected]>

This is particularly important since the file doens't use BBCLASSEXTEND and PN is therefore misleading

---
 meta/classes/populate_sdk.bbclass                  |    2 +-
 ...task-sdk-host.bb => task-sdk-host-nativesdk.bb} |    0
 meta/recipes-qt/meta/meta-toolchain-qte.bb         |    2 +-
 ...ost.bb => task-qte-toolchain-host-nativesdk.bb} |    2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-core/tasks/{task-sdk-host.bb => task-sdk-host-nativesdk.bb} (100%)
 rename meta/recipes-qt/tasks/{task-qte-toolchain-host.bb => task-qte-toolchain-host-nativesdk.bb} (70%)
meta/classes/populate_sdk.bbclass +1 -1
index 413eb52..089ed9a 100644
@@ -7,7 +7,7 @@ SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
 
 SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
 
-TOOLCHAIN_HOST_TASK ?= "task-sdk-host task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+TOOLCHAIN_HOST_TASK ?= "task-sdk-host-nativesdk task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 TOOLCHAIN_TARGET_TASK ?= "task-core-standalone-sdk-target task-core-standalone-sdk-target-dbg"
 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${DISTRO_VERSION}"
 
meta/recipes-core/tasks/task-sdk-host-nativesdk.bb renamed from meta/recipes-core/tasks/task-sdk-host.bb +0 -0
similarity index 100%
rename from meta/recipes-core/tasks/task-sdk-host.bb
rename to meta/recipes-core/tasks/task-sdk-host-nativesdk.bb
meta/recipes-qt/meta/meta-toolchain-qte.bb +1 -1
index 72fa702..72d58db 100644
@@ -1,6 +1,6 @@
 # Qt Embedded toolchain
 PR = "r5"
-TOOLCHAIN_HOST_TASK = "task-qte-toolchain-host task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+TOOLCHAIN_HOST_TASK = "task-qte-toolchain-host-nativesdk task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 TOOLCHAIN_TARGET_TASK = "task-qte-toolchain-target"
 TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-qte-${DISTRO_VERSION}"
 
meta/recipes-qt/tasks/task-qte-toolchain-host-nativesdk.bb renamed from meta/recipes-qt/tasks/task-qte-toolchain-host.bb +1 -1
similarity index 70%
rename from meta/recipes-qt/tasks/task-qte-toolchain-host.bb
rename to meta/recipes-qt/tasks/task-qte-toolchain-host-nativesdk.bb
index 2ab6ccf..cfa45ef 100644
@@ -1,4 +1,4 @@
-require recipes-core/tasks/task-sdk-host.bb
+require recipes-core/tasks/task-sdk-host-nativesdk.bb
 
 DESCRIPTION = "Host packages for Qt Embedded SDK"
 LICENSE = "MIT"
Signature · 1 line
1.7.4.1
#11 lore raw

PATCH 11/11 nativesdk.bbclass: Correct ordering of manipulations

In reply to [email protected]

From: Richard Purdie <[email protected]>

OVERDIDES is the key variable that needs to be set prior to data finalisation. The other variables should be manipulated after finalisation so any DEPENDS_prepend and _append are accounted for. This patch ensures this is the case.

The PACKAGES maniupulations are not enabled at this time as they don't function 100% correctly yet.

---
 meta/classes/nativesdk.bbclass |   53 ++++++++++++++++++++++++++++------------
 1 files changed, 37 insertions(+), 16 deletions(-)
meta/classes/nativesdk.bbclass +37 -16
index 644e731..3fe4bf9 100644
@@ -62,27 +62,48 @@ python nativesdk_virtclass_handler () {
     if not pn.endswith("-nativesdk"):
         return
 
-    depends = bb.data.getVar("DEPENDS", e.data, True)
-    deps = bb.utils.explode_deps(depends)
-    newdeps = []
-    for dep in deps:
-        if dep.endswith("-native") or dep.endswith("-cross"):
-            newdeps.append(dep)
-        elif dep.endswith("-gcc-intermediate") or dep.endswith("-gcc-initial") or dep.endswith("-gcc") or dep.endswith("-g++"):
-            newdeps.append(dep + "-crosssdk")
-        elif not dep.endswith("-nativesdk"):
-            newdeps.append(dep + "-nativesdk")
-        else:
-            newdeps.append(dep)
-    bb.data.setVar("DEPENDS", " ".join(newdeps), e.data)
-    provides = bb.data.getVar("PROVIDES", e.data, True)
+    bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data)
+}
+
+python () {
+    pn = bb.data.getVar("PN", d, True)
+    if not pn.endswith("-nativesdk"):
+        return
+
+    def map_dependencies(varname, d, suffix = ""):
+        if suffix:
+            varname = varname + "_" + suffix
+        deps = bb.data.getVar(varname, d, True)
+        if not deps:
+            return
+        deps = bb.utils.explode_deps(deps)
+        newdeps = []
+        for dep in deps:
+            if dep.endswith("-native") or dep.endswith("-cross"):
+                newdeps.append(dep)
+            elif dep.endswith("-gcc-intermediate") or dep.endswith("-gcc-initial") or dep.endswith("-gcc") or dep.endswith("-g++"):
+                newdeps.append(dep + "-crosssdk")
+            elif not dep.endswith("-nativesdk"):
+                newdeps.append(dep.replace("-nativesdk", "") + "-nativesdk")
+            else:
+                newdeps.append(dep)
+        bb.data.setVar(varname, " ".join(newdeps), d)
+
+    map_dependencies("DEPENDS", d)
+    #for pkg in (d.getVar("PACKAGES", True).split() + [""]):
+    #    map_dependencies("RDEPENDS", d, pkg)
+    #    map_dependencies("RRECOMMENDS", d, pkg)
+    #    map_dependencies("RSUGGESTS", d, pkg)
+    #    map_dependencies("RPROVIDES", d, pkg)
+    #    map_dependencies("RREPLACES", d, pkg)
+
+    provides = bb.data.getVar("PROVIDES", d, True)
     for prov in provides.split():
         if prov.find(pn) != -1:
             continue
         if not prov.endswith("-nativesdk"):
             provides = provides.replace(prov, prov + "-nativesdk")
-    bb.data.setVar("PROVIDES", provides, e.data)
-    bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data)
+    bb.data.setVar("PROVIDES", provides, d)
 }
 
 addhandler nativesdk_virtclass_handler
Signature · 1 line
1.7.4.1