diff options
author | 2010-08-16 19:03:54 +0100 | |
---|---|---|
committer | 2010-08-16 21:15:08 +0100 | |
commit | ae91478716a5e6d2433c2fef04584e79921dfa64 (patch) | |
tree | af60eb90cdbb2254f3cb9fe5ddf0a53bc5d75932 | |
parent | 94bc9cdf00cca7ba65a1e43060078a508b96a838 (diff) | |
download | paludis-ae91478716a5e6d2433c2fef04584e79921dfa64.tar.gz paludis-ae91478716a5e6d2433c2fef04584e79921dfa64.tar.xz |
fmt verify
-rw-r--r-- | src/clients/cave/Makefile.am | 2 | ||||
-rw-r--r-- | src/clients/cave/cmd_verify-fmt.hh | 8 | ||||
-rw-r--r-- | src/clients/cave/cmd_verify.cc | 11 | ||||
-rw-r--r-- | src/clients/cave/formats.cc | 12 | ||||
-rw-r--r-- | src/clients/cave/formats.hh | 3 |
5 files changed, 16 insertions, 20 deletions
diff --git a/src/clients/cave/Makefile.am b/src/clients/cave/Makefile.am index 5c8fa2adf..2117faaf7 100644 --- a/src/clients/cave/Makefile.am +++ b/src/clients/cave/Makefile.am @@ -156,7 +156,7 @@ libcave_a_SOURCES = \ cmd_sync.cc cmd_sync.hh \ cmd_uninstall.cc cmd_uninstall.hh \ cmd_update_world.cc cmd_update_world.hh \ - cmd_verify.cc cmd_verify.hh \ + cmd_verify.cc cmd_verify.hh cmd_verify-fmt.hh \ exceptions.cc exceptions.hh \ executables_common.cc executables_common.hh \ format_general.cc format_general.hh \ diff --git a/src/clients/cave/cmd_verify-fmt.hh b/src/clients/cave/cmd_verify-fmt.hh new file mode 100644 index 000000000..923d38c8d --- /dev/null +++ b/src/clients/cave/cmd_verify-fmt.hh @@ -0,0 +1,8 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +const auto fs_package = make_format_string_fetcher("verify/package", 1) + << c::bold_blue_or_pink() << param<'s'>() << c::normal() << "\\n"; + +const auto fs_error = make_format_string_fetcher("verify/error", 1) + << c::bold_red() << " " << param<'p'>() << c::normal() << "%{column 32}" << param<'t'>() << "\\n"; + diff --git a/src/clients/cave/cmd_verify.cc b/src/clients/cave/cmd_verify.cc index b1ed122a6..5a93fc691 100644 --- a/src/clients/cave/cmd_verify.cc +++ b/src/clients/cave/cmd_verify.cc @@ -18,9 +18,10 @@ */ #include "cmd_verify.hh" -#include "exceptions.hh" -#include "format_general.hh" +#include "format_user_config.hh" #include "formats.hh" +#include "exceptions.hh" + #include <paludis/args/args.hh> #include <paludis/args/do_help.hh> #include <paludis/util/wrapped_forward_iterator.hh> @@ -57,6 +58,8 @@ using std::endl; namespace { +#include "cmd_verify-fmt.hh" + struct VerifyCommandLine : CaveCommandCommandLine { @@ -103,11 +106,11 @@ namespace if (! done_heading) { done_heading = true; - cout << format_general_s(f::verify_package(), stringify(*id)); + cout << fuc(fs_package(), fv<'s'>(stringify(*id))); } exit_status |= 1; - cout << format_general_sr(f::verify_error(), text, stringify(path)); + cout << fuc(fs_error(), fv<'t'>(text), fv<'p'>(stringify(path))); } bool check_mtime(const ContentsEntry & e, const FSEntry & f) diff --git a/src/clients/cave/formats.cc b/src/clients/cave/formats.cc index b337ca996..6c653b8ce 100644 --- a/src/clients/cave/formats.cc +++ b/src/clients/cave/formats.cc @@ -677,18 +677,6 @@ paludis::cave::f::executables_file() } const std::string -paludis::cave::f::verify_package() -{ - return c::bold_blue_or_pink() + "%s" + c::normal() + "\\n"; -} - -const std::string -paludis::cave::f::verify_error() -{ - return c::bold_red() + " %s:" + c::normal() + "%{column 32}%r\\n"; -} - -const std::string paludis::cave::f::report_package_id() { return c::bold_blue() + "%s" + c::normal() + "\\n"; diff --git a/src/clients/cave/formats.hh b/src/clients/cave/formats.hh index 4ff8adc39..5cc2cee14 100644 --- a/src/clients/cave/formats.hh +++ b/src/clients/cave/formats.hh @@ -170,9 +170,6 @@ namespace paludis const std::string executables_file(); - const std::string verify_package(); - const std::string verify_error(); - const std::string report_package_id(); const std::string report_package_no_origin(); const std::string report_package_origin(); |