Make binarytree.prevent_collision() update the Packages index since it changes the...
authorZac Medico <zmedico@gentoo.org>
Fri, 1 Jun 2007 20:59:56 +0000 (20:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 1 Jun 2007 20:59:56 +0000 (20:59 -0000)
svn path=/main/trunk/; revision=6720

pym/portage/dbapi/bintree.py

index 061a8d8d8eff9f9f7b3d0ee9f355db0cda60d431..15827ede5e2b83f768fc5aa800b3096c8b9f3fb9 100644 (file)
@@ -266,10 +266,14 @@ class binarytree(object):
                        other_cat = portage.xpak.tbz2(dest_path).getfile("CATEGORY")
                        if other_cat:
                                other_cat = other_cat.strip()
-                               self._move_from_all(other_cat + "/" + mypkg)
+                               other_cpv = other_cat + "/" + mypkg
+                               self._move_from_all(other_cpv)
+                               self.inject(other_cpv)
                """The file may or may not exist. Move it if necessary and update
                internal state for future calls to getname()."""
                self._move_to_all(cpv)
+               if os.path.exists(full_path):
+                       self.inject(cpv)
 
        def _move_to_all(self, cpv):
                """If the file exists, move it.  Whether or not it exists, update state