summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-02-04 17:39:19 +0000
committerMike Frysinger <vapier@gentoo.org>2008-02-04 17:39:19 +0000
commit581f350d412b7c9445431675ee08239911895059 (patch)
tree1f1ca63983629b5f5e191f235d6111ea084ef5a5 /sys-apps/slocate
parentminor patch update and confirming filter-ldflags works as expected (diff)
downloadgentoo-2-581f350d412b7c9445431675ee08239911895059.tar.gz
gentoo-2-581f350d412b7c9445431675ee08239911895059.tar.bz2
gentoo-2-581f350d412b7c9445431675ee08239911895059.zip
When upgrading from slocate-2.x, delete the slocate db as they are incompatible.
(Portage version: 2.1.4)
Diffstat (limited to 'sys-apps/slocate')
-rw-r--r--sys-apps/slocate/ChangeLog8
-rw-r--r--sys-apps/slocate/slocate-3.1-r1.ebuild17
2 files changed, 16 insertions, 9 deletions
diff --git a/sys-apps/slocate/ChangeLog b/sys-apps/slocate/ChangeLog
index 199c678ff0b7..9ce8d5a78508 100644
--- a/sys-apps/slocate/ChangeLog
+++ b/sys-apps/slocate/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/slocate
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/ChangeLog,v 1.74 2007/12/02 20:03:13 vapier Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/ChangeLog,v 1.75 2008/02/04 17:39:19 vapier Exp $
+
+ 04 Feb 2008; Mike Frysinger <vapier@gentoo.org> slocate-3.1-r1.ebuild:
+ When upgrading from slocate-2.x, delete the slocate db as they are
+ incompatible.
02 Dec 2007; Mike Frysinger <vapier@gentoo.org> slocate-2.7-r8.ebuild,
slocate-3.1-r1.ebuild:
diff --git a/sys-apps/slocate/slocate-3.1-r1.ebuild b/sys-apps/slocate/slocate-3.1-r1.ebuild
index e2c563f0fc3b..7f7f5ff974f2 100644
--- a/sys-apps/slocate/slocate-3.1-r1.ebuild
+++ b/sys-apps/slocate/slocate-3.1-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-apps/slocate/slocate-3.1-r1.ebuild,v 1.3 2007/12/02 20:03:13 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/slocate-3.1-r1.ebuild,v 1.4 2008/02/04 17:39:19 vapier Exp $
inherit flag-o-matic eutils
@@ -67,6 +67,14 @@ src_install() {
fperms 0750 /var/lib/slocate
}
+pkg_preinst() {
+ if has_version '=sys-apps/slocate-2*' ; then
+ rm -f "${ROOT}"/var/lib/slocate/slocate.db
+ ewarn "The slocate database created by slocate-2.x is incompatible"
+ ewarn "with slocate-3.x. Make sure you run updatedb!"
+ fi
+}
+
pkg_postinst() {
if [[ -f ${ROOT}/etc/cron.daily/slocate.cron ]]; then
ewarn "If you merged slocate-2.7.ebuild, please remove"
@@ -74,9 +82,4 @@ pkg_postinst() {
ewarn "from the filename"
echo
fi
- einfo "Note that the /etc/updatedb.conf file is generic"
- einfo "Please customize it to your system requirements"
- echo
- ewarn "The slocate database created by slocate-2.x is incompatible"
- ewarn "with slocate-3.x. Make sure you run updatedb!"
}