aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core
diff options
context:
space:
mode:
authorLi Zhou <li.zhou@windriver.com>2018-08-01 13:23:34 +0800
committerKhem Raj <raj.khem@gmail.com>2018-08-02 11:23:03 -0700
commit5f6ed51870df0251b9d5c8dd3724cbc6137d8d96 (patch)
treeb5cf24d1ba88fe30f3b757eda651d596a142ee9c /meta-oe/recipes-core
parent2585bc07eecb6617fd3abe6c9b8cf913074a2847 (diff)
downloadmeta-openembedded-5f6ed51870df0251b9d5c8dd3724cbc6137d8d96.tar.gz
meta-openembedded-5f6ed51870df0251b9d5c8dd3724cbc6137d8d96.tar.bz2
meta-openembedded-5f6ed51870df0251b9d5c8dd3724cbc6137d8d96.zip
usleep: use update-alternatives
To solve below error: update-alternatives: Error: not linking [...]/rootfs/bin/usleep to /bin/busybox.nosuid since [...]/rootfs/bin/usleep exists and is not a link add using update-alternatives in usleep. Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core')
-rw-r--r--meta-oe/recipes-core/usleep/usleep_1.0.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/usleep/usleep_1.0.bb b/meta-oe/recipes-core/usleep/usleep_1.0.bb
index 9e9c7ed8c..370dd4ae6 100644
--- a/meta-oe/recipes-core/usleep/usleep_1.0.bb
+++ b/meta-oe/recipes-core/usleep/usleep_1.0.bb
@@ -22,3 +22,12 @@ do_install() {
install -m 0755 ${WORKDIR}/usleep ${D}${base_bindir}
install -m 0644 ${WORKDIR}/usleep.1 ${D}${mandir}/man1
}
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "usleep"
+ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_LINK_NAME[usleep] = "${base_bindir}/usleep"
+
+ALTERNATIVE_${PN}-doc = "usleep.1"
+ALTERNATIVE_LINK_NAME[usleep.1] = "${mandir}/man1/usleep.1"