Patchwork [CONSOLIDATED,PULL,05/28] bash: fix warning about bashbug reference /usr/bin when installed in /bin

login
register
mail settings
Submitter Saul Wold
Date July 25, 2012, 7:18 a.m.
Message ID <c7606f88a07938d9e9311a859cb4b962bb03a8e1.1343200454.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/32975/
State New
Headers show

Comments

Saul Wold - July 25, 2012, 7:18 a.m.
From: Otavio Salvador <otavio@ossystems.com.br>

Change the installation process so we have bashbug in ${bindir} and
bash at ${base_bindir}.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-extended/bash/bash.inc    |   11 ++++++++---
 meta/recipes-extended/bash/bash_4.2.bb |    2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 6d7e930..a7f5f8f 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -9,9 +9,6 @@  DEPENDS = "ncurses bison-native"
 
 inherit autotools gettext update-alternatives
 
-bindir = "/bin"
-sbindir = "/sbin"
-
 EXTRA_OECONF = "--enable-job-control"
 export CC_FOR_BUILD = "${BUILD_CC}"
 
@@ -28,6 +25,14 @@  do_configure_prepend () {
 	fi
 }
 
+do_install_append () {
+	# Move /usr/bin/bash to /bin/bash, if need
+	if [ "${base_bindir}" != "${bindir}" ]; then
+		mkdir -p ${D}${base_bindir}
+		mv ${D}${bindir}/bash ${D}${base_bindir}
+	fi
+}
+
 pkg_postinst_${PN} () {
 	touch $D${sysconfdir}/shells
 	grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
diff --git a/meta/recipes-extended/bash/bash_4.2.bb b/meta/recipes-extended/bash/bash_4.2.bb
index a28279e..50f2ff6 100644
--- a/meta/recipes-extended/bash/bash_4.2.bb
+++ b/meta/recipes-extended/bash/bash_4.2.bb
@@ -1,6 +1,6 @@ 
 require bash.inc
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
            ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-001;apply=yes;striplevel=0;name=patch001 \