Patchwork rfkill: use update-alternatives

login
register
mail settings
Submitter Saul Wold
Date June 18, 2012, 7:19 p.m.
Message ID <1340047163-24689-1-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/30063/
State Superseded, archived
Headers show

Comments

Saul Wold - June 18, 2012, 7:19 p.m.
Since oe-core added rfkill to busybox, this recipe needs to use u-a
also.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Martin Jansa - June 19, 2012, 8:20 a.m.
On Mon, Jun 18, 2012 at 12:19:23PM -0700, Saul Wold wrote:
> Since oe-core added rfkill to busybox, this recipe needs to use u-a
> also.
> 
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb b/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
> index 561fdc7..548990c 100644
> --- a/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
> +++ b/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
> @@ -3,6 +3,7 @@ HOMEPAGE = "http://linuxwireless.org/en/users/Documentation/rfkill"
>  SECTION = "base"
>  LICENSE = "BSD"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=c6036d0eb7edbfced28c4160e5d3fa94"
> +PR = "r1"
>  
>  SRC_URI = "http://wireless.kernel.org/download/${PN}/${P}.tar.bz2 \
>             file://0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch"
> @@ -16,3 +17,9 @@ do_compile() {
>  do_install() {
>          oe_runmake DESTDIR=${D} install
>  }
> +
> +inherit update-alternatives
> +
> +ALTERNATIVE_${PN} = "rfkill"
> +ALTERNATIVE_PRIORITY = "50"

Thanks for quick reaction, but something is wrong:

WARNING: rfkill: alternative target (/usr/bin/rfkill or /usr/bin/rfkill.rfkill) does not exist, skipping...
WARNING: rfkill: NOT adding alternative provide /usr/bin/rfkill: /usr/bin/rfkill.rfkill does not exist
WARNING: alt_link == alt_target: /usr/bin/rfkill == /usr/bin/rfkill

(it's in /usr/sbin... )

Cheers,

Patch

diff --git a/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb b/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
index 561fdc7..548990c 100644
--- a/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
+++ b/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
@@ -3,6 +3,7 @@  HOMEPAGE = "http://linuxwireless.org/en/users/Documentation/rfkill"
 SECTION = "base"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c6036d0eb7edbfced28c4160e5d3fa94"
+PR = "r1"
 
 SRC_URI = "http://wireless.kernel.org/download/${PN}/${P}.tar.bz2 \
            file://0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch"
@@ -16,3 +17,9 @@  do_compile() {
 do_install() {
         oe_runmake DESTDIR=${D} install
 }
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "rfkill"
+ALTERNATIVE_PRIORITY = "50"
+