diff options
-rw-r--r-- | sys-apps/slocate/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/slocate/slocate-3.1-r1.ebuild | 17 |
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!" } |