[oe-commits] Chen Qi : bridge-utils: inherit update-alternatives to avoid duplicate code
git at git.openembedded.org
git at git.openembedded.org
Fri Nov 1 14:11:38 UTC 2013
Module: meta-openembedded.git
Branch: master
Commit: fe0c58ddd2035fa04540cb09c42a9473ea797154
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=fe0c58ddd2035fa04540cb09c42a9473ea797154
Author: Chen Qi <Qi.Chen at windriver.com>
Date: Thu Oct 31 14:29:46 2013 +0800
bridge-utils: inherit update-alternatives to avoid duplicate code
Inherit update-alternatives to avoid duplicate code.
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Joe MacDonald <joe at deserted.net>
---
.../recipes-support/bridge-utils/bridge-utils.inc | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils.inc b/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
index bd96c6a..bcdc04a 100644
--- a/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
+++ b/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
@@ -11,7 +11,11 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz \
file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \
"
-inherit autotools
+inherit autotools update-alternatives
+
+ALTERNATIVE_${PN} = "brctl"
+ALTERNATIVE_PRIORITY[brctl] = "100"
+ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl"
EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"
@@ -23,11 +27,3 @@ do_install_append () {
}
RRECOMMENDS_${PN} = "kernel-module-bridge"
-
-pkg_postinst_${PN} () {
- update-alternatives --install ${sbindir}/brctl brctl brctl.${PN} 100
-}
-
-pkg_prerm_${PN} () {
- update-alternatives --remove brctl brctl.${PN}
-}
More information about the Openembedded-commits
mailing list