shr.conf: set DISTRO_apm = fso-apm
PATCH 1/2 shr.conf: set DISTRO_apm = fso-apm
--- conf/distro/shr.conf | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
conf/distro/shr.conf +1 -0
@@ -183,6 +183,7 @@ PREFERRED_PROVIDER_virtual/db-native = "db3-native" PREFERRED_PROVIDER_virtual/libsdl = "libsdl-x11" PREFERRED_PROVIDER_virtual/libx11 ?= "libx11" PREFERRED_PROVIDER_virtual/libusb0 ?= "libusb" +DISTRO_apm = "fso-apm" ############################################################################# # PREFERRED VERSIONS
Signature · 1 line
1.6.3.3
PATCH 2/2 task-base: Introduce DISTRO_apm and convert recipes to use it.
* This allows distros to override the apm provider with an DISTRO_apm variable
* The change should be transparent and invisible for other distros
* This could also be done with a virtual/apm package, and a PREFERED_PROVIDER set to apm
--- recipes/ipaq-sleep/ipaq-sleep_0.9.bb | 5 +++-- recipes/matchbox2/matchbox-panel-2_svn.bb | 6 ++++-- recipes/openmoko2/neod_svn.bb | 6 ++++-- recipes/suspend-desktop/suspend-desktop_1.0.bb | 5 +++-- recipes/tasks/task-base.bb | 7 +++++-- 5 files changed, 19 insertions(+), 10 deletions(-)
recipes/ipaq-sleep/ipaq-sleep_0.9.bb +3 -2
@@ -2,8 +2,9 @@ DESCRIPTION = "Automatic sleep/suspend control daemon" SECTION = "x11/base" LICENSE = "GPL" DEPENDS = "apmd virtual/xserver libxext virtual/libx11 libxau xscrnsaverh libxss" -RDEPENDS = "apm" -PR = "r6" +DISTRO_apm ?= "apm" +RDEPENDS = "${DISTRO_apm}" +PR = "r7" inherit gpe pkgconfig
recipes/matchbox2/matchbox-panel-2_svn.bb +4 -2
@@ -1,13 +1,15 @@ DESCRIPTION = "matchbox-panel-2 is a lightweight dock (system tray) application based on Gtk+" LICENSE = "GPLv2" SECTION = "x11/panels" + +DISTRO_apm ?= "apm" DEPENDS = "gtk+ startup-notification dbus dbus-glib matchbox-panel-2-icon-themes" DEPENDS += " ${@base_contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}" -DEPENDS += " ${@base_contains("MACHINE_FEATURES", "apm", "apmd", "",d)}" +DEPENDS += " ${@base_contains("MACHINE_FEATURES", "${DISTRO_apm}", "apmd", "",d)}" RDEPENDS_${PN} = "matchbox-panel-2-icon-theme" PACKAGE_ARCH = "${MACHINE_ARCH}" PV = "2.0+svnr${SRCPV}" -PR = "r0" +PR = "r1" inherit autotools_stage pkgconfig
recipes/openmoko2/neod_svn.bb +4 -2
@@ -1,9 +1,11 @@ DESCRIPTION = "Simple Neo1973 Daemon for Button Handling and Power Management" SECTION = "openmoko/daemons" + +DISTRO_apm ?= "apm" DEPENDS = "gtk+ pulseaudio apmd" -RDEPENDS = "gpe-scap xrandr alsa-utils-amixer apm dbus" +RDEPENDS = "gpe-scap xrandr alsa-utils-amixer ${DISTRO_apm} dbus" PV = "0.1.0+svnr${SRCPV}" -PR = "r6" +PR = "r7" inherit openmoko2 gconf
recipes/suspend-desktop/suspend-desktop_1.0.bb +3 -2
@@ -3,10 +3,11 @@ PRIORITY = "optional" DESCRIPTION = "Suspend feature for the application launcher menu." LICENSE = "GPL" -PR = "r1" +PR = "r2" +DISTRO-apm ?= "apm" RDEPENDS = "gpe-conf" -RRECOMMENDS = "apm" +RRECOMMENDS = "${DISTRO_apm}" PACKAGES = "${PN}" PACKAGE_ARCH = "all"
recipes/tasks/task-base.bb +5 -2
@@ -1,5 +1,5 @@ DESCRIPTION = "Merge machine and distro options to create a basic machine task/package" -PR = "r86" +PR = "r87" inherit task
@@ -60,6 +60,9 @@ HOTPLUG ?= "${@base_contains("MACHINE_FEATURES", "kernel24", "linux-hotplug","" # DISTRO_SSH_DAEMON ?= "dropbear" +# Distro can override apm provider +DISTRO_apm ?= "apm" + # # bluetooth manager #
@@ -190,7 +193,7 @@ RDEPENDS_task-base-acpi = "\ acpid" RDEPENDS_task-base-apm = "\ - apm \ + "${DISTRO_apm}" \ apmd \ ${@base_contains('MACHINE_FEATURES', 'kernel24', 'network-suspend-scripts', '',d)}"
Signature · 1 line
1.6.3.3
Re: [PATCH 2/2] task-base: Introduce DISTRO_apm and convert recipes to use it.
This is my take on solving our problem that we want a different "apm" provider. Koen outlined this solution, so this way I went.
All recipes that RDPEND on "apm" basically get a
DISTRO_apm ?= "apm"
RDEPEND += ${DISTRO_apm}
This could also be done with a virtual/apm package, and a PREFERED_PROVIDER set to apm for all distros. Which would even be cleaner I think, with the downside that all other distros would need to set a prefered provider too.
For things like this is would be nice to get a common sane-providers.inc where these standard providers can be defined.
What do you think? Can I commit this?
spaetz
Re: [PATCH 2/2] task-base: Introduce DISTRO_apm and convert recipes to use it.
Quoted 5 lines · Sebastian Spaeth
This is my take on solving our problem that we want a different "apm" provider. Koen outlined this solution, so this way I went.
All recipes that RDPEND on "apm" basically get a
Quoted 7 lines
DISTRO_apm?= "apm"
RDEPEND += ${DISTRO_apm}This could also be done with a virtual/apm package, and a
PREFERED_PROVIDERset to apm for all distros. Which would even be cleaner I think, with the downside that all other distros would need to set a prefered provider too.
The latter approach does sound rather better to me. This is exactly what virtuals are for, and I'm not sure that we want a massive proliferation of DISTRO_foo variables that effectively shadow PREFERRED_PROVIDER.
You're right that there is a bit of an issue with adding new virtuals, in that old distros need to remain pinned to the provider they were getting previously rather than being left to flap in the wind. Your proposal of adding a new include file sounds like a reasonable way to address that, though I'm not completely enamoured of the "sane-" terminology. I think something like "compatibility-providers.inc" or even "legacy-providers.inc" would better capture what the file is for.
p.
Re: [PATCH 2/2] task-base: Introduce DISTRO_apm and convert recipes to use it.
In reply to Sebastian SpaethShouldn't that rather be DISTRO_APM? That way it looks less like an override.
:M:
Re: [PATCH 2/2] task-base: Introduce DISTRO_apm and convert recipes to use it.
Quoted 2 lines · Michael 'Mickey' Lauer
Shouldn't that rather be
DISTRO_APM? That way it looks less like an override.
DISTRO_APM is just as fine for me. I was using PREFERRED_PROVIDER_glibc as an example. But I see that DISTRO_SSH_SERVER is also capitalized. Will modify to all CAPS, thanks.
spaetz
PATCH 1/1 task-base: Introduce DISTRO_APM and convert recipes to use that
In reply to Michael 'Mickey' Lauer--- conf/distro/shr.conf | 2 +- recipes/ipaq-sleep/ipaq-sleep_0.9.bb | 5 +++-- recipes/openmoko2/neod_svn.bb | 6 ++++-- recipes/suspend-desktop/suspend-desktop_1.0.bb | 5 +++-- recipes/tasks/task-base.bb | 7 +++++-- 5 files changed, 16 insertions(+), 9 deletions(-)
conf/distro/shr.conf +1 -1
@@ -30,6 +30,7 @@ DISTRO_TYPE = "debug" DISTRO = "shr" DISTRO_SSH_DAEMON = "openssh" +DISTRO_APM = "fso-apm" #Generate locales on the buildsystem instead of on the target. Speeds up first boot, set to "1" to enable ENABLE_BINARY_LOCALE_GENERATION ?= "1"
@@ -183,7 +184,6 @@ PREFERRED_PROVIDER_virtual/db-native = "db3-native" PREFERRED_PROVIDER_virtual/libsdl = "libsdl-x11" PREFERRED_PROVIDER_virtual/libx11 ?= "libx11" PREFERRED_PROVIDER_virtual/libusb0 ?= "libusb" -DISTRO_apm = "fso-apm" ############################################################################# # PREFERRED VERSIONS
recipes/ipaq-sleep/ipaq-sleep_0.9.bb +3 -2
@@ -2,8 +2,9 @@ DESCRIPTION = "Automatic sleep/suspend control daemon" SECTION = "x11/base" LICENSE = "GPL" DEPENDS = "apmd virtual/xserver libxext virtual/libx11 libxau xscrnsaverh libxss" -RDEPENDS = "apm" -PR = "r6" +DISTRO_APM ?= "apm" +RDEPENDS = "${DISTRO_APM}" +PR = "r7" inherit gpe pkgconfig
recipes/openmoko2/neod_svn.bb +4 -2
@@ -1,9 +1,11 @@ DESCRIPTION = "Simple Neo1973 Daemon for Button Handling and Power Management" SECTION = "openmoko/daemons" + +DISTRO_APM ?= "apm" DEPENDS = "gtk+ pulseaudio apmd" -RDEPENDS = "gpe-scap xrandr alsa-utils-amixer apm dbus" +RDEPENDS = "gpe-scap xrandr alsa-utils-amixer ${DISTRO_APM} dbus" PV = "0.1.0+svnr${SRCPV}" -PR = "r6" +PR = "r7" inherit openmoko2 gconf
recipes/suspend-desktop/suspend-desktop_1.0.bb +3 -2
@@ -3,10 +3,11 @@ PRIORITY = "optional" DESCRIPTION = "Suspend feature for the application launcher menu." LICENSE = "GPL" -PR = "r1" +PR = "r2" +DISTRO_APM ?= "apm" RDEPENDS = "gpe-conf" -RRECOMMENDS = "apm" +RRECOMMENDS = "${DISTRO_APM}" PACKAGES = "${PN}" PACKAGE_ARCH = "all"
recipes/tasks/task-base.bb +5 -2
@@ -1,5 +1,5 @@ DESCRIPTION = "Merge machine and distro options to create a basic machine task/package" -PR = "r86" +PR = "r87" inherit task
@@ -60,6 +60,9 @@ HOTPLUG ?= "${@base_contains("MACHINE_FEATURES", "kernel24", "linux-hotplug","" # DISTRO_SSH_DAEMON ?= "dropbear" +# Distro can override apm provider +DISTRO_APM ?= "apm" + # # bluetooth manager #
@@ -190,7 +193,7 @@ RDEPENDS_task-base-acpi = "\ acpid" RDEPENDS_task-base-apm = "\ - apm \ + "${DISTRO_APM}" \ apmd \ ${@base_contains('MACHINE_FEATURES', 'kernel24', 'network-suspend-scripts', '',d)}"
Signature · 1 line
1.6.3.3
Re: [PATCH 2/2] task-base: Introduce DISTRO_apm and convert recipes to use it.
In reply to Sebastian SpaethQuoted 2 lines · Sebastian Spaeth
recipes/matchbox2/matchbox-panel-2_svn.bb +0
-0
...
Quoted 2 lines
recipes/matchbox2/matchbox-panel-2_svn.bb +2
-0+ +DISTRO_apm ?= "apm"
...
recipes/matchbox2/matchbox-panel-2_svn.bb line 8
Quoted 2 lines
recipes/matchbox2/matchbox-panel-2_svn.bb +1
-1-DEPENDS += " ${@base_contains("MACHINE_FEATURES", "apm", "apmd", "",d)}" +DEPENDS += " ${@base_contains("MACHINE_FEATURES", "${DISTRO_apm}", "apmd", "",d)}"
This change is of course bogus and would not go in! spaetz
Re: [PATCH 2/2] task-base: Introduce DISTRO_apm and convert recipes to use it.
In reply to Sebastian SpaethQuoted 3 lines · Sebastian Spaeth
* This allows distros to override the apm provider with an
DISTRO_apmvariable
* The change should be transparent and invisible for other distros
* This could also be done with a virtual/apm package, and aPREFERED_PROVIDERset to apm
Don't forget to remove the (R)PROVIDES in fso-apmd which are causing all the problems. Some comment as mickey, please use caps for vars.
regards,
Koen
Quoted 113 lines
Signed-off-by Sebastian Spaeth<[email protected]>--- recipes/ipaq-sleep/ipaq-sleep_0.9.bb | 5 +++-- recipes/matchbox2/matchbox-panel-2_svn.bb | 6 ++++-- recipes/openmoko2/neod_svn.bb | 6 ++++-- recipes/suspend-desktop/suspend-desktop_1.0.bb | 5 +++-- recipes/tasks/task-base.bb | 7 +++++-- 5 files changed, 19 insertions(+), 10 deletions(-)recipes/ipaq-sleep/ipaq-sleep_0.9.bb +3
-2@@ -2,8 +2,9 @@ DESCRIPTION = "Automatic sleep/suspend control daemon" SECTION = "x11/base" LICENSE = "GPL" DEPENDS = "apmd virtual/xserver libxext virtual/libx11 libxau xscrnsaverh libxss" -RDEPENDS = "apm" -PR = "r6" +DISTRO_apm ?= "apm" +RDEPENDS = "${DISTRO_apm}" +PR = "r7" inherit gpe pkgconfigrecipes/matchbox2/matchbox-panel-2_svn.bb +4
-2@@ -1,13 +1,15 @@ DESCRIPTION = "matchbox-panel-2 is a lightweight dock (system tray) application based on Gtk+" LICENSE = "GPLv2" SECTION = "x11/panels" + +DISTRO_apm ?= "apm" DEPENDS = "gtk+ startup-notification dbus dbus-glib matchbox-panel-2-icon-themes" DEPENDS += " ${@base_contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}" -DEPENDS += " ${@base_contains("MACHINE_FEATURES", "apm", "apmd", "",d)}" +DEPENDS += " ${@base_contains("MACHINE_FEATURES", "${DISTRO_apm}", "apmd", "",d)}" RDEPENDS_${PN} = "matchbox-panel-2-icon-theme" PACKAGE_ARCH = "${MACHINE_ARCH}" PV = "2.0+svnr${SRCPV}" -PR = "r0" +PR = "r1" inherit autotools_stage pkgconfigrecipes/openmoko2/neod_svn.bb +4
-2@@ -1,9 +1,11 @@ DESCRIPTION = "Simple Neo1973 Daemon for Button Handling and Power Management" SECTION = "openmoko/daemons" + +DISTRO_apm ?= "apm" DEPENDS = "gtk+ pulseaudio apmd" -RDEPENDS = "gpe-scap xrandr alsa-utils-amixer apm dbus" +RDEPENDS = "gpe-scap xrandr alsa-utils-amixer ${DISTRO_apm} dbus" PV = "0.1.0+svnr${SRCPV}" -PR = "r6" +PR = "r7" inherit openmoko2 gconfrecipes/suspend-desktop/suspend-desktop_1.0.bb +3
-2@@ -3,10 +3,11 @@ PRIORITY = "optional" DESCRIPTION = "Suspend feature for the application launcher menu." LICENSE = "GPL" -PR = "r1" +PR = "r2" +DISTRO-apm ?= "apm" RDEPENDS = "gpe-conf" -RRECOMMENDS = "apm" +RRECOMMENDS = "${DISTRO_apm}" PACKAGES = "${PN}" PACKAGE_ARCH = "all"recipes/tasks/task-base.bb +5
-2@@ -1,5 +1,5 @@ DESCRIPTION = "Merge machine and distro options to create a basic machine task/package" -PR = "r86" +PR = "r87" inherit task@@ -60,6 +60,9 @@ HOTPLUG ?= "${@base_contains("MACHINE_FEATURES", "kernel24", "linux-hotplug","" # DISTRO_SSH_DAEMON ?= "dropbear" +# Distro can override apm provider +DISTRO_apm ?= "apm" + # # bluetooth manager #@@ -190,7 +193,7 @@ RDEPENDS_task-base-acpi = "\ acpid" RDEPENDS_task-base-apm = "\ - apm \ + "${DISTRO_apm}" \ apmd \ ${@base_contains('MACHINE_FEATURES', 'kernel24', 'network-suspend-scripts', '',d)}"
Re: [PATCH 2/2] task-base: Introduce DISTRO_apm and convert recipes to use it.
Quoted 2 lines · Koen Kooi
Don't forget to remove the (R)PROVIDES in fso-apmd which are causing all the problems. Some comment as mickey, please use caps for vars.
I have pushed this now (using caps), to get angstrom fixed. I agree with Phil that using "virtaul/apm" would be cleaner though, so I will be working towards using that.
Removing the RPROVIDES now from fsp-apm.
spaetz