Start at the end of the list so that the index works properly after items are deleted.
authorZac Medico <zmedico@gentoo.org>
Mon, 10 Jul 2006 01:08:25 +0000 (01:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 10 Jul 2006 01:08:25 +0000 (01:08 -0000)
svn path=/main/trunk/; revision=3828

bin/emerge

index ec86a363530375c2746c88beead07e4e9899463b..5d07b2f3d9aa5f9deb979fe1b69175b8c93d77a8 100755 (executable)
@@ -1018,7 +1018,7 @@ class depgraph:
                                        myeb_pkg_matches = bindb.match(x)
                                        if "--usepkgonly" not in self.myopts:
                                                # Remove any binary package entries that are masked in the portage tree (#55871)
-                                               for idx in xrange(len(myeb_pkg_matches)):
+                                               for idx in xrange(len(myeb_pkg_matches)-1, -1, -1):
                                                        if myeb_pkg_matches[idx] not in myeb_matches and \
                                                                portdb.cpv_exists(myeb_pkg_matches[idx]):
                                                                del myeb_pkg_matches[idx]