All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/5] Add dummy tools to help identify needed dependencies
@ 2017-03-03 10:55 Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 1/5] module.bbclass: Add inherit of pkgconfig Peter Kjellerstedt
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-03-03 10:55 UTC (permalink / raw)
  To: openembedded-core

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

-- 
2.9.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCHv2 1/5] module.bbclass: Add inherit of pkgconfig
  2017-03-03 10:55 [PATCHv2 0/5] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
@ 2017-03-03 10:55 ` Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 2/5] linux-libc-headers: " Peter Kjellerstedt
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-03-03 10:55 UTC (permalink / raw)
  To: openembedded-core

This is needed for the make_scripts task.
---
 meta/classes/module.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index a588873..99b7ebc 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -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"
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCHv2 2/5] linux-libc-headers: Add inherit of pkgconfig
  2017-03-03 10:55 [PATCHv2 0/5] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 1/5] module.bbclass: Add inherit of pkgconfig Peter Kjellerstedt
@ 2017-03-03 10:55 ` Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 3/5] scripts/dbus-binding-tool: Add a dummy version that always fails Peter Kjellerstedt
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-03-03 10:55 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 30d2243..653a470 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -42,7 +42,7 @@ python __anonymous () {
         d.setVar("HEADER_FETCH_VER", "2.6")
 }
 
-inherit kernel-arch
+inherit kernel-arch pkgconfig
 
 KORG_ARCHIVE_COMPRESSION ?= "xz"
 
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCHv2 3/5] scripts/dbus-binding-tool: Add a dummy version that always fails
  2017-03-03 10:55 [PATCHv2 0/5] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 1/5] module.bbclass: Add inherit of pkgconfig Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 2/5] linux-libc-headers: " Peter Kjellerstedt
@ 2017-03-03 10:55 ` Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 4/5] scripts/gdbus-codegen: " Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 5/5] scripts/pkg-config: " Peter Kjellerstedt
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-03-03 10:55 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 scripts/dbus-binding-tool | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 scripts/dbus-binding-tool

diff --git a/scripts/dbus-binding-tool b/scripts/dbus-binding-tool
new file mode 100755
index 0000000..2e85987
--- /dev/null
+++ b/scripts/dbus-binding-tool
@@ -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
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCHv2 4/5] scripts/gdbus-codegen: Add a dummy version that always fails
  2017-03-03 10:55 [PATCHv2 0/5] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
                   ` (2 preceding siblings ...)
  2017-03-03 10:55 ` [PATCHv2 3/5] scripts/dbus-binding-tool: Add a dummy version that always fails Peter Kjellerstedt
@ 2017-03-03 10:55 ` Peter Kjellerstedt
  2017-03-03 10:55 ` [PATCHv2 5/5] scripts/pkg-config: " Peter Kjellerstedt
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-03-03 10:55 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 scripts/gdbus-codegen | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 scripts/gdbus-codegen

diff --git a/scripts/gdbus-codegen b/scripts/gdbus-codegen
new file mode 100755
index 0000000..d91386b
--- /dev/null
+++ b/scripts/gdbus-codegen
@@ -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
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCHv2 5/5] scripts/pkg-config: Add a dummy version that always fails
  2017-03-03 10:55 [PATCHv2 0/5] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
                   ` (3 preceding siblings ...)
  2017-03-03 10:55 ` [PATCHv2 4/5] scripts/gdbus-codegen: " Peter Kjellerstedt
@ 2017-03-03 10:55 ` Peter Kjellerstedt
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-03-03 10:55 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 scripts/pkg-config | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100755 scripts/pkg-config

diff --git a/scripts/pkg-config b/scripts/pkg-config
new file mode 100755
index 0000000..c6376ec
--- /dev/null
+++ b/scripts/pkg-config
@@ -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
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-03 10:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03 10:55 [PATCHv2 0/5] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
2017-03-03 10:55 ` [PATCHv2 1/5] module.bbclass: Add inherit of pkgconfig Peter Kjellerstedt
2017-03-03 10:55 ` [PATCHv2 2/5] linux-libc-headers: " Peter Kjellerstedt
2017-03-03 10:55 ` [PATCHv2 3/5] scripts/dbus-binding-tool: Add a dummy version that always fails Peter Kjellerstedt
2017-03-03 10:55 ` [PATCHv2 4/5] scripts/gdbus-codegen: " Peter Kjellerstedt
2017-03-03 10:55 ` [PATCHv2 5/5] scripts/pkg-config: " Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.