[oe] [PATCH 05/12] Add alternatives to patch

Martyn Welch martyn.welch at ge.com
Mon Mar 22 09:35:06 UTC 2010


This adds an alternatives link for /bin/sh to the bash package. When
installed this will make bash overide the busybox provided shell for
"/bin/sh". This may or may not be desirable, but including it does allow an
image to be provided without busybox.
---

 recipes/bash/bash.inc    |    6 +++++-
 recipes/bash/bash_3.0.bb |    2 +-
 recipes/bash/bash_3.2.bb |    2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/recipes/bash/bash.inc b/recipes/bash/bash.inc
index 4eba689..a4658cf 100644
--- a/recipes/bash/bash.inc
+++ b/recipes/bash/bash.inc
@@ -4,7 +4,7 @@ DEPENDS = "ncurses"
 SECTION = "base/shell"
 LICENSE = "GPL"
 
-inherit autotools gettext
+inherit autotools gettext update-alternatives
 
 PARALLEL_MAKE = ""
 
@@ -33,3 +33,7 @@ pkg_postinst () {
 	grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
 	grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
 }
+ALTERNATIVE_NAME = "sh"
+ALTERNATIVE_LINK = "${base_bindir}/sh"
+ALTERNATIVE_PATH = "${base_bindir}/bash"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/recipes/bash/bash_3.0.bb b/recipes/bash/bash_3.0.bb
index 8165d07..ccf0079 100644
--- a/recipes/bash/bash_3.0.bb
+++ b/recipes/bash/bash_3.0.bb
@@ -1,5 +1,5 @@
 require bash.inc
-PR = "r12"
+PR = "r13"
 
 SRC_URI += "\
   file://bash-3.0-fixes.patch;patch=1 \
diff --git a/recipes/bash/bash_3.2.bb b/recipes/bash/bash_3.2.bb
index e175467..867b42f 100644
--- a/recipes/bash/bash_3.2.bb
+++ b/recipes/bash/bash_3.2.bb
@@ -1,6 +1,6 @@
 require bash.inc
 
-PR = "r8"
+PR = "r9"
 
 SRC_URI += "\
            file://builtins.patch;patch=1 \


--
Martyn Welch (Principal Software Engineer)   |   Registered in England and
GE Intelligent Platforms                     |   Wales (3828642) at 100
T +44(0)127322748                            |   Barbirolli Square, Manchester,
E martyn.welch at ge.com                        |   M2 3AB  VAT:GB 927559189




More information about the Openembedded-devel mailing list