diff options
author | Roger Leigh <rleigh@debian.org> | 2013-04-03 20:57:27 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2013-04-03 20:57:27 +0100 |
commit | 1ee636c6b694733c1566f8880164f68e3a530df8 (patch) | |
tree | 88bb4493be12c2bc482daac9dbeb9d0c26943def | |
parent | f9b763bd51e397eeedfb3aca157a7081b28574b3 (diff) | |
download | schroot-1ee636c6b694733c1566f8880164f68e3a530df8.tar.gz |
lib: Rename schroot-base to bin-common (2)
41 files changed, 126 insertions, 127 deletions
diff --git a/Makefile.am b/Makefile.am index d18d384e..8be35386 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,7 +50,7 @@ include etc/bash_completion/Makefile.am include etc/pam/Makefile.am include etc/setup.d/Makefile.am include lib/sbuild/Makefile.am -include lib/schroot-base/Makefile.am +include lib/bin-common/Makefile.am include lib/test/Makefile.am include libexec/listmounts/Makefile.am include libexec/mount/Makefile.am diff --git a/bin/csbuild/csbuild.cc b/bin/csbuild/csbuild.cc index 6ded65d1..5b95a208 100644 --- a/bin/csbuild/csbuild.cc +++ b/bin/csbuild/csbuild.cc @@ -21,7 +21,7 @@ #include "options.h" #include "main.h" -#include <schroot-base/run.h> +#include <bin-common/run.h> using std::endl; using boost::format; @@ -42,6 +42,6 @@ int main (int argc, char *argv[]) { - return schroot_base::run + return bin_common::run <csbuild::options, csbuild::main>(argc, argv); } diff --git a/bin/csbuild/main.cc b/bin/csbuild/main.cc index b611ec9e..972ac354 100644 --- a/bin/csbuild/main.cc +++ b/bin/csbuild/main.cc @@ -42,12 +42,12 @@ using sbuild::N_; using namespace csbuild; main::main (options::ptr& options): - schroot_base::main("csbuild", - // TRANSLATORS: '...' is an ellipsis e.g. U+2026, - // and '-' is an em-dash. - _("[OPTION…] — build Debian packages from source"), - options, - false), + bin_common::main("csbuild", + // TRANSLATORS: '...' is an ellipsis e.g. U+2026, + // and '-' is an em-dash. + _("[OPTION…] — build Debian packages from source"), + options, + false), opts(options) { } diff --git a/bin/csbuild/main.h b/bin/csbuild/main.h index ae052fad..8dd60395 100644 --- a/bin/csbuild/main.h +++ b/bin/csbuild/main.h @@ -21,7 +21,7 @@ #include <csbuild/options.h> -#include <schroot-base/main.h> +#include <bin-common/main.h> namespace csbuild { @@ -29,7 +29,7 @@ namespace csbuild /** * Frontend for schroot. This class is used to "run" schroot. */ - class main : public schroot_base::main + class main : public bin_common::main { public: /** diff --git a/bin/csbuild/options.cc b/bin/csbuild/options.cc index 289ae016..bb6f158c 100644 --- a/bin/csbuild/options.cc +++ b/bin/csbuild/options.cc @@ -38,7 +38,7 @@ using namespace csbuild; const options::action_type options::ACTION_BUILD ("build"); options::options (): - schroot_base::options(), + bin_common::options(), packages(), nolog(false), batch_mode(false), @@ -87,7 +87,7 @@ void options::add_options () { // Chain up to add basic options. - schroot_base::options::add_options(); + bin_common::options::add_options(); action.add(ACTION_BUILD); action.set_default(ACTION_BUILD); @@ -172,7 +172,7 @@ void options::add_option_groups () { // Chain up to add basic option groups. - schroot_base::options::add_option_groups(); + bin_common::options::add_option_groups(); visible.add(build); global.add(build); @@ -197,7 +197,7 @@ void options::check_options () { // Chain up to check basic options. - schroot_base::options::check_options(); + bin_common::options::check_options(); if (vm.count("build")) this->action = ACTION_BUILD; diff --git a/bin/csbuild/options.h b/bin/csbuild/options.h index 4f7218da..da8ae578 100644 --- a/bin/csbuild/options.h +++ b/bin/csbuild/options.h @@ -19,7 +19,7 @@ #ifndef CSBUILD_OPTIONS_H #define CSBUILD_OPTIONS_H -#include <schroot-base/options.h> +#include <bin-common/options.h> #include <sbuild/types.h> @@ -31,7 +31,7 @@ namespace csbuild /** * csbuild command-line options. */ - class options : public schroot_base::options + class options : public bin_common::options { public: /// A shared_ptr to an options object. diff --git a/bin/dchroot-dsa/dchroot-dsa.cc b/bin/dchroot-dsa/dchroot-dsa.cc index 70532d32..12c042ef 100644 --- a/bin/dchroot-dsa/dchroot-dsa.cc +++ b/bin/dchroot-dsa/dchroot-dsa.cc @@ -21,7 +21,7 @@ #include "main.h" #include "options.h" -#include <schroot-base/run.h> +#include <bin-common/run.h> using std::endl; using boost::format; @@ -40,6 +40,6 @@ int main (int argc, char *argv[]) { - return schroot_base::run + return bin_common::run <dchroot_dsa::options, dchroot_dsa::main>(argc, argv); } diff --git a/bin/dchroot/dchroot.cc b/bin/dchroot/dchroot.cc index 438ccdbe..53c824b3 100644 --- a/bin/dchroot/dchroot.cc +++ b/bin/dchroot/dchroot.cc @@ -21,7 +21,7 @@ #include "main.h" #include "options.h" -#include <schroot-base/run.h> +#include <bin-common/run.h> using std::endl; using boost::format; @@ -40,5 +40,5 @@ int main (int argc, char *argv[]) { - return schroot_base::run<dchroot::options, dchroot::main>(argc, argv); + return bin_common::run<dchroot::options, dchroot::main>(argc, argv); } diff --git a/bin/schroot-sbuild/schroot-sbuild.cc b/bin/schroot-sbuild/schroot-sbuild.cc index da349bd7..c6d4c966 100644 --- a/bin/schroot-sbuild/schroot-sbuild.cc +++ b/bin/schroot-sbuild/schroot-sbuild.cc @@ -21,7 +21,7 @@ #include "main.h" #include <schroot/options.h> -#include <schroot-base/run.h> +#include <bin-common/run.h> using std::endl; using boost::format; @@ -40,5 +40,5 @@ int main (int argc, char *argv[]) { - return schroot_base::run<schroot::options, schroot_sbuild::main>(argc, argv); + return bin_common::run<schroot::options, schroot_sbuild::main>(argc, argv); } diff --git a/bin/schroot/Makefile.am b/bin/schroot/Makefile.am index cbac54d4..0ef2c181 100644 --- a/bin/schroot/Makefile.am +++ b/bin/schroot/Makefile.am @@ -29,7 +29,7 @@ bin_schroot_libschroot_la_SOURCES = \ bin/schroot/main-base.cc \ bin/schroot/main.h \ bin/schroot/main.cc -bin_schroot_libschroot_la_LIBADD = $(top_builddir)/lib/schroot-base/libschroot-base.la +bin_schroot_libschroot_la_LIBADD = $(top_builddir)/lib/bin-common/libbin-common.la bin_schroot_libschroot_all_la_SOURCES = \ bin/schroot/options.h \ diff --git a/bin/schroot/main-base.cc b/bin/schroot/main-base.cc index 97d91c1d..2b15372b 100644 --- a/bin/schroot/main-base.cc +++ b/bin/schroot/main-base.cc @@ -62,9 +62,9 @@ main_base::main_base (std::string const& program_name, std::string const& program_usage, options_base::ptr& options, bool use_syslog): - schroot_base::main(program_name, program_usage, - std::static_pointer_cast<schroot_base::options>(options), - use_syslog), + bin_common::main(program_name, program_usage, + std::static_pointer_cast<bin_common::options>(options), + use_syslog), options(options) { } @@ -76,7 +76,7 @@ main_base::~main_base () void main_base::action_version (std::ostream& stream) { - schroot_base::main::action_version(stream); + bin_common::main::action_version(stream); format feature(" %1$-12s %2%\n"); diff --git a/bin/schroot/main-base.h b/bin/schroot/main-base.h index 3b906069..4e9f32eb 100644 --- a/bin/schroot/main-base.h +++ b/bin/schroot/main-base.h @@ -19,7 +19,7 @@ #ifndef SCHROOT_MAIN_BASE_H #define SCHROOT_MAIN_BASE_H -#include <schroot-base/main.h> +#include <bin-common/main.h> #include <schroot/options-base.h> #include <sbuild/chroot-config.h> @@ -33,7 +33,7 @@ namespace schroot * schroot programs. This class contains functionality common to * all schroot programs (schroot, dchroot, dchroot-dsa). */ - class main_base : public schroot_base::main + class main_base : public bin_common::main { public: /// Error codes. diff --git a/bin/schroot/options-base.cc b/bin/schroot/options-base.cc index 6e65293d..44951f5a 100644 --- a/bin/schroot/options-base.cc +++ b/bin/schroot/options-base.cc @@ -46,7 +46,7 @@ const options_base::action_type options_base::ACTION_LOCATION ("location"); const options_base::action_type options_base::ACTION_CONFIG ("config"); options_base::options_base (): - schroot_base::options (), + bin_common::options (), chroots(), command(), directory(), @@ -77,7 +77,7 @@ void options_base::add_options () { // Chain up to add basic options. - schroot_base::options::add_options(); + bin_common::options::add_options(); action.add(ACTION_SESSION_AUTO); action.set_default(ACTION_SESSION_AUTO); @@ -113,7 +113,7 @@ void options_base::add_option_groups () { // Chain up to add basic option groups. - schroot_base::options::add_option_groups(); + bin_common::options::add_option_groups(); #ifndef BOOST_PROGRAM_OPTIONS_DESCRIPTION_OLD if (!chroot.options().empty()) @@ -158,7 +158,7 @@ void options_base::check_options () { // Chain up to check basic options. - schroot_base::options::check_options(); + bin_common::options::check_options(); if (vm.count("list")) this->action = ACTION_LIST; @@ -172,7 +172,7 @@ void options_base::check_actions () { // Chain up to check basic actions. - schroot_base::options::check_actions(); + bin_common::options::check_actions(); if (this->quiet && this->verbose) { diff --git a/bin/schroot/options-base.h b/bin/schroot/options-base.h index 51c630f6..a6a485d8 100644 --- a/bin/schroot/options-base.h +++ b/bin/schroot/options-base.h @@ -22,7 +22,7 @@ #include <sbuild/session.h> #include <sbuild/types.h> -#include <schroot-base/options.h> +#include <bin-common/options.h> #include <memory> #include <string> @@ -39,7 +39,7 @@ namespace schroot * behaviour. This class contains functionality and options common * to all schroot programs (schroot, dchroot, dchroot-dsa). */ - class options_base : public schroot_base::options + class options_base : public bin_common::options { public: /// Begin, run and end a session. diff --git a/bin/schroot/schroot.cc b/bin/schroot/schroot.cc index 14f6c2dc..f62341df 100644 --- a/bin/schroot/schroot.cc +++ b/bin/schroot/schroot.cc @@ -21,7 +21,7 @@ #include "main.h" #include "options.h" -#include <schroot-base/run.h> +#include <bin-common/run.h> using std::endl; using boost::format; @@ -40,5 +40,5 @@ int main (int argc, char *argv[]) { - return schroot_base::run<schroot::options, schroot::main>(argc, argv); + return bin_common::run<schroot::options, schroot::main>(argc, argv); } diff --git a/debian/changelog b/debian/changelog index 916f6f2a..a0f1840f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1002,7 +1002,7 @@ schroot (1.1.4-1) unstable; urgency=low schroot (1.1.3-1) unstable; urgency=low * New upstream development release. - * bin/schroot-base/schroot-base-run.h, sbuild/sbuild-basic-keyfile.tcc: + * bin/bin-common/schroot-base-run.h, sbuild/sbuild-basic-keyfile.tcc: Cope with failure when the locale set in the user's environment is invalid, by falling back to the C locale (Closes: #425117). Thanks to Martin Michlmayr for reporting this bug. diff --git a/doc/schroot.dox.in b/doc/schroot.dox.in index bea5a71a..f902831b 100644 --- a/doc/schroot.dox.in +++ b/doc/schroot.dox.in @@ -658,7 +658,7 @@ WARN_LOGFILE = doc/schroot.log INPUT = @abs_top_srcdir@/bin/dchroot \ @abs_top_srcdir@/bin/dchroot-dsa \ @abs_top_srcdir@/bin/schroot \ - @abs_top_srcdir@/lib/schroot-base \ + @abs_top_srcdir@/lib/bin-common \ @abs_top_srcdir@/libexec/listmounts \ @abs_top_srcdir@/libexec/mount \ diff --git a/lib/bin-common/Makefile.am b/lib/bin-common/Makefile.am index 4c2a1016..2e30cd9b 100644 --- a/lib/bin-common/Makefile.am +++ b/lib/bin-common/Makefile.am @@ -16,14 +16,14 @@ # ##################################################################### -noinst_LTLIBRARIES += lib/schroot-base/libschroot-base.la +noinst_LTLIBRARIES += lib/bin-common/libbin-common.la -lib_schroot_base_libschroot_base_la_SOURCES = \ - lib/schroot-base/main.h \ - lib/schroot-base/main.cc \ - lib/schroot-base/option-action.h \ - lib/schroot-base/option-action.cc \ - lib/schroot-base/options.h \ - lib/schroot-base/options.cc \ - lib/schroot-base/run.h -lib_schroot_base_libschroot_base_la_LIBADD = $(top_builddir)/lib/sbuild/libsbuild.la +lib_bin_common_libbin_common_la_SOURCES = \ + lib/bin-common/main.h \ + lib/bin-common/main.cc \ + lib/bin-common/option-action.h \ + lib/bin-common/option-action.cc \ + lib/bin-common/options.h \ + lib/bin-common/options.cc \ + lib/bin-common/run.h +lib_bin_common_libbin_common_la_LIBADD = $(top_builddir)/lib/sbuild/libsbuild.la diff --git a/lib/bin-common/main.cc b/lib/bin-common/main.cc index d12caa56..b22fc7af 100644 --- a/lib/bin-common/main.cc +++ b/lib/bin-common/main.cc @@ -36,7 +36,7 @@ using std::endl; using boost::format; using sbuild::_; -using namespace schroot_base; +using namespace bin_common; main::main (std::string const& program_name, std::string const& program_usage, @@ -116,7 +116,7 @@ main::run (int argc, try { - dynamic_cast<schroot_base::options::error const&>(e); + dynamic_cast<bin_common::options::error const&>(e); sbuild::log_info() // TRANSLATORS: %1% = program name << format(_("Run “%1% --help” to list usage example and all available options")) diff --git a/lib/bin-common/main.h b/lib/bin-common/main.h index 394482fa..0524ec8c 100644 --- a/lib/bin-common/main.h +++ b/lib/bin-common/main.h @@ -16,10 +16,10 @@ * *********************************************************************/ -#ifndef SCHROOT_BASE_MAIN_H -#define SCHROOT_BASE_MAIN_H +#ifndef BIN_COMMON_MAIN_H +#define BIN_COMMON_MAIN_H -#include <schroot-base/options.h> +#include <bin-common/options.h> #include <string> @@ -30,7 +30,7 @@ * parsing and common options, top-level error handling and a generic * method for program instantiation. */ -namespace schroot_base +namespace bin_common { /** @@ -109,7 +109,7 @@ namespace schroot_base } -#endif /* SCHROOT_BASE_MAIN_H */ +#endif /* BIN_COMMON_MAIN_H */ /* * Local Variables: diff --git a/lib/bin-common/option-action.cc b/lib/bin-common/option-action.cc index ead530ba..ba11f2bf 100644 --- a/lib/bin-common/option-action.cc +++ b/lib/bin-common/option-action.cc @@ -32,7 +32,7 @@ using std::endl; using boost::format; using sbuild::_; namespace opt = boost::program_options; -using namespace schroot_base; +using namespace bin_common; option_action::option_action (): default_action(), @@ -63,7 +63,7 @@ option_action::set_default (action_type const& action) if (valid(action)) this->default_action = action; else - throw schroot_base::options::error((format(_("%1%: invalid action")) % action).str()); + throw bin_common::options::error((format(_("%1%: invalid action")) % action).str()); } option_action::action_type const& @@ -83,11 +83,11 @@ option_action::set (action_type const& action) if (this->current_action == "") this->current_action = action; else - throw schroot_base::options::error + throw bin_common::options::error (_("Only one action may be specified")); } else - throw schroot_base::options::error((format(_("%1%: invalid action")) % action).str()); + throw bin_common::options::error((format(_("%1%: invalid action")) % action).str()); } bool diff --git a/lib/bin-common/option-action.h b/lib/bin-common/option-action.h index 20910ead..84e428aa 100644 --- a/lib/bin-common/option-action.h +++ b/lib/bin-common/option-action.h @@ -16,13 +16,13 @@ * *********************************************************************/ -#ifndef SCHROOT_BASE_OPTION_ACTION_H -#define SCHROOT_BASE_OPTION_ACTION_H +#ifndef BIN_COMMON_OPTION_ACTION_H +#define BIN_COMMON_OPTION_ACTION_H #include <set> #include <string> -namespace schroot_base +namespace bin_common { /** @@ -147,7 +147,7 @@ namespace schroot_base } -#endif /* SCHROOT_BASE_OPTION_ACTION_H */ +#endif /* BIN_COMMON_OPTION_ACTION_H */ /* * Local Variables: diff --git a/lib/bin-common/options.cc b/lib/bin-common/options.cc index d332aad4..f8a3230c 100644 --- a/lib/bin-common/options.cc +++ b/lib/bin-common/options.cc @@ -30,7 +30,7 @@ using std::endl; using boost::format; using sbuild::_; namespace opt = boost::program_options; -using namespace schroot_base; +using namespace bin_common; /// Display program help. const options::action_type options::ACTION_HELP ("help"); diff --git a/lib/bin-common/options.h b/lib/bin-common/options.h index c93aa120..aef46786 100644 --- a/lib/bin-common/options.h +++ b/lib/bin-common/options.h @@ -16,13 +16,12 @@ * *********************************************************************/ -#ifndef SCHROOT_BASE_OPTIONS_H -#define SCHROOT_BASE_OPTIONS_H +#ifndef BIN_COMMON_OPTIONS_H +#define BIN_COMMON_OPTIONS_H -#include <sbuild/session.h> #include <sbuild/types.h> -#include <schroot-base/option-action.h> +#include <bin-common/option-action.h> #include <memory> #include <string> @@ -30,7 +29,7 @@ #include <boost/program_options.hpp> -namespace schroot_base +namespace bin_common { /** @@ -145,7 +144,7 @@ namespace schroot_base } -#endif /* SCHROOT_BASE_OPTIONS_H */ +#endif /* BIN_COMMON_OPTIONS_H */ /* * Local Variables: diff --git a/lib/bin-common/run.h b/lib/bin-common/run.h index 9fde3d42..055ff4a7 100644 --- a/lib/bin-common/run.h +++ b/lib/bin-common/run.h @@ -16,10 +16,10 @@ * *********************************************************************/ -#ifndef SCHROOT_BASE_RUN_H -#define SCHROOT_BASE_RUN_H +#ifndef BIN_COMMON_RUN_H +#define BIN_COMMON_RUN_H -#include <schroot-base/options.h> +#include <bin-common/options.h> #include <sbuild/config.h> @@ -27,7 +27,7 @@ #include <iostream> #include <string> -namespace schroot_base +namespace bin_common { /** @@ -82,7 +82,7 @@ namespace schroot_base } -#endif /* SCHROOT_BASE_RUN_H */ +#endif /* BIN_COMMON_RUN_H */ /* * Local Variables: diff --git a/libexec/listmounts/Makefile.am b/libexec/listmounts/Makefile.am index a9bb166c..9a11bfaf 100644 --- a/libexec/listmounts/Makefile.am +++ b/libexec/listmounts/Makefile.am @@ -25,4 +25,4 @@ libexec_listmounts_listmounts_SOURCES = \ libexec/listmounts/options.cc \ libexec/listmounts/listmounts.cc libexec_listmounts_listmounts_LDADD = \ - $(top_builddir)/lib/schroot-base/libschroot-base.la + $(top_builddir)/lib/bin-common/libbin-common.la diff --git a/libexec/listmounts/listmounts.cc b/libexec/listmounts/listmounts.cc index 4c957509..1f9be8b4 100644 --- a/libexec/listmounts/listmounts.cc +++ b/libexec/listmounts/listmounts.cc @@ -21,7 +21,7 @@ #include "options.h" #include "main.h" -#include <schroot-base/run.h> +#include <bin-common/run.h> using std::endl; using boost::format; @@ -42,6 +42,6 @@ int main (int argc, char *argv[]) { - return schroot_base::run + return bin_common::run <schroot_listmounts::options, schroot_listmounts::main>(argc, argv); } diff --git a/libexec/listmounts/main.cc b/libexec/listmounts/main.cc index e32a5e5e..3f228b0b 100644 --- a/libexec/listmounts/main.cc +++ b/libexec/listmounts/main.cc @@ -51,12 +51,12 @@ sbuild::error<main::error_code>::error_strings = }; main::main (options::ptr& options): - schroot_base::main("schroot-listmounts", - // TRANSLATORS: '...' is an ellipsis e.g. U+2026, - // and '-' is an em-dash. - _("[OPTION…] — list mount points"), - options, - false), + bin_common::main("schroot-listmounts", + // TRANSLATORS: '...' is an ellipsis e.g. U+2026, + // and '-' is an em-dash. + _("[OPTION…] — list mount points"), + options, + false), opts(options) { } diff --git a/libexec/listmounts/main.h b/libexec/listmounts/main.h index 54379cd2..3982ba86 100644 --- a/libexec/listmounts/main.h +++ b/libexec/listmounts/main.h @@ -19,7 +19,7 @@ #ifndef LIBEXEC_LISTMOUNTS_MAIN_H #define LIBEXEC_LISTMOUNTS_MAIN_H -#include <schroot-base/main.h> +#include <bin-common/main.h> #include <libexec/listmounts/options.h> @@ -34,7 +34,7 @@ namespace schroot_listmounts /** * Frontend for schroot. This class is used to "run" schroot. */ - class main : public schroot_base::main + class main : public bin_common::main { public: /// Error codes. diff --git a/libexec/listmounts/options.cc b/libexec/listmounts/options.cc index 9a63713f..9e3d935e 100644 --- a/libexec/listmounts/options.cc +++ b/libexec/listmounts/options.cc @@ -37,7 +37,7 @@ using namespace schroot_listmounts; const options::action_type options::ACTION_LISTMOUNTS ("listmounts"); options::options (): - schroot_base::options(), + bin_common::options(), mountpoint(), mount(_("Mount")) { @@ -51,7 +51,7 @@ void options::add_options () { // Chain up to add basic options. - schroot_base::options::add_options(); + bin_common::options::add_options(); action.add(ACTION_LISTMOUNTS); action.set_default(ACTION_LISTMOUNTS); @@ -65,7 +65,7 @@ void options::add_option_groups () { // Chain up to add basic option groups. - schroot_base::options::add_option_groups(); + bin_common::options::add_option_groups(); #ifndef BOOST_PROGRAM_OPTIONS_DESCRIPTION_OLD if (!mount.options().empty()) @@ -82,7 +82,7 @@ void options::check_options () { // Chain up to check basic options. - schroot_base::options::check_options(); + bin_common::options::check_options(); if (this->action == ACTION_LISTMOUNTS && this->mountpoint.empty()) diff --git a/libexec/listmounts/options.h b/libexec/listmounts/options.h index a90ef9ba..5353276c 100644 --- a/libexec/listmounts/options.h +++ b/libexec/listmounts/options.h @@ -19,7 +19,7 @@ #ifndef LIBEXEC_LISTMOUNTS_OPTIONS_H #define LIBEXEC_LISTMOUNTS_OPTIONS_H -#include <schroot-base/options.h> +#include <bin-common/options.h> #include <string> @@ -29,7 +29,7 @@ namespace schroot_listmounts /** * schroot-listmounts command-line options. */ - class options : public schroot_base::options + class options : public bin_common::options { public: /// A shared_ptr to an options object. diff --git a/libexec/mount/Makefile.am b/libexec/mount/Makefile.am index 61392030..4896433f 100644 --- a/libexec/mount/Makefile.am +++ b/libexec/mount/Makefile.am @@ -26,5 +26,5 @@ libexec_mount_mount_SOURCES = \ libexec/mount/mount.cc libexec_mount_mount_LDADD = $(BOOST_FILESYSTEM_LIBS) \ - $(top_builddir)/lib/schroot-base/libschroot-base.la + $(top_builddir)/lib/bin-common/libbin-common.la diff --git a/libexec/mount/main.cc b/libexec/mount/main.cc index 9b141e31..e1253de3 100644 --- a/libexec/mount/main.cc +++ b/libexec/mount/main.cc @@ -58,12 +58,12 @@ sbuild::error<main::error_code>::error_strings = }; main::main (options::ptr& options): - schroot_base::main("schroot-mount", - // TRANSLATORS: '...' is an ellipsis e.g. U+2026, - // and '-' is an em-dash. - _("[OPTION…] — mount filesystems"), - options, - false), + bin_common::main("schroot-mount", + // TRANSLATORS: '...' is an ellipsis e.g. U+2026, + // and '-' is an em-dash. + _("[OPTION…] — mount filesystems"), + options, + false), opts(options) { } diff --git a/libexec/mount/main.h b/libexec/mount/main.h index 07389d66..4812abe1 100644 --- a/libexec/mount/main.h +++ b/libexec/mount/main.h @@ -19,7 +19,7 @@ #ifndef LIBEXEC_MOUNT_MAIN_H #define LIBEXEC_MOUNT_MAIN_H -#include <schroot-base/main.h> +#include <bin-common/main.h> #include <libexec/mount/options.h> @@ -34,7 +34,7 @@ namespace schroot_mount /** * Frontend for schroot-mount. This class is used to "run" schroot-mount. */ - class main : public schroot_base::main + class main : public bin_common::main { public: /// Error codes. diff --git a/libexec/mount/mount.cc b/libexec/mount/mount.cc index 31876805..1845aae0 100644 --- a/libexec/mount/mount.cc +++ b/libexec/mount/mount.cc @@ -21,7 +21,7 @@ #include "options.h" #include "main.h" -#include <schroot-base/run.h> +#include <bin-common/run.h> using std::endl; using boost::format; @@ -42,6 +42,6 @@ int main (int argc, char *argv[]) { - return schroot_base::run + return bin_common::run <schroot_mount::options, schroot_mount::main>(argc, argv); } diff --git a/libexec/mount/options.cc b/libexec/mount/options.cc index bb961a2a..7b7019a5 100644 --- a/libexec/mount/options.cc +++ b/libexec/mount/options.cc @@ -38,7 +38,7 @@ using namespace schroot_mount; const options::action_type options::ACTION_MOUNT ("mount"); options::options (): - schroot_base::options(), + bin_common::options(), dry_run(false), fstab(), mountpoint(), @@ -54,7 +54,7 @@ void options::add_options () { // Chain up to add basic options. - schroot_base::options::add_options(); + bin_common::options::add_options(); action.add(ACTION_MOUNT); action.set_default(ACTION_MOUNT); @@ -73,7 +73,7 @@ void options::add_option_groups () { // Chain up to add basic option groups. - schroot_base::options::add_option_groups(); + bin_common::options::add_option_groups(); #ifndef BOOST_PROGRAM_OPTIONS_DESCRIPTION_OLD if (!mount.options().empty()) @@ -90,7 +90,7 @@ void options::check_options () { // Chain up to check basic options. - schroot_base::options::check_options(); + bin_common::options::check_options(); if (vm.count("dry-run")) this->dry_run = true; diff --git a/libexec/mount/options.h b/libexec/mount/options.h index 9f256433..57b20a39 100644 --- a/libexec/mount/options.h +++ b/libexec/mount/options.h @@ -19,7 +19,7 @@ #ifndef LIBEXEC_MOUNT_OPTIONS_H #define LIBEXEC_MOUNT_OPTIONS_H -#include <schroot-base/options.h> +#include <bin-common/options.h> #include <string> @@ -29,7 +29,7 @@ namespace schroot_mount /** * schroot-mount command-line options. */ - class options : public schroot_base::options + class options : public bin_common::options { public: /// A shared_ptr to an options object. diff --git a/po/POTFILES.in b/po/POTFILES.in index c1f72318..88610147 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -17,9 +17,9 @@ bin/schroot/main.cc bin/schroot/options-base.cc bin/schroot/options.cc bin/schroot/schroot.cc -lib/schroot-base/main.cc -lib/schroot-base/option-action.cc -lib/schroot-base/options.cc +lib/bin-common/main.cc +lib/bin-common/option-action.cc +lib/bin-common/options.cc libexec/listmounts/listmounts.cc libexec/listmounts/main.cc libexec/listmounts/options.cc diff --git a/test/.gitignore b/test/.gitignore index 823f7b8c..813b6a75 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -19,5 +19,5 @@ sbuild/personality sbuild/regex sbuild/run-parts sbuild/util -schroot-base/option-action +bin-common/option-action diff --git a/test/Makefile.am b/test/Makefile.am index 204b6791..cd31cd88 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -40,7 +40,7 @@ noinst_PROGRAMS += \ test/sbuild/regex \ test/sbuild/run-parts \ test/sbuild/util \ - test/schroot-base/option-action + test/bin-common/option-action # sbuild-lock is excluded, because it is timing dependent and can fail # randomly on slow or heavily-loaded systems. @@ -65,7 +65,7 @@ TESTS = test/setup-test-data \ test/sbuild/run-parts \ test/sbuild/regex \ test/sbuild/util \ - test/schroot-base/option-action \ + test/bin-common/option-action \ test/cleanup-test-data endif @@ -172,8 +172,8 @@ test_sbuild_run_parts_LDADD = lib/test/libtest.la test_sbuild_util_SOURCES = test/sbuild/util.cc test_sbuild_util_LDADD = lib/test/libtest.la -test_schroot_base_option_action_SOURCES = test/schroot-base/option-action.cc -test_schroot_base_option_action_LDADD = $(top_builddir)/lib/schroot-base/libschroot-base.la lib/test/libtest.la +test_bin_common_option_action_SOURCES = test/bin-common/option-action.cc +test_bin_common_option_action_LDADD = $(top_builddir)/lib/bin-common/libbin-common.la lib/test/libtest.la EXTRA_DIST += \ test/keyfile.ex1 \ diff --git a/test/bin-common/option-action.cc b/test/bin-common/option-action.cc index 4f3bb8bb..18e0c73c 100644 --- a/test/bin-common/option-action.cc +++ b/test/bin-common/option-action.cc @@ -16,14 +16,14 @@ * *********************************************************************/ -#include <schroot-base/option-action.h> -#include <schroot-base/options.h> +#include <bin-common/option-action.h> +#include <bin-common/options.h> #include <iostream> #include <cppunit/extensions/HelperMacros.h> -using schroot_base::option_action; +using bin_common::option_action; using namespace CppUnit; class test_option_action : public TestFixture @@ -31,14 +31,14 @@ class test_option_action : public TestFixture CPPUNIT_TEST_SUITE(test_option_action); CPPUNIT_TEST(test_construction); CPPUNIT_TEST(test_default); - CPPUNIT_TEST_EXCEPTION(test_default_fail, schroot_base::options::error); + CPPUNIT_TEST_EXCEPTION(test_default_fail, bin_common::options::error); CPPUNIT_TEST(test_current); - CPPUNIT_TEST_EXCEPTION(test_current_fail, schroot_base::options::error); + CPPUNIT_TEST_EXCEPTION(test_current_fail, bin_common::options::error); CPPUNIT_TEST_EXCEPTION(test_current_fail_multipleset, - schroot_base::options::error); + bin_common::options::error); CPPUNIT_TEST(test_operators); CPPUNIT_TEST_EXCEPTION(test_operators_fail_multipleset, - schroot_base::options::error); + bin_common::options::error); CPPUNIT_TEST_SUITE_END(); protected: |