Patchwork [01/22] cpio: Split RMT from cpio

login
register
mail settings
Submitter Mark Hatle
Date Dec. 4, 2012, 5:14 p.m.
Message ID <f187e2a58d9ad54de5d8cd8cc8fc0b7f861154de.1354641032.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/40295/
State Accepted
Commit dbadf6b9f5bae1e513b0f1957b8a4c9687d5ea80
Headers show

Comments

Mark Hatle - Dec. 4, 2012, 5:14 p.m.
After the recent change of the libexecdir definition, the update-alternatives
for the libexec rmt broke.  Fix this by moving rmt from libexec to /sbin.  Also
split the rmt app from cpio as it's likely not useful to many users.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-extended/cpio/cpio_2.11.bb |    2 +-
 meta/recipes-extended/cpio/cpio_2.8.bb  |    2 +-
 meta/recipes-extended/cpio/cpio_v2.inc  |   11 +++++++++--
 3 files changed, 11 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb
index 9b37dcd..5f88b30 100644
--- a/meta/recipes-extended/cpio/cpio_2.11.bb
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -3,7 +3,7 @@  include cpio_v2.inc
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI += "file://remove-gets.patch \
            "
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
index cabc1cd..b6da207 100644
--- a/meta/recipes-extended/cpio/cpio_2.8.bb
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -3,7 +3,7 @@  require cpio_v2.inc
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
 
-PR = "r2"
+PR = "r3"
 
 SRC_URI += "file://m4extensions.patch \
     file://avoid_heap_overflow.patch \
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc
index 3b3402b..30446b0 100644
--- a/meta/recipes-extended/cpio/cpio_v2.inc
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -14,6 +14,8 @@  inherit autotools gettext
 
 S = "${WORKDIR}/cpio-${PV}"
 
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
+
 do_install () {
     autotools_do_install
     install -d ${D}${base_bindir}/
@@ -21,13 +23,18 @@  do_install () {
     rmdir ${D}${bindir}/
 }
 
+PACKAGES =+ "${PN}-rmt"
+
+FILES_${PN}-rmt = "${base_sbindir}/rmt*"
+
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN} = "cpio rmt"
+ALTERNATIVE_${PN} = "cpio"
+ALTERNATIVE_${PN}-rmt = "rmt"
 
 ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
 
 ALTERNATIVE_PRIORITY[rmt] = "50"
-ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt"
+ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"