Patchwork [17/17] lrzsz: Use update-alternatives to set provides

login
register
mail settings
Submitter Mark Hatle
Date April 16, 2012, 11:16 p.m.
Message ID <550f51442ff38a8324f4952cf1c9a6ee201de3d1.1334616144.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/26019/
State New
Headers show

Comments

Mark Hatle - April 16, 2012, 11:16 p.m.
Use the update-alternatives and MANUAL_ALTERNATIVE_LINKS to ensure
the package gets the proper provides setup automatically.

Signed-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
index 7f86157..0f858f7 100644
--- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
+++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
@@ -10,7 +10,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
 			file://src/lrz.c;beginline=1;endline=10;md5=5276956373ff7d8758837f6399a1045f"
 SECTION = "console/network"
 DEPENDS = ""
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \
 	   file://autotools.patch \
@@ -20,7 +20,14 @@  SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \
 SRC_URI[md5sum] = "b5ce6a74abc9b9eb2af94dffdfd372a4"
 SRC_URI[sha256sum] = "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1"
 
-inherit autotools gettext
+inherit autotools gettext update-alternatives
+
+MANUAL_ALTERNATIVE_LINKS = "${bindir}/rz:${bindir}/lrz"
+MANUAL_ALTERNATIVE_LINKS += "${bindir}/rx:${bindir}/lrz"
+MANUAL_ALTERNATIVE_LINKS += "${bindir}/rb:${bindir}/lrz"
+MANUAL_ALTERNATIVE_LINKS += "${bindir}/sz:${bindir}/lsz"
+MANUAL_ALTERNATIVE_LINKS += "${bindir}/sx:${bindir}/lsz"
+MANUAL_ALTERNATIVE_LINKS += "${bindir}/sb:${bindir}/lsz"
 
 do_install() {
 	install -d ${D}${bindir}/