aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild_flat_metadata_cache.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-21 08:36:37 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-21 09:04:14 +0100
commit3be6f0f7ffd23dc6f3ace83ac608d5c32786ef82 (patch)
tree98caab64941dbe24bd31206e49b1fca456e11ed8 /paludis/repositories/e/ebuild_flat_metadata_cache.cc
parent759b51c3476a3d01c14e20e708a509b784dcaaf1 (diff)
downloadpaludis-3be6f0f7ffd23dc6f3ace83ac608d5c32786ef82.tar.gz
paludis-3be6f0f7ffd23dc6f3ace83ac608d5c32786ef82.tar.xz
Don't bother loading empty provide
Diffstat (limited to 'paludis/repositories/e/ebuild_flat_metadata_cache.cc')
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache.cc b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
index 391d1be52..0db3b6091 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
@@ -243,7 +243,11 @@ namespace
id->load_post_depend(m.pdepend()->name(), m.pdepend()->description(), lines.at(m.pdepend()->flat_list_index()), false);
if (-1 != m.provide()->flat_list_index() && ! m.provide()->name().empty())
- id->load_provide(m.provide(), lines.at(m.provide()->flat_list_index()));
+ {
+ std::string value(lines.at(m.provide()->flat_list_index()));
+ if (! value.empty())
+ id->load_provide(m.provide(), value);
+ }
if (-1 != m.use()->flat_list_index() && ! m.use()->name().empty())
id->load_use(m.use(), lines.at(m.use()->flat_list_index()));
@@ -586,7 +590,11 @@ EbuildFlatMetadataCache::load(const std::shared_ptr<const EbuildID> & id, const
id->load_post_depend(m.pdepend()->name(), m.pdepend()->description(), keys[m.pdepend()->name()], false);
if (! m.provide()->name().empty())
- id->load_provide(m.provide(), keys[m.provide()->name()]);
+ {
+ std::string value(keys[m.provide()->name()]);
+ if (! value.empty())
+ id->load_provide(m.provide(), value);
+ }
if (! m.use()->name().empty())
id->load_use(m.use(), keys[m.use()->name()]);