diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-04-13 18:43:04 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-24 11:38:17 +0100 |
commit | 9f44708774cdcf623700b336d5a3a7bc40f91f0a (patch) | |
tree | c476ed1160a2e15d844952cc6c05f8498460673a | |
parent | a9b046297c10ca2b2368012803cd719ff59292d7 (diff) | |
download | openembedded-core-9f44708774cdcf623700b336d5a3a7bc40f91f0a.tar.gz openembedded-core-9f44708774cdcf623700b336d5a3a7bc40f91f0a.tar.bz2 openembedded-core-9f44708774cdcf623700b336d5a3a7bc40f91f0a.tar.xz openembedded-core-9f44708774cdcf623700b336d5a3a7bc40f91f0a.zip |
net-tools: Use update-alternatives
Switch to using ALTERNATIVE_LINKS to ensure the update-alternatives are setup
properly, along with the package provides.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r-- | meta/recipes-extended/net-tools/net-tools_1.60-23.bb | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-23.bb b/meta/recipes-extended/net-tools/net-tools_1.60-23.bb index c8d2c5792..b9a05c6fe 100644 --- a/meta/recipes-extended/net-tools/net-tools_1.60-23.bb +++ b/meta/recipes-extended/net-tools/net-tools_1.60-23.bb @@ -5,7 +5,7 @@ BUGTRACKER = "http://bugs.debian.org/net-tools" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ file://ifconfig.c;startline=11;endline=15;md5=da4c7bb79a5d0798faa99ef869721f4a" -PR = "r0" +PR = "r1" SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \ ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \ @@ -67,26 +67,16 @@ do_compile() { oe_runmake } -do_install() { - oe_runmake 'BASEDIR=${D}' install +inherit update-alternatives - for app in ${D}/${base_sbindir}/* ${D}/${base_bindir}/*; do - mv $app $app.${PN} - done -} +base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach" +ALTERNATIVE_LINKS += "${base_sbindir}/${@' ${base_sbindir}/'.join((d.getVar('base_sbindir_progs', True)).split())}" -pkg_postinst_${PN} () { - for app in arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach ; do - update-alternatives --install ${base_sbindir}/$app $app $app.${PN} 100 - done +base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname" +ALTERNATIVE_LINKS += "${base_bindir}/${@' ${base_bindir}/'.join((d.getVar('base_bindir_progs', True)).split())}" - for app in dnsdomainname domainname hostname netstat nisdomainname ypdomainname ; do - update-alternatives --install ${base_bindir}/$app $app $app.${PN} 100 - done -} +ALTERNATIVE_PRIORITY = "100" -pkg_prerm_${PN} () { - for app in arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach dnsdomainname domainname hostname netstat nisdomainname ypdomainname ; do - update-alternatives --remove $app $app.${PN} - done +do_install() { + oe_runmake 'BASEDIR=${D}' install } |