Skip to contentSkip to conversation

Add dummy tools to help identify needed dependencies

PATCH Superseded Peter Kjellerstedt 1 participant 6 messages Mar 3, 2017

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add dummy tools to help identify needed dependencies

After the introduction of RSS, I still found it hard to get dependencies on some common tools that are typically installed on the build host correct. Using the wrong version of tools like pkg-config, gdbus-codegen and dbus-binding-tool can cause build failures.

To circumvent this, I created dummy versions of the tools that always fail and placed them in the scripts directory. Thus, if the real tool has not been installed in the RSS, the dummy version is used and the build fails. For good measures I even output a message that says what needs to be corrected in the recipe.

Included is also an update to linux-libc-headers as it apparently needs to inherit pkgconfig, which the introduction of the dummy version of pkg-config showed.

PATCHv2: Also inherit pkgconfig in module.bbclass since pkg-config is needed for the make_scripts task.

//Peter

The following changes since commit 8f1ed1758748e4c00eaa6b4b3528e79f36d62c19:

bitbake: fetch2: add initial Amazon AWS S3 fetcher (2017-03-03 00:19:37 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib pkj/dummy_tools
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/dummy_tools

Peter Kjellerstedt (5):
module.bbclass: Add inherit of pkgconfig
linux-libc-headers: Add inherit of pkgconfig scripts/dbus-binding-tool: Add a dummy version that always fails scripts/gdbus-codegen: Add a dummy version that always fails scripts/pkg-config: Add a dummy version that always fails

 meta/classes/module.bbclass                              |  2 +-
 .../linux-libc-headers/linux-libc-headers.inc            |  2 +-
 scripts/dbus-binding-tool                                | 11 +++++++++++
 scripts/gdbus-codegen                                    | 11 +++++++++++
 scripts/pkg-config                                       | 16 ++++++++++++++++
 5 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100755 scripts/dbus-binding-tool
 create mode 100755 scripts/gdbus-codegen
 create mode 100755 scripts/pkg-config
Signature · 1 line
2.9.0
#1 lore raw

PATCH v2 1/5 module.bbclass: Add inherit of pkgconfig

This is needed for the make_scripts task.

---
 meta/classes/module.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/module.bbclass +1 -1
index a588873..99b7ebc 100644
@@ -1,4 +1,4 @@
-inherit module-base kernel-module-split
+inherit module-base kernel-module-split pkgconfig
 
 addtask make_scripts after do_prepare_recipe_sysroot before do_compile
 do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
Signature · 1 line
2.9.0
#2 lore raw

PATCH v2 2/5 linux-libc-headers: Add inherit of pkgconfig

In reply to Peter Kjellerstedt

pkg-config is used by the kernel build system when creating the configuration tools.

---
 meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +1 -1
index 30d2243..653a470 100644
@@ -42,7 +42,7 @@ python __anonymous () {
         d.setVar("HEADER_FETCH_VER", "2.6")
 }
 
-inherit kernel-arch
+inherit kernel-arch pkgconfig
 
 KORG_ARCHIVE_COMPRESSION ?= "xz"
 
Signature · 1 line
2.9.0
#3 lore raw

PATCH v2 3/5 scripts/dbus-binding-tool: Add a dummy version that always fails

In reply to Peter Kjellerstedt

This is intended to catch missing dependencies on the real version.

---
 scripts/dbus-binding-tool | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 scripts/dbus-binding-tool
scripts/dbus-binding-tool new file +11 -0
new file mode 100755
index 0000000..2e85987
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# This is a dummy version that always fails. It is intended to catch
+# missing dependencies on the real version.
+
+myname=${0##*/}
+
+echo "The correct version of $myname is not being used!" >&2
+echo "Make sure the recipe DEPENDS on 'dbus-glib-native'." >&2
+
+exit 1
Signature · 1 line
2.9.0
#4 lore raw

PATCH v2 4/5 scripts/gdbus-codegen: Add a dummy version that always fails

In reply to Peter Kjellerstedt

This is intended to catch missing dependencies on the real version.

---
 scripts/gdbus-codegen | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 scripts/gdbus-codegen
scripts/gdbus-codegen new file +11 -0
new file mode 100755
index 0000000..d91386b
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# This is a dummy version that always fails. It is intended to catch
+# missing dependencies on the real version.
+
+myname=${0##*/}
+
+echo "The correct version of $myname is not being used!" >&2
+echo "Make sure the recipe DEPENDS on 'glib-2.0-native'." >&2
+
+exit 1
Signature · 1 line
2.9.0
#5 lore raw

PATCH v2 5/5 scripts/pkg-config: Add a dummy version that always fails

In reply to Peter Kjellerstedt

This is intended to catch missing dependencies on the real version.

---
 scripts/pkg-config | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100755 scripts/pkg-config
scripts/pkg-config new file +16 -0
new file mode 100755
index 0000000..c6376ec
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# This is a dummy version that always fails. It is intended to catch
+# missing dependencies on the real version.
+
+myname=${0##*/}
+
+echo "The correct version of $myname is not being used!" >&2
+echo "Make sure the recipe inherits 'pkgconfig'." >&2
+
+# Return something that will make the compiler barf. This is for when
+# pkg-config is used directly in a Makefile in a construct like:
+# CFLAGS += $(shell pkg-config --cflags glib-2.0)
+echo "The-correct-version-of-$myname-is-not-being-used"
+
+exit 1
Signature · 1 line
2.9.0