Added a line to clear invalid cache entries.
authorNicholas Jones <carpaski@gentoo.org>
Wed, 30 Oct 2002 05:27:02 +0000 (05:27 +0000)
committerNicholas Jones <carpaski@gentoo.org>
Wed, 30 Oct 2002 05:27:02 +0000 (05:27 +0000)
sys-apps/portage/portage-2.0.43.ebuild

index 1dbff639301a4d77fd44eba43303334fe7ad41bb..8eab1daf2c3c87e656e48d71a765cc7f63d4086b 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2002 Gentoo Technologies, Inc. 
 # Distributed under the terms of the GNU General Public License v2 
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.0.43.ebuild,v 1.1 2002/10/27 09:00:44 carpaski Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.0.43.ebuild,v 1.2 2002/10/30 05:27:02 carpaski Exp $
 
 IUSE="build"
 
@@ -162,6 +162,11 @@ pkg_postinst() {
        # we gotta re-compile these modules and deal with systems with clock skew (stale compiled files)
        python -c "import py_compile; py_compile.compile('${ROOT}usr/lib/python2.2/site-packages/portage.py')" || die
        python -O -c "import py_compile; py_compile.compile('${ROOT}usr/lib/python2.2/site-packages/portage.py')" || die
+
+       # Changes in the size of auxdbkeys can cause aux_get() problems.
+       echo -n ">>> Clearing invalid entries in dependancy cache..."
+       rm -f $(find ${ROOT}var/cache/edb/dep -type f -exec wc -l {} \; | egrep -v "^ *"$(python -c 'import portage; print str(len(portage.auxdbkeys))') | sed 's:^ \+[0-9]\+ \+\([^ ]\+\)$:\1:')
+       echo " ...done!"
        
        echo
        echo