summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-15 05:54:32 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-15 05:54:32 +0000
commit90532cea77ecc251c9f8a2e12a75f52ceb4f4e7a (patch)
tree44ce0170fa568c367550fef9a9466279ff4196e3 /sys-fs/udev/udev-115-r1.ebuild
parentAdd smp option thanks to Timon Van Overveldt in bug #194423 (diff)
downloadgentoo-2-90532cea77ecc251c9f8a2e12a75f52ceb4f4e7a.tar.gz
gentoo-2-90532cea77ecc251c9f8a2e12a75f52ceb4f4e7a.tar.bz2
gentoo-2-90532cea77ecc251c9f8a2e12a75f52ceb4f4e7a.zip
Bug #226505 - For compatibility with phase execution order in
>=portage-2.1.5, call has_version inside pkg_preinst instead of pkg_postinst. (Portage version: 2.2_pre10652/cvs/Linux 2.6.25-0518-x86-64 i686)
Diffstat (limited to 'sys-fs/udev/udev-115-r1.ebuild')
-rw-r--r--sys-fs/udev/udev-115-r1.ebuild24
1 files changed, 18 insertions, 6 deletions
diff --git a/sys-fs/udev/udev-115-r1.ebuild b/sys-fs/udev/udev-115-r1.ebuild
index 0fc912feeab4..bf41767235d3 100644
--- a/sys-fs/udev/udev-115-r1.ebuild
+++ b/sys-fs/udev/udev-115-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-115-r1.ebuild,v 1.11 2007/12/11 23:57:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-115-r1.ebuild,v 1.12 2008/06/15 05:54:32 zmedico Exp $
inherit eutils flag-o-matic multilib toolchain-funcs versionator
@@ -253,6 +253,18 @@ pkg_preinst() {
then
coldplug_stale="1"
fi
+
+ has_version "=${CATEGORY}/${PN}-103-r3"
+ previous_equal_to_103_r3=$?
+
+ has_version "<${CATEGORY}/${PN}-104-r5"
+ previous_less_than_104_r5=$?
+
+ has_version "<${CATEGORY}/${PN}-106-r5"
+ previous_less_than_106_r5=$?
+
+ has_version "<${CATEGORY}/${PN}-113"
+ previous_less_than_113=$?
}
pkg_postinst() {
@@ -269,7 +281,7 @@ pkg_postinst() {
fi
# delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules
- if has_version "=sys-fs/udev-103-r3"; then
+ if [[ $previous_equal_to_103_r3 = 0 ]] ; then
if [[ -e "${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules" ]]
then
ewarn "Deleting stray 40-scsi-hotplug.rules"
@@ -284,12 +296,12 @@ pkg_postinst() {
fi
# Removing some old file
- if has_version "<sys-fs/udev-104-r5"; then
+ if [[ $previous_less_than_104_r5 = 0 ]] ; then
rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
fi
- if has_version "<sys-fs/udev-106-r5"; then
+ if [[ $previous_less_than_106_r5 = 0 ]] ; then
if [[ -e "${ROOT}"/etc/udev/rules.d/95-net.rules ]]; then
rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
fi
@@ -306,7 +318,7 @@ pkg_postinst() {
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper
# remove it if user don't has sys-fs/device-mapper installed
- if has_version "<sys-fs/udev-113" &&
+ if [[ $previous_less_than_113 = 0 ]] &&
[[ -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules ]] &&
! has_version sys-fs/device-mapper
then