aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/exheres_profile.cc
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-01-13 21:08:17 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-01-13 21:14:45 -0800
commitfff8a3b796153a2f5f5742cbfcfe55a31bb9ba60 (patch)
tree65bdff5f1c999639a196e4a2663fa0f2d7f58330 /paludis/repositories/e/exheres_profile.cc
parent1684b446715907515359cd310c1e7bd93bad5a2e (diff)
downloadpaludis-fff8a3b796153a2f5f5742cbfcfe55a31bb9ba60.tar.gz
paludis-fff8a3b796153a2f5f5742cbfcfe55a31bb9ba60.tar.xz
support hiding suboptions
Introduce the concept of `SUBOPTIONS_NO_DESCRIBE` to the exheres profile. This allows suboptions to be silenced by default from the description list. This is useful in rare scenarios, such as `linguas`, where the suboption is common, has a large set of values. In such a case, the output of the descriptions would obscure the actual resolution and useful options. This new profile variable permits the profile to indicate to the "frontend" that the description should be squelched. Currently, this is consumed only by the cave frontend.
Diffstat (limited to 'paludis/repositories/e/exheres_profile.cc')
-rw-r--r--paludis/repositories/e/exheres_profile.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc
index 4abf767..51ae4c0 100644
--- a/paludis/repositories/e/exheres_profile.cc
+++ b/paludis/repositories/e/exheres_profile.cc
@@ -83,6 +83,7 @@ namespace paludis
const std::shared_ptr<Set<std::string> > use_expand;
const std::shared_ptr<Set<std::string> > use_expand_hidden;
+ const std::shared_ptr<Set<std::string>> use_expand_no_describe;
const std::shared_ptr<Set<std::string> > use_expand_unprefixed;
const std::shared_ptr<Set<std::string> > use_expand_implicit;
const std::shared_ptr<Set<std::string> > iuse_implicit;
@@ -105,6 +106,7 @@ namespace paludis
)),
use_expand(std::make_shared<Set<std::string>>()),
use_expand_hidden(std::make_shared<Set<std::string>>()),
+ use_expand_no_describe(std::make_shared<Set<std::string>>()),
use_expand_unprefixed(std::make_shared<Set<std::string>>()),
use_expand_implicit(std::make_shared<Set<std::string>>()),
iuse_implicit(std::make_shared<Set<std::string>>()),
@@ -148,6 +150,12 @@ ExheresProfile::ExheresProfile(
if (_imp->options_conf.want_choice_enabled_locked(nullptr,
ChoicePrefixName("hidden_suboptions"), *f).first.is_true())
_imp->use_expand_hidden->insert(stringify(*f));
+
+ const std::shared_ptr<const Set<UnprefixedChoiceName>> suboptions_no_describe =
+ _imp->options_conf.known_choice_value_names(nullptr,
+ ChoicePrefixName("suboptions_no_describe"));
+ for (const auto & suboption : *suboptions_no_describe)
+ _imp->use_expand_no_describe->insert(stringify(suboption));
}
ExheresProfile::~ExheresProfile()
@@ -278,6 +286,12 @@ ExheresProfile::use_expand_hidden() const
return _imp->use_expand_hidden;
}
+const std::shared_ptr<const Set<std::string>>
+ExheresProfile::use_expand_no_describe() const
+{
+ return _imp->use_expand_no_describe;
+}
+
const std::shared_ptr<const Set<std::string> >
ExheresProfile::use_expand_unprefixed() const
{