Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] lttng-modules: allow building without tracepoints enabled in kernel
@ 2013-07-01 14:21 Paul Eggleton
  2013-07-01 14:44 ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggleton @ 2013-07-01 14:21 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Zanussi

Avoid a QA failure and instead produce a sensible warning message if no
modules were built.

Fixes [YOCTO #4791].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb b/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb
index 700c4c5..0bbaa81 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb
@@ -22,3 +22,14 @@ export KERNEL_SRC="${STAGING_KERNEL_DIR}"
 
 
 S = "${WORKDIR}/git"
+
+do_install_append() {
+	# Delete empty directories to avoid QA failures if no modules were built
+	find ${D}/lib -depth -type d -empty -exec rmdir {} \;
+}
+
+python do_package_prepend() {
+    if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')):
+        bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True))
+}
+
-- 
1.8.1.2



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

* Re: [PATCH] lttng-modules: allow building without tracepoints enabled in kernel
  2013-07-01 14:21 [PATCH] lttng-modules: allow building without tracepoints enabled in kernel Paul Eggleton
@ 2013-07-01 14:44 ` Burton, Ross
  2013-07-01 14:55   ` Paul Eggleton
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2013-07-01 14:44 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On 1 July 2013 15:21, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> +       find ${D}/lib -depth -type d -empty -exec rmdir {} \;

A slightly cleaner form of this:

$ find ${D}/lib -type d -empty -delete

Ross


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

* Re: [PATCH] lttng-modules: allow building without tracepoints enabled in kernel
  2013-07-01 14:44 ` Burton, Ross
@ 2013-07-01 14:55   ` Paul Eggleton
  2013-07-01 15:39     ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggleton @ 2013-07-01 14:55 UTC (permalink / raw)
  To: Burton, Ross; +Cc: openembedded-core

On Monday 01 July 2013 15:44:10 Burton, Ross wrote:
> On 1 July 2013 15:21, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> > +       find ${D}/lib -depth -type d -empty -exec rmdir {} \;
> 
> A slightly cleaner form of this:
> 
> $ find ${D}/lib -type d -empty -delete

Right, I did check the find manpage but it only mentioned that -delete deletes 
files. Testing here I see that it does work though. I'll wait for further 
reviews before sending a v2.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [PATCH] lttng-modules: allow building without tracepoints enabled in kernel
  2013-07-01 14:55   ` Paul Eggleton
@ 2013-07-01 15:39     ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2013-07-01 15:39 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On 1 July 2013 15:55, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> Right, I did check the find manpage but it only mentioned that -delete deletes
> files. Testing here I see that it does work though. I'll wait for further
> reviews before sending a v2.

Actually, http://pubs.opengroup.org/onlinepubs/009696699/utilities/find.html
doesn't mention -delete, so it's possible/likely this is a GNUism.  I
retract my comment.

Ross


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

end of thread, other threads:[~2013-07-01 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 14:21 [PATCH] lttng-modules: allow building without tracepoints enabled in kernel Paul Eggleton
2013-07-01 14:44 ` Burton, Ross
2013-07-01 14:55   ` Paul Eggleton
2013-07-01 15:39     ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox