aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_installed_repository_id.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-13 16:33:45 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-15 16:37:35 +0100
commite2e29a928e6d9f70ad62fc58dff28e83568b3a1c (patch)
tree13da4e12093e63d034af6446140502f497c10ec6 /paludis/repositories/e/e_installed_repository_id.cc
parentfcf18aac53a5d16328220a75508feea90fa267c6 (diff)
downloadpaludis-e2e29a928e6d9f70ad62fc58dff28e83568b3a1c.tar.gz
paludis-e2e29a928e6d9f70ad62fc58dff28e83568b3a1c.tar.xz
Don't bother loading empty properties
Diffstat (limited to 'paludis/repositories/e/e_installed_repository_id.cc')
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index 30afac12c..ca614ea13 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -391,9 +391,13 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->properties()->name().empty())
if ((_imp->dir / vars->properties()->name()).stat().exists())
{
- _imp->keys->properties = std::make_shared<EPlainTextSpecKey>(_imp->environment, vars->properties(),
- eapi(), file_contents(_imp->dir / vars->properties()->name()), mkt_internal, is_installed());
- add_metadata_key(_imp->keys->properties);
+ std::string v(file_contents(_imp->dir / vars->properties()->name()));
+ if (! v.empty())
+ {
+ _imp->keys->properties = std::make_shared<EPlainTextSpecKey>(_imp->environment, vars->properties(),
+ eapi(), v, mkt_internal, is_installed());
+ add_metadata_key(_imp->keys->properties);
+ }
}
if (! vars->src_uri()->name().empty())