aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-27 15:03:06 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-27 15:03:06 +0100
commitc7f523453b94bf6045e431c717f2d7f306df13d6 (patch)
treed2164b760bbb047f432db9cd917955820769741c
parent7fe98e809eaa0d96f8e33c5f3a9526f88597fa0a (diff)
downloadpaludis-c7f523453b94bf6045e431c717f2d7f306df13d6.tar.gz
paludis-c7f523453b94bf6045e431c717f2d7f306df13d6.tar.xz
make cave show behave on 0-based eapis
-rw-r--r--src/clients/cave/cmd_show.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index 986883b..f779e1a 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -450,6 +450,18 @@ namespace
continue;
if ((*c)->begin() == (*c)->end())
continue;
+
+ bool any_explicit(false);
+ for (Choice::ConstIterator v((*c)->begin()), v_end((*c)->end()) ;
+ v != v_end ; ++v)
+ if ((*v)->explicitly_listed())
+ {
+ any_explicit = true;
+ break;
+ }
+
+ if (! any_explicit)
+ continue;
}
if ((! empty_prefix) || (! (*c)->show_with_no_prefix()))
@@ -461,6 +473,10 @@ namespace
for (Choice::ConstIterator v((*c)->begin()), v_end((*c)->end()) ;
v != v_end ; ++v)
{
+ if (! cmdline.a_internal_keys.specified())
+ if (! (*v)->explicitly_listed())
+ continue;
+
if ((*v)->enabled())
{
if ((*v)->locked())
@@ -493,6 +509,18 @@ namespace
continue;
if ((*c)->begin() == (*c)->end())
continue;
+
+ bool any_explicit(false);
+ for (Choice::ConstIterator v((*c)->begin()), v_end((*c)->end()) ;
+ v != v_end ; ++v)
+ if ((*v)->explicitly_listed())
+ {
+ any_explicit = true;
+ break;
+ }
+
+ if (! any_explicit)
+ continue;
}
cout << format_general_rhvib(f::show_metadata_key_value(), (*c)->raw_name(), (*c)->human_name(),
@@ -501,6 +529,10 @@ namespace
for (Choice::ConstIterator v((*c)->begin()), v_end((*c)->end()) ;
v != v_end ; ++v)
{
+ if (! cmdline.a_internal_keys.specified())
+ if (! (*v)->explicitly_listed())
+ continue;
+
if ((*v)->enabled())
{
if ((*v)->locked())