summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Ørsted Andresen <zlin@gentoo.org>2008-06-12 17:38:35 +0000
committerBo Ørsted Andresen <zlin@gentoo.org>2008-06-12 17:38:35 +0000
commitcc843b48855d37b0f741c941c1cb0ef184c2e0a7 (patch)
tree5d4d20224f4344bbb04c1e90340ead085a02fa13 /app-shells/bash
parentAdd Sinhala locale (diff)
downloadgentoo-2-cc843b48855d37b0f741c941c1cb0ef184c2e0a7.tar.gz
gentoo-2-cc843b48855d37b0f741c941c1cb0ef184c2e0a7.tar.bz2
gentoo-2-cc843b48855d37b0f741c941c1cb0ef184c2e0a7.zip
Ensure that portage < 2.1.5 upgrade bash with FEATURES=-unmerge-orphans. Rewrite /bin/sh to prevent it from being uninstalled by changing its mtime.
(Portage version: 2.1.4.4)
Diffstat (limited to 'app-shells/bash')
-rw-r--r--app-shells/bash/ChangeLog6
-rw-r--r--app-shells/bash/bash-3.2_p39.ebuild18
2 files changed, 21 insertions, 3 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog
index f39ad92363b6..b23412db7004 100644
--- a/app-shells/bash/ChangeLog
+++ b/app-shells/bash/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-shells/bash
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.178 2008/05/31 06:57:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.179 2008/06/12 17:38:35 zlin Exp $
+
+ 12 Jun 2008; Bo Ørsted Andresen <zlin@gentoo.org> bash-3.2_p39.ebuild:
+ Ensure that portage < 2.1.5 upgrade bash with FEATURES=-unmerge-orphans.
+ Rewrite /bin/sh to prevent it from being uninstalled by changing its mtime.
31 May 2008; Mike Frysinger <vapier@gentoo.org> bash-3.2_p39.ebuild:
Make sure /bin/sh always exists #222721 by Davide Pesavento.
diff --git a/app-shells/bash/bash-3.2_p39.ebuild b/app-shells/bash/bash-3.2_p39.ebuild
index 98756724cf26..e85150035608 100644
--- a/app-shells/bash/bash-3.2_p39.ebuild
+++ b/app-shells/bash/bash-3.2_p39.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.2_p39.ebuild,v 1.4 2008/05/31 06:57:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.2_p39.ebuild,v 1.5 2008/06/12 17:38:35 zlin Exp $
inherit eutils flag-o-matic toolchain-funcs multilib
@@ -47,6 +47,14 @@ pkg_setup() {
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
+
+ if hasq unmerge-orphans ${FEATURES} && \
+ has_version "<sys-apps/portage-2.1.5" && \
+ has_version "<app-shells/bash-3.2_p39"; then
+ eerror "Please upgrade bash with FEATURES=-unmerge-orphans to prevent /bin/sh"
+ eerror "from being removed. See bug #222721 for further details."
+ die "Upgrade bash with FEATURES=-unmerge-orphans"
+ fi
}
src_unpack() {
@@ -186,5 +194,11 @@ pkg_preinst() {
pkg_postinst() {
# If /bin/sh does not exist, provide it
- [[ ! -e ${ROOT}/bin/sh ]] && ln -sf bash "${ROOT}"/bin/sh
+ if [[ ! -e ${ROOT}/bin/sh ]]; then
+ ln -sf bash "${ROOT}"/bin/sh
+ elif [[ -L ${ROOT}/bin/sh ]]; then
+ # rewrite the symlink to ensure that its mtime changes
+ local target=$(readlink "${ROOT}"/bin/sh)
+ ln -sf "${target}" "${ROOT}"/bin/sh
+ fi
}