summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/udev/udev-119-r1.ebuild')
-rw-r--r--sys-fs/udev/udev-119-r1.ebuild22
1 files changed, 17 insertions, 5 deletions
diff --git a/sys-fs/udev/udev-119-r1.ebuild b/sys-fs/udev/udev-119-r1.ebuild
index 463891d5894c..87f63d77914d 100644
--- a/sys-fs/udev/udev-119-r1.ebuild
+++ b/sys-fs/udev/udev-119-r1.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/sys-fs/udev/udev-119-r1.ebuild,v 1.1 2008/04/03 13:48:22 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-119-r1.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $
inherit eutils flag-o-matic multilib toolchain-funcs versionator
@@ -252,6 +252,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" &&
+ if [[ $previous_equal_to_103_r3 = 0 ]] &&
[[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
then
ewarn "Deleting stray 40-scsi-hotplug.rules"
@@ -284,13 +296,13 @@ pkg_postinst() {
fi
# Removing some old file
- if has_version "<sys-fs/udev-104-r5"
+ 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" &&
+ if [[ $previous_less_than_106_r5 = 0 ]] &&
[[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
then
rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
@@ -309,7 +321,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