Patchwork [05/17] openssh: Use update-alternatives

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

Comments

Mark Hatle - April 16, 2012, 10:45 p.m.
Use the MANUAL_ALTERNATIVE_LINKS to ensure the update-alternative
references are properly added to the packages provides.

Also fix the RPROVIDES, as they are package split specific!

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-connectivity/openssh/openssh_5.9p1.bb |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-connectivity/openssh/openssh_5.9p1.bb b/meta/recipes-connectivity/openssh/openssh_5.9p1.bb
index 749f89e..6ed1276 100644
--- a/meta/recipes-connectivity/openssh/openssh_5.9p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_5.9p1.bb
@@ -7,12 +7,13 @@  SECTION = "console/network"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENCE;md5=bae9a689be41581503bcf95d8fb42c4e"
 
-PR = "r3"
+PR = "r4"
 
 DEPENDS = "zlib openssl"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
-RPROVIDES = "ssh sshd"
+RPROVIDES_${PN}-ssh = "ssh"
+RPROVIDES_${PN}-sshd = "sshd"
 
 CONFLICTS_${PN} = "dropbear"
 RCONFLICTS_${PN}-sshd = "dropbear"
@@ -29,7 +30,7 @@  PAM_SRC_URI = "file://sshd"
 SRC_URI[md5sum] = "afe17eee7e98d3b8550cc349834a85d0"
 SRC_URI[sha256sum] = "8d3e8b6b6ff04b525a6dfa6fdeb6a99043ccf6c3310cc32eba84c939b07777d5"
 
-inherit useradd update-rc.d
+inherit useradd update-rc.d update-alternatives
 
 USERADD_PACKAGES = "${PN}-sshd"
 USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
@@ -99,6 +100,8 @@  RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
 DEPENDS_${PN}-sshd += "update-rc.d"
 RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen"
 
+MANUAL_ALTERNATIVE_LINKS = "${bindir}/scp ${bindir}/ssh"
+
 pkg_postinst_${PN}-scp () {
 	update-alternatives --install ${bindir}/scp scp scp.${PN} 90
 }