--- src/portage/package.cc (revision 78) +++ src/portage/package.cc (working copy) @@ -139,13 +139,14 @@ if(version == NULL) { for(unsigned int i = 0; ireadNeeded(need); - if(field & NAME && (*algorithm)(pkg->name.c_str(), pkg)) { return true; @@ -167,6 +175,9 @@ PackageTest::match(Package *pkg) const { bool is_match = true; + + pkg->readNeeded(need); + if(algorithm.get() != NULL) { is_match = stringMatch(pkg); } @@ -176,8 +187,9 @@ is_match = vardbpkg->isInstalled(pkg); } - if(dup_versions && is_match) + if(dup_versions && is_match) { is_match = pkg->have_duplicate_versions; + } return (invert ? !is_match : is_match); }