]> code.ossystems Code Review - openembedded-core.git/commitdiff
diffutils: use update-alternatives for cmp (also provided with busybox 1.9.1)
authorMarcin Juszkiewicz <hrw@openedhand.com>
Wed, 26 Mar 2008 10:01:08 +0000 (10:01 +0000)
committerMarcin Juszkiewicz <hrw@openedhand.com>
Wed, 26 Mar 2008 10:01:08 +0000 (10:01 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4121 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/diffutils/diffutils_2.8.1.bb

index a0a7b7dad9a89a01deb87ca9a31b2bbbd7f03455..584188c2a39f6cbec091a6cf6b54063c3a6296c8 100644 (file)
@@ -3,7 +3,7 @@ LICENSE = "GPL"
 DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
 sdiff, and cmp utilities. These programs are usually \
 used for creating patch files."
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz"
 
@@ -18,8 +18,21 @@ EXTRA_OECONF_linux-uclibc = "--without-included-regex"
 
 do_install_append () {
         mv ${D}${bindir}/diff ${D}${bindir}/diff.${PN}
+        mv ${D}${bindir}/cmp ${D}${bindir}/cmp.${PN}
 }
 
 ALTERNATIVE_NAME = "diff"
 ALTERNATIVE_PATH = "diff.${PN}"
 ALTERNATIVE_PRIORITY = "100"
+
+pkg_postinst_${PN} () {
+
+update-alternatives --install /usr/bin/cmp cmp cmp.diffutils 100
+
+}
+
+pkg_postrm_${PN} () {
+
+update-alternatives --remove cmp cmp.diffutils
+
+}