summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-03-23 15:57:24 +0000
committerRoy Marples <uberlord@gentoo.org>2007-03-23 15:57:24 +0000
commit875bb7a98611eacb157bd72996d78ed871d9b663 (patch)
treed4b8ccfe1d8b0e38ea220ed1f9d849cfcffd249c
parentppc stable, bug #165555 (diff)
downloadgentoo-2-875bb7a98611eacb157bd72996d78ed871d9b663.tar.gz
gentoo-2-875bb7a98611eacb157bd72996d78ed871d9b663.tar.bz2
gentoo-2-875bb7a98611eacb157bd72996d78ed871d9b663.zip
Only preserve the /bin/sh symlink if it's bash.
(Portage version: 2.1.2.2)
-rw-r--r--app-shells/bash/ChangeLog5
-rw-r--r--app-shells/bash/bash-3.2_p15.ebuild10
2 files changed, 11 insertions, 4 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog
index db1495a6f0fe..9962c84a79a7 100644
--- a/app-shells/bash/ChangeLog
+++ b/app-shells/bash/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for app-shells/bash
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.137 2007/03/23 06:22:13 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.138 2007/03/23 15:57:24 uberlord Exp $
+
+ 23 Mar 2007; Roy Marples <uberlord@gentoo.org> bash-3.2_p15.ebuild:
+ Only preserve the /bin/sh symlink if it's bash.
*bash-3.2_p10-r1 (23 Mar 2007)
diff --git a/app-shells/bash/bash-3.2_p15.ebuild b/app-shells/bash/bash-3.2_p15.ebuild
index 1f3179e2bd45..9e4aff66239b 100644
--- a/app-shells/bash/bash-3.2_p15.ebuild
+++ b/app-shells/bash/bash-3.2_p15.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.2_p15.ebuild,v 1.1 2007/03/22 06:41:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.2_p15.ebuild,v 1.2 2007/03/23 15:57:24 uberlord Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -141,9 +141,13 @@ pkg_preinst() {
rm -f "${D}"/etc/bash/bash_logout
fi
+ # If /bin/sh does not exist or is bash, then provide it
+ # Otherwise leave it alone
if [[ ! -e ${ROOT}/bin/sh ]] ; then
ln -s bash "${ROOT}"/bin/sh
- else
- cp -a "${ROOT}"/bin/sh "${D}"/bin/
+ elif [[ -L ${ROOT}/bin/sh ]] ; then
+ case "$(readlink "${ROOT}"/bin/sh)" in
+ bash|/bin/bash) cp -pPR "${ROOT}"/bin/sh "${D}"/bin/ ;;
+ esac
fi
}