diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2010-09-01 12:56:24 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-02 09:50:50 +0100 |
commit | 3f7f13da8ce45b73be7954b47c5e7f427264da59 (patch) | |
tree | ddeafced870119f6e28360eeddfc77adf921d90e /meta/recipes-extended/which/which_2.20.bb | |
parent | c4ecd356d17e243655dd580b0636be1fe6ad4e77 (diff) | |
download | poky-3f7f13da8ce45b73be7954b47c5e7f427264da59.tar.gz |
which (GPLv3): inherit update-alternatives to handle install priority
inherit the update-alternatives class to handle install priority issue,
which is recommended by poky.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Diffstat (limited to 'meta/recipes-extended/which/which_2.20.bb')
-rw-r--r-- | meta/recipes-extended/which/which_2.20.bb | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb index b7730de3b3..6efb24fcd8 100644 --- a/meta/recipes-extended/which/which_2.20.bb +++ b/meta/recipes-extended/which/which_2.20.bb | |||
@@ -6,9 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\ | |||
6 | HOMEPAGE = "http://ftp.gnu.org/gnu/which/" | 6 | HOMEPAGE = "http://ftp.gnu.org/gnu/which/" |
7 | DEPENDS = "cwautomacros-native" | 7 | DEPENDS = "cwautomacros-native" |
8 | 8 | ||
9 | inherit autotools | 9 | inherit autotools update-alternatives |
10 | 10 | ||
11 | PR = "r0" | 11 | PR = "r1" |
12 | 12 | ||
13 | SRC_URI = "http://ftp.gnu.org/gnu/which/which-${PV}.tar.gz \ | 13 | SRC_URI = "http://ftp.gnu.org/gnu/which/which-${PV}.tar.gz \ |
14 | file://remove-declaration.patch" | 14 | file://remove-declaration.patch" |
@@ -22,14 +22,6 @@ do_install() { | |||
22 | mv ${D}${bindir}/which ${D}${bindir}/which.${PN} | 22 | mv ${D}${bindir}/which ${D}${bindir}/which.${PN} |
23 | } | 23 | } |
24 | 24 | ||
25 | pkg_postinst_${PN} () { | 25 | ALTERNATIVE_NAME = "which" |
26 | if [ "${PN}" = "${BPN}" ] ; then | 26 | ALTERNATIVE_PATH = "which.${PN}" |
27 | update-alternatives --install ${bindir}/which which which.${PN} 100 | 27 | ALTERNATIVE_PRIORITY = "100" |
28 | fi | ||
29 | } | ||
30 | |||
31 | pkg_prerm_${PN} () { | ||
32 | if [ "${PN}" = "${BPN}" ] ; then | ||
33 | update-alternatives --remove which which.${PN} | ||
34 | fi | ||
35 | } | ||