aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-17 09:10:09 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-17 09:10:09 +0100
commit10e279c4b5173c0bd638dd210cc08825457ff635 (patch)
treeec5bee5d4b34cac808c6af7c39f71973cecdc997
parent3c710b27ac926f7cc4e05b3147622dd17284149b (diff)
downloadpaludis-10e279c4b5173c0bd638dd210cc08825457ff635.tar.gz
paludis-10e279c4b5173c0bd638dd210cc08825457ff635.tar.xz
fmt fix-cache
-rw-r--r--src/clients/cave/Makefile.am2
-rw-r--r--src/clients/cave/cmd_fix_cache-fmt.hh5
-rw-r--r--src/clients/cave/cmd_fix_cache.cc5
-rw-r--r--src/clients/cave/cmd_print_formats.cc2
-rw-r--r--src/clients/cave/formats.cc6
-rw-r--r--src/clients/cave/formats.hh2
6 files changed, 12 insertions, 10 deletions
diff --git a/src/clients/cave/Makefile.am b/src/clients/cave/Makefile.am
index 686afa3..e846e03 100644
--- a/src/clients/cave/Makefile.am
+++ b/src/clients/cave/Makefile.am
@@ -117,7 +117,7 @@ libcave_a_SOURCES = \
cmd_executables.cc cmd_executables.hh cmd_executables-fmt.hh \
cmd_execute_resolution.cc cmd_execute_resolution.hh \
cmd_find_candidates.cc cmd_find_candidates.hh \
- cmd_fix_cache.cc cmd_fix_cache.hh \
+ cmd_fix_cache.cc cmd_fix_cache.hh cmd_fix_cache-fmt.hh \
cmd_fix_linkage.cc cmd_fix_linkage.hh \
cmd_help.cc cmd_help.hh \
cmd_import.cc cmd_import.hh \
diff --git a/src/clients/cave/cmd_fix_cache-fmt.hh b/src/clients/cave/cmd_fix_cache-fmt.hh
new file mode 100644
index 0000000..51e241f
--- /dev/null
+++ b/src/clients/cave/cmd_fix_cache-fmt.hh
@@ -0,0 +1,5 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+const auto fs_fixing = make_format_string_fetcher("fix-cache/fixing", 1)
+ << "Fixing cache for " << c::bold_blue_or_pink() << param<'s'>() << c::normal() << "...\\n";
+
diff --git a/src/clients/cave/cmd_fix_cache.cc b/src/clients/cave/cmd_fix_cache.cc
index 062de5e..f43843b 100644
--- a/src/clients/cave/cmd_fix_cache.cc
+++ b/src/clients/cave/cmd_fix_cache.cc
@@ -20,6 +20,7 @@
#include "cmd_fix_cache.hh"
#include "formats.hh"
#include "format_general.hh"
+#include "format_user_config.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
@@ -42,6 +43,8 @@ using std::endl;
namespace
{
+#include "cmd_fix_cache-fmt.hh"
+
struct FixCacheCommandLine :
CaveCommandCommandLine
{
@@ -140,7 +143,7 @@ FixCacheCommand::run(
for (std::set<RepositoryName>::const_iterator r(repository_names.begin()), r_end(repository_names.end()) ;
r != r_end; ++r)
{
- cout << format_general_s(f::fix_cache_fixing(), stringify(*r));
+ cout << fuc(fs_fixing(), fv<'s'>(stringify(*r)));
const std::shared_ptr<Repository> repo(env->package_database()->fetch_repository(*r));
repo->regenerate_cache();
}
diff --git a/src/clients/cave/cmd_print_formats.cc b/src/clients/cave/cmd_print_formats.cc
index 39c8501..75c2cf7 100644
--- a/src/clients/cave/cmd_print_formats.cc
+++ b/src/clients/cave/cmd_print_formats.cc
@@ -106,6 +106,8 @@ namespace
}{
#include "cmd_executables-fmt.hh"
}{
+#include "cmd_fix_cache-fmt.hh"
+ }{
#include "cmd_owner-fmt.hh"
}{
#include "cmd_report-fmt.hh"
diff --git a/src/clients/cave/formats.cc b/src/clients/cave/formats.cc
index fa23fbb..b1cc979 100644
--- a/src/clients/cave/formats.cc
+++ b/src/clients/cave/formats.cc
@@ -323,12 +323,6 @@ paludis::cave::f::info_heading()
}
const std::string
-paludis::cave::f::fix_cache_fixing()
-{
- return "Fixing cache for " + c::blue_or_pink() + "%s" + c::normal() + "...\\n";
-}
-
-const std::string
paludis::cave::f::colour_formatter_keyword_name_plain()
{
return "%s";
diff --git a/src/clients/cave/formats.hh b/src/clients/cave/formats.hh
index fbead04..ea6db33 100644
--- a/src/clients/cave/formats.hh
+++ b/src/clients/cave/formats.hh
@@ -98,8 +98,6 @@ namespace paludis
const std::string info_id_heading();
const std::string info_heading();
- const std::string fix_cache_fixing();
-
const std::string colour_formatter_keyword_name_plain();
const std::string colour_formatter_keyword_name_accepted();
const std::string colour_formatter_keyword_name_unaccepted();