aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/exheres_profile.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 12:46:08 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 12:46:08 +0000
commit2fbd0b1d5be90017142303cbdef842d807184812 (patch)
tree7a18242e721423e514d7ee19096ce2c24ca2bc42 /paludis/repositories/e/exheres_profile.cc
parent8b17c798dc5a2a8e253ac8827450117a532a47eb (diff)
downloadpaludis-2fbd0b1d5be90017142303cbdef842d807184812.tar.gz
paludis-2fbd0b1d5be90017142303cbdef842d807184812.tar.xz
Allow IDs to have multiple masks
Diffstat (limited to 'paludis/repositories/e/exheres_profile.cc')
-rw-r--r--paludis/repositories/e/exheres_profile.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc
index 3d85c5d..dfcd24a 100644
--- a/paludis/repositories/e/exheres_profile.cc
+++ b/paludis/repositories/e/exheres_profile.cc
@@ -359,21 +359,21 @@ ExheresProfile::environment_variable(const std::string & s) const
return i->second;
}
-const std::shared_ptr<const MaskInfo>
-ExheresProfile::profile_masked(const std::shared_ptr<const PackageID> & id) const
+const std::shared_ptr<const MasksInfo>
+ExheresProfile::profile_masks(const std::shared_ptr<const PackageID> & id) const
{
+ auto result(std::make_shared<MasksInfo>());
+
PackageMaskMap::const_iterator rr(_imp->package_mask.find(id->name()));
- if (_imp->package_mask.end() == rr)
- return std::shared_ptr<const MaskInfo>();
- else
+ if (_imp->package_mask.end() != rr)
{
for (std::list<std::pair<std::shared_ptr<const PackageDepSpec>, std::shared_ptr<const MaskInfo> > >::const_iterator k(rr->second.begin()),
k_end(rr->second.end()) ; k != k_end ; ++k)
if (match_package(*_imp->env, *k->first, id, make_null_shared_ptr(), { }))
- return k->second;
+ result->push_back(*k->second);
}
- return std::shared_ptr<const MaskInfo>();
+ return result;
}
const std::shared_ptr<const SetSpecTree>