aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild_id.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild_id.cc')
-rw-r--r--paludis/repositories/e/ebuild_id.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 81db23f56..b48a9b699 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -1015,9 +1015,12 @@ EbuildID::load_license(const std::shared_ptr<const EAPIMetadataVariable> & m, co
void
EbuildID::load_restrict(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
- Lock l(_imp->mutex);
- _imp->restrictions = std::make_shared<EPlainTextSpecKey>(_imp->environment, m, eapi(), v, mkt_internal, is_installed());
- add_metadata_key(_imp->restrictions);
+ if (! v.empty())
+ {
+ Lock l(_imp->mutex);
+ _imp->restrictions = std::make_shared<EPlainTextSpecKey>(_imp->environment, m, eapi(), v, mkt_internal, is_installed());
+ add_metadata_key(_imp->restrictions);
+ }
}
void