summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-07-07 15:45:57 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-07 13:37:17 +0100
commite4102c3d2205371db4da7db7bca1a5853bb3c23e (patch)
treef79c2a2879fac298d91816867612bb49d2cdb684 /meta
parentd97eeadc4e759d4e7793c30f6cc214e86e8df35c (diff)
downloadopenembedded-core-e4102c3d2205371db4da7db7bca1a5853bb3c23e.tar.gz
openembedded-core-e4102c3d2205371db4da7db7bca1a5853bb3c23e.tar.bz2
openembedded-core-e4102c3d2205371db4da7db7bca1a5853bb3c23e.zip
powertop: inherit update-alternatives and use a higher priority than busybox
busybox-1.18.4 installs /bin/powertop and the powertop recipe installs /usr/bin/powertop. So, in PATH, if /bin appears before /usr/bin, we would run the version offered by busybox, which has a very limited function (e.g., no parameter is accepted) and this causes trouble to eclipse plugin. We can use update-alternatives for powertop with higher priority to resolve the issue. Fixes [YOCTO #1208] Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/powertop/powertop_1.13.bb8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-kernel/powertop/powertop_1.13.bb b/meta/recipes-kernel/powertop/powertop_1.13.bb
index dff4fcd27e..472a2bbcff 100644
--- a/meta/recipes-kernel/powertop/powertop_1.13.bb
+++ b/meta/recipes-kernel/powertop/powertop_1.13.bb
@@ -11,7 +11,7 @@ DEPENDS = "virtual/libintl ncurses"
# powertop 1.13 needs lspci
RDEPENDS_${PN} = "pciutils"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://www.lesswatts.org/projects/powertop/download/powertop-${PV}.tar.gz \
file://stub_out_the_ncurses_calls_in_dump_mode.patch"
@@ -22,6 +22,12 @@ SRC_URI[sha256sum] = "2bc866089496877dd26d2d316ad5763ab8ecb5e28aefba44bc5d355dcd
CFLAGS += "${LDFLAGS}"
EXTRA_OEMAKE = "VERSION=\"${PV}\""
+inherit update-alternatives
+ALTERNATIVE_NAME = "powertop"
+ALTERNATIVE_PATH = "${bindir}/powertop"
+ALTERNATIVE_LINK = "${base_bindir}/powertop"
+ALTERNATIVE_PRIORITY = "100"
+
do_configure() {
# We do not build ncurses with wide char support
sed -i -e "s/lncursesw/lncurses/" ${S}/Makefile