aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-18 09:48:02 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-18 09:48:02 +0000
commit16c8efb2e50cb395096580480cbdc672c78317ef (patch)
tree1f1b97995751a55b1430ec78b7320fe64ec5324c
parent7cd595491b4e54895bb7a82e7b0148572f4a392b (diff)
downloadpaludis-16c8efb2e50cb395096580480cbdc672c78317ef.tar.gz
paludis-16c8efb2e50cb395096580480cbdc672c78317ef.tar.xz
Mask arch flags that aren't enabled.
-rw-r--r--paludis/repositories/portage/portage_repository.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/paludis/repositories/portage/portage_repository.cc b/paludis/repositories/portage/portage_repository.cc
index 6761aee..0dcb633 100644
--- a/paludis/repositories/portage/portage_repository.cc
+++ b/paludis/repositories/portage/portage_repository.cc
@@ -659,7 +659,8 @@ bool
PortageRepository::do_query_use_mask(const UseFlagName & u, const PackageDatabaseEntry * e) const
{
_imp->need_profiles();
- return _imp->profile_ptr->use_masked(u, e);
+ return _imp->profile_ptr->use_masked(u, e) ||
+ (arch_flags()->end() != arch_flags()->find(u) && use_enabled != do_query_use(u, e));
}
bool
@@ -675,10 +676,19 @@ PortageRepository::do_arch_flags() const
if (! _imp->arch_flags)
{
Context context("When loading arch list:");
-
- LineConfigFile archs(_imp->params.location / "profiles" / "arch.list");
_imp->arch_flags.assign(new UseFlagNameCollection::Concrete);
- std::copy(archs.begin(), archs.end(), create_inserter<UseFlagName>(_imp->arch_flags->inserter()));
+
+ FSEntry a(_imp->params.location / "profiles" / "arch.list");
+ if (a.exists())
+ {
+ LineConfigFile archs(a);
+ std::copy(archs.begin(), archs.end(), create_inserter<UseFlagName>(_imp->arch_flags->inserter()));
+ }
+ else
+ {
+ Log::get_instance()->message(ll_qa, lc_no_context, "Couldn't open arch.list file in '"
+ + stringify(a) + "', arch flags may incorrectly show up as unmasked");
+ }
}
return _imp->arch_flags;