aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-04 12:09:44 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-04 12:09:44 +0000
commitc3a738f6611ec36219a3cb02e3d6fd9397e0b62a (patch)
treeae7f2b2f6dd896b07bfd02b2dc25b9242072e930
parent373ad6796f4d74e3ae8a580957097f4164c4ddeb (diff)
downloadpaludis-c3a738f6611ec36219a3cb02e3d6fd9397e0b62a.tar.gz
paludis-c3a738f6611ec36219a3cb02e3d6fd9397e0b62a.tar.xz
Fix GLSA fix candidate selection
-rw-r--r--paludis/repositories/gentoo/portage_repository_sets.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/paludis/repositories/gentoo/portage_repository_sets.cc b/paludis/repositories/gentoo/portage_repository_sets.cc
index 2b78461..b03f32d 100644
--- a/paludis/repositories/gentoo/portage_repository_sets.cc
+++ b/paludis/repositories/gentoo/portage_repository_sets.cc
@@ -327,21 +327,22 @@ PortageRepositorySets::security_set(bool insecurity) const
bool ok(false);
SlotName wanted_slot(_imp->environment->package_database()->fetch_repository(
c->repository)->version_metadata(c->name, c->version)->slot);
-
std::tr1::shared_ptr<const PackageDatabaseEntryCollection> available(
_imp->environment->package_database()->query(
- query::Matches(PackageDepSpec(glsa_pkg->name())) & query::InstalledAtRoot(
- _imp->environment->root()), qo_order_by_version));
+ query::Matches(PackageDepSpec(stringify(glsa_pkg->name()) + ":" + stringify(wanted_slot))) &
+ query::RepositoryHasInstallableInterface() &
+ query::NotMasked(),
+ qo_order_by_version));
+
for (PackageDatabaseEntryCollection::ReverseIterator r(available->rbegin()),
r_end(available->rend()) ; r != r_end ; ++r)
{
- if (_imp->environment->mask_reasons(*r).any())
- continue;
- if (_imp->environment->package_database()->fetch_repository(r->repository)->version_metadata(
- r->name, r->version)->slot != wanted_slot)
- continue;
if (is_vulnerable(*glsa_pkg, *r))
+ {
+ Log::get_instance()->message(ll_debug, lc_context, "Skipping '" + stringify(*r)
+ + "' due to is_vulnerable match");
continue;
+ }
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
"=" + stringify(r->name) + "-" + stringify(r->version) +