[OE-core] [PATCH 05/17] openssh: Use update-alternatives

Mark Hatle mark.hatle at windriver.com
Mon Apr 16 22:45:08 UTC 2012


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 at windriver.com>
---
 meta/recipes-connectivity/openssh/openssh_5.9p1.bb |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

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
 }
-- 
1.7.3.4





More information about the Openembedded-core mailing list