[oe-commits] Mark Hatle : tar: use new update-alternatives

git at git.openembedded.org git at git.openembedded.org
Wed May 30 11:05:34 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: ed48d4b382dae08ac47bccdcb98b1e87dc6449cc
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ed48d4b382dae08ac47bccdcb98b1e87dc6449cc

Author: Mark Hatle <mark.hatle at windriver.com>
Date:   Mon May 21 13:18:49 2012 -0500

tar: use new update-alternatives

Signed-off-by: Mark Hatle <mark.hatle at windriver.com>

---

 meta/recipes-extended/tar/tar.inc     |   18 ++++++++----------
 meta/recipes-extended/tar/tar_1.17.bb |    2 +-
 meta/recipes-extended/tar/tar_1.26.bb |    2 +-
 3 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc
index 0533b82..8c475df 100644
--- a/meta/recipes-extended/tar/tar.inc
+++ b/meta/recipes-extended/tar/tar.inc
@@ -17,18 +17,16 @@ do_install () {
 
 do_install_extra () {
     install -d ${D}${base_bindir}
-    mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN}
+    mv ${D}${bindir}/tar ${D}${base_bindir}/tar
     rmdir ${D}${bindir}/
     rmdir ${D}${sbindir}/
-    mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN}
 }
 
-pkg_postinst_${PN} () {
-    update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100
-    update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100
-}
+inherit update-alternatives
 
-pkg_prerm_${PN} () {
-    update-alternatives --remove tar tar.${PN}
-    update-alternatives --remove rmt rmt.${PN}
-}
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "tar rmt"
+
+ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt"
diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb
index 138ea71..9425f14 100644
--- a/meta/recipes-extended/tar/tar_1.17.bb
+++ b/meta/recipes-extended/tar/tar_1.17.bb
@@ -3,7 +3,7 @@ require tar.inc
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI += "file://m4extensions.patch \
     file://gcc43build.patch \
diff --git a/meta/recipes-extended/tar/tar_1.26.bb b/meta/recipes-extended/tar/tar_1.26.bb
index e679ccb..9c06d7e 100644
--- a/meta/recipes-extended/tar/tar_1.26.bb
+++ b/meta/recipes-extended/tar/tar_1.26.bb
@@ -3,7 +3,7 @@ require tar.inc
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI[md5sum] = "2cee42a2ff4f1cd4f9298eeeb2264519"
 SRC_URI[sha256sum] = "5a5369f464502a598e938029c310d4b3abd51e6bb8dfd045663e61c8ea9f6d41"





More information about the Openembedded-commits mailing list