aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild_id.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-13 18:02:54 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-15 16:37:35 +0100
commit823833906c161846a9079d2f8104efefcaf263db (patch)
tree0c51471f5d6cafd7bd4d9ebb08dd40963e10bfda /paludis/repositories/e/ebuild_id.cc
parente2e29a928e6d9f70ad62fc58dff28e83568b3a1c (diff)
downloadpaludis-823833906c161846a9079d2f8104efefcaf263db.tar.gz
paludis-823833906c161846a9079d2f8104efefcaf263db.tar.xz
Don't bother loading empty dependencies
Diffstat (limited to 'paludis/repositories/e/ebuild_id.cc')
-rw-r--r--paludis/repositories/e/ebuild_id.cc44
1 files changed, 28 insertions, 16 deletions
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 17da03093..99a1c922c 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -952,40 +952,52 @@ EbuildID::load_long_description(const std::string & r, const std::string & h, co
void
EbuildID::load_dependencies(const std::string & r, const std::string & h, const std::string & v) const
{
- Lock l(_imp->mutex);
- _imp->dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
- EbuildIDData::get_instance()->raw_dependencies_labels, mkt_dependencies);
- add_metadata_key(_imp->dependencies);
+ if (! v.empty())
+ {
+ Lock l(_imp->mutex);
+ _imp->dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ EbuildIDData::get_instance()->raw_dependencies_labels, mkt_dependencies);
+ add_metadata_key(_imp->dependencies);
+ }
}
void
EbuildID::load_build_depend(const std::string & r, const std::string & h, const std::string & v,
bool rewritten) const
{
- Lock l(_imp->mutex);
- _imp->build_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
- EbuildIDData::get_instance()->build_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
- add_metadata_key(_imp->build_dependencies);
+ if (! v.empty())
+ {
+ Lock l(_imp->mutex);
+ _imp->build_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ EbuildIDData::get_instance()->build_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
+ add_metadata_key(_imp->build_dependencies);
+ }
}
void
EbuildID::load_run_depend(const std::string & r, const std::string & h, const std::string & v,
bool rewritten) const
{
- Lock l(_imp->mutex);
- _imp->run_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
- EbuildIDData::get_instance()->run_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
- add_metadata_key(_imp->run_dependencies);
+ if (! v.empty())
+ {
+ Lock l(_imp->mutex);
+ _imp->run_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ EbuildIDData::get_instance()->run_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
+ add_metadata_key(_imp->run_dependencies);
+ }
}
void
EbuildID::load_post_depend(const std::string & r, const std::string & h, const std::string & v,
bool rewritten) const
{
- Lock l(_imp->mutex);
- _imp->post_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
- EbuildIDData::get_instance()->post_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
- add_metadata_key(_imp->post_dependencies);
+ if (! v.empty())
+ {
+ Lock l(_imp->mutex);
+ _imp->post_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ EbuildIDData::get_instance()->post_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
+ add_metadata_key(_imp->post_dependencies);
+ }
}
void