diff options
| author | Kevin Tian <kevin.tian@intel.com> | 2010-09-27 12:42:16 +0800 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-29 16:42:33 +0100 |
| commit | b797a842babd3d4ebad7d383346127a49269fd8b (patch) | |
| tree | 55d2d4d82955fe5945711fb7fd3a89c9a77fd501 | |
| parent | 2b181178207ab69b589f4fd0068670ccf23c5aee (diff) | |
| download | poky-b797a842babd3d4ebad7d383346127a49269fd8b.tar.gz | |
diffutils: use new batch update-alternatives feature
Signed-off-by Kevin Tian <kevin.tian@intel.com>
| -rw-r--r-- | meta/recipes-extended/diffutils/diffutils_2.8.1.bb | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb index 86b46aafec..2b94cc7992 100644 --- a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb +++ b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb | |||
| @@ -3,7 +3,7 @@ LICENSE = "GPL" | |||
| 3 | DESCRIPTION = "Diffutils contains the GNU diff, diff3, \ | 3 | DESCRIPTION = "Diffutils contains the GNU diff, diff3, \ |
| 4 | sdiff, and cmp utilities. These programs are usually \ | 4 | sdiff, and cmp utilities. These programs are usually \ |
| 5 | used for creating patch files." | 5 | used for creating patch files." |
| 6 | PR = "r3" | 6 | PR = "r4" |
| 7 | 7 | ||
| 8 | SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz" | 8 | SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz" |
| 9 | 9 | ||
| @@ -16,23 +16,5 @@ inherit autotools update-alternatives gettext | |||
| 16 | # see diffutils.mk in buildroot) | 16 | # see diffutils.mk in buildroot) |
| 17 | EXTRA_OECONF_linux-uclibc = "--without-included-regex" | 17 | EXTRA_OECONF_linux-uclibc = "--without-included-regex" |
| 18 | 18 | ||
| 19 | do_install_append () { | 19 | ALTERNATIVE_LINKS = "${bindir}/diff ${bindir}/cmp" |
| 20 | mv ${D}${bindir}/diff ${D}${bindir}/diff.${PN} | ||
| 21 | mv ${D}${bindir}/cmp ${D}${bindir}/cmp.${PN} | ||
| 22 | } | ||
| 23 | |||
| 24 | ALTERNATIVE_NAME = "diff" | ||
| 25 | ALTERNATIVE_PATH = "diff.${PN}" | ||
| 26 | ALTERNATIVE_PRIORITY = "100" | 20 | ALTERNATIVE_PRIORITY = "100" |
| 27 | |||
| 28 | pkg_postinst_${PN} () { | ||
| 29 | |||
| 30 | update-alternatives --install /usr/bin/cmp cmp cmp.diffutils 100 | ||
| 31 | |||
| 32 | } | ||
| 33 | |||
| 34 | pkg_postrm_${PN} () { | ||
| 35 | |||
| 36 | update-alternatives --remove cmp cmp.diffutils | ||
| 37 | |||
| 38 | } | ||
