Patchwork [V2,1/1] dbus: fix a hard dependency about dbus-ptest

login
register
mail settings
Submitter Chong.Lu@windriver.com
Date March 18, 2014, 7:11 a.m.
Message ID <eff32371a8b9d824ff74e80bd2c3dffbf42961f4.1395126237.git.Chong.Lu@windriver.com>
Download mbox | patch
Permalink /patch/68789/
State New
Headers show

Comments

Chong.Lu@windriver.com - March 18, 2014, 7:11 a.m.
If image contains dbus and ptest is in DISTRO_FEATURES, dbus-ptest package
is installed, regardless of whether ptest-pkgs is in IMAGE_FEATURES. This
issue will increase size for most small images.
This patch fixes this problem.

[YOCTO #5702]

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 meta/recipes-core/dbus/{dbus-ptest_1.6.18.bb => dbus-test_1.6.18.bb} | 0
 meta/recipes-core/dbus/dbus.inc                                      | 5 ++++-
 2 files changed, 4 insertions(+), 1 deletion(-)
 rename meta/recipes-core/dbus/{dbus-ptest_1.6.18.bb => dbus-test_1.6.18.bb} (100%)
Ross Burton - March 18, 2014, 3:15 p.m.
On 18 March 2014 07:11, Chong Lu <Chong.Lu@windriver.com> wrote:
> +PACKAGES += "dbus-ptest"

This should be conditional on DISTRO_FEATURES containing ptest.

> +ALLOW_EMPTY_${PN}-ptest = "1"
> +RDEPENDS_dbus-ptest = "dbus-test-ptest"

Please be consistent with the use of dbus-ptest and ${PN}-ptest.

> +RPROVIDES_dbus-ptest = "${@base_contains('DISTRO_FEATURES', 'ptest', '', 'dbus-test-ptest', d)}"

This line took me a minute to understand and won't be needed if the
PACKAGES addition is conditional.

Ross
Paul Eggleton - March 18, 2014, 3:42 p.m.
On Tuesday 18 March 2014 15:15:23 Burton, Ross wrote:
> On 18 March 2014 07:11, Chong Lu <Chong.Lu@windriver.com> wrote:
> > +PACKAGES += "dbus-ptest"
> 
> This should be conditional on DISTRO_FEATURES containing ptest.
> 
> > +ALLOW_EMPTY_${PN}-ptest = "1"
> > +RDEPENDS_dbus-ptest = "dbus-test-ptest"
> 
> Please be consistent with the use of dbus-ptest and ${PN}-ptest.
> 
> > +RPROVIDES_dbus-ptest = "${@base_contains('DISTRO_FEATURES', 'ptest', '',
> > 'dbus-test-ptest', d)}"
>
> This line took me a minute to understand and won't be needed if the
> PACKAGES addition is conditional.

Right, agreed on all three.

Cheers,
Paul

Patch

diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.18.bb b/meta/recipes-core/dbus/dbus-test_1.6.18.bb
similarity index 100%
rename from meta/recipes-core/dbus/dbus-ptest_1.6.18.bb
rename to meta/recipes-core/dbus/dbus-test_1.6.18.bb
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 677ff78..0949b8e 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -6,9 +6,12 @@  LICENSE = "AFL-2 | GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
                     file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
 DEPENDS = "expat virtual/libintl"
-RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest-ptest', '', d)}"
 RDEPENDS_dbus_class-native = ""
 RDEPENDS_dbus_class-nativesdk = ""
+PACKAGES += "dbus-ptest"
+ALLOW_EMPTY_${PN}-ptest = "1"
+RDEPENDS_dbus-ptest = "dbus-test-ptest"
+RPROVIDES_dbus-ptest = "${@base_contains('DISTRO_FEATURES', 'ptest', '', 'dbus-test-ptest', d)}"
 
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
            file://tmpdir.patch \