aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
Diffstat (limited to 'paludis')
-rw-r--r--paludis/repositories/e/ebuild.cc6
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache.cc12
2 files changed, 15 insertions, 3 deletions
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 4e5ea3889..3bcda1e28 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -614,7 +614,11 @@ EbuildMetadataCommand::load(const std::shared_ptr<const EbuildID> & id)
id->load_license(m.license(), get(keys, m.license()->name()));
if (! m.provide()->name().empty())
- id->load_provide(m.provide(), get(keys, m.provide()->name()));
+ {
+ std::string value(get(keys, m.provide()->name()));
+ if (! value.empty())
+ id->load_provide(m.provide(), get(keys, m.provide()->name()));
+ }
if (! m.iuse()->name().empty())
id->load_iuse(m.iuse(), get(keys, m.iuse()->name()));
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()]);