diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-07-10 08:04:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-07-10 08:04:43 +0000 |
commit | c9054709dac49dc75054e600841d4803f661bbcb (patch) | |
tree | c78ae4b8ca614781f94ced6727f31f206c07244b | |
parent | ee32b5d6ba18a3b963fd65228444cf07005e09cc (diff) | |
download | portage-c9054709dac49dc75054e600841d4803f661bbcb.tar.gz portage-c9054709dac49dc75054e600841d4803f661bbcb.tar.bz2 portage-c9054709dac49dc75054e600841d4803f661bbcb.zip |
Use a list comprehension to simplify the code for bug #55871.
svn path=/main/trunk/; revision=3831
-rwxr-xr-x | bin/emerge | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge index 26b173cae..78872bd22 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1024,10 +1024,9 @@ 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)-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] + myeb_pkg_matches = [pkg for pkg in myeb_pkg_matches \ + if pkg not in myeb_matches and \ + portdb.cpv_exists(pkg)] myeb_pkg = portage.best(myeb_pkg_matches) if not myeb_pkg: |