diff options
Diffstat (limited to 'sbuild')
-rw-r--r-- | sbuild/sbuild-auth-null.cc | 2 | ||||
-rw-r--r-- | sbuild/sbuild-auth-pam.cc | 6 | ||||
-rw-r--r-- | sbuild/sbuild-auth.cc | 4 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-block-device-base.cc | 2 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-block-device.cc | 10 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-btrfs-snapshot.cc | 2 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-config.cc | 4 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-directory.cc | 4 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-facet-session.cc | 4 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-facet-union.cc | 2 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-file.cc | 2 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-loopback.cc | 4 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-lvm-snapshot.cc | 8 | ||||
-rw-r--r-- | sbuild/sbuild-chroot.cc | 2 | ||||
-rw-r--r-- | sbuild/sbuild-log.cc | 9 | ||||
-rw-r--r-- | sbuild/sbuild-run-parts.cc | 6 | ||||
-rw-r--r-- | sbuild/sbuild-session.cc | 24 | ||||
-rw-r--r-- | sbuild/sbuild-util.cc | 4 |
18 files changed, 50 insertions, 49 deletions
diff --git a/sbuild/sbuild-auth-null.cc b/sbuild/sbuild-auth-null.cc index 314a57a5..4f13b6d2 100644 --- a/sbuild/sbuild-auth-null.cc +++ b/sbuild/sbuild-auth-null.cc @@ -51,7 +51,7 @@ auth_null::~auth_null () } catch (error const& e) { - sbuild::log_exception_error(e); + log_exception_error(e); } } diff --git a/sbuild/sbuild-auth-pam.cc b/sbuild/sbuild-auth-pam.cc index 6374c858..b8925759 100644 --- a/sbuild/sbuild-auth-pam.cc +++ b/sbuild/sbuild-auth-pam.cc @@ -119,11 +119,11 @@ namespace } catch (std::exception const& e) { - sbuild::log_exception_error(e); + log_exception_error(e); } catch (...) { - sbuild::log_error() << _("An unknown exception occurred") << endl; + log_error() << _("An unknown exception occurred") << endl; } return PAM_CONV_ERR; @@ -147,7 +147,7 @@ auth_pam::~auth_pam () } catch (error const& e) { - sbuild::log_exception_error(e); + log_exception_error(e); } } diff --git a/sbuild/sbuild-auth.cc b/sbuild/sbuild-auth.cc index 92400f56..81b8c4a5 100644 --- a/sbuild/sbuild-auth.cc +++ b/sbuild/sbuild-auth.cc @@ -41,7 +41,7 @@ using namespace sbuild; namespace { - typedef std::pair<sbuild::auth::error_code,const char *> emap; + typedef std::pair<auth::error_code,const char *> emap; /** * This is a list of the supported error codes. It's used to @@ -119,7 +119,7 @@ auth::~auth () } catch (error const& e) { - sbuild::log_exception_error(e); + log_exception_error(e); } } diff --git a/sbuild/sbuild-chroot-block-device-base.cc b/sbuild/sbuild-chroot-block-device-base.cc index d02a4f0e..e842aad6 100644 --- a/sbuild/sbuild-chroot-block-device-base.cc +++ b/sbuild/sbuild-chroot-block-device-base.cc @@ -40,7 +40,7 @@ chroot_block_device_base::chroot_block_device_base (): chroot(), device() { - add_facet(sbuild::chroot_facet_mountable::create()); + add_facet(chroot_facet_mountable::create()); } chroot_block_device_base::chroot_block_device_base diff --git a/sbuild/sbuild-chroot-block-device.cc b/sbuild/sbuild-chroot-block-device.cc index 6d3440f0..ec600d16 100644 --- a/sbuild/sbuild-chroot-block-device.cc +++ b/sbuild/sbuild-chroot-block-device.cc @@ -40,7 +40,7 @@ chroot_block_device::chroot_block_device (): chroot_block_device_base() { #ifdef SBUILD_FEATURE_UNION - add_facet(sbuild::chroot_facet_union::create()); + add_facet(chroot_facet_union::create()); #endif // SBUILD_FEATURE_UNION } @@ -59,7 +59,7 @@ chroot_block_device::chroot_block_device (const chroot_lvm_snapshot& rhs): { #ifdef SBUILD_FEATURE_UNION if (!get_facet<chroot_facet_union>()) - add_facet(sbuild::chroot_facet_union::create()); + add_facet(chroot_facet_union::create()); #endif // SBUILD_FEATURE_UNION } #endif // SBUILD_FEATURE_LVMSNAP @@ -145,14 +145,14 @@ chroot_block_device::setup_lock (chroot::setup_type type, if (!puni->get_union_configured()) #endif { - sbuild::device_lock dlock(this->device); + device_lock dlock(this->device); if (lock) { try { dlock.set_lock(lock::LOCK_EXCLUSIVE, 15); } - catch (sbuild::lock::error const& e) + catch (lock::error const& e) { throw error(get_device(), DEVICE_LOCK, e); } @@ -163,7 +163,7 @@ chroot_block_device::setup_lock (chroot::setup_type type, { dlock.unset_lock(); } - catch (sbuild::lock::error const& e) + catch (lock::error const& e) { throw error(get_device(), DEVICE_UNLOCK, e); } diff --git a/sbuild/sbuild-chroot-btrfs-snapshot.cc b/sbuild/sbuild-chroot-btrfs-snapshot.cc index 466a0f95..6af1ac58 100644 --- a/sbuild/sbuild-chroot-btrfs-snapshot.cc +++ b/sbuild/sbuild-chroot-btrfs-snapshot.cc @@ -41,7 +41,7 @@ chroot_btrfs_snapshot::chroot_btrfs_snapshot (): snapshot_directory(), snapshot_name() { - add_facet(sbuild::chroot_facet_source_clonable::create()); + add_facet(chroot_facet_source_clonable::create()); } chroot_btrfs_snapshot::chroot_btrfs_snapshot (const chroot_btrfs_snapshot& rhs): diff --git a/sbuild/sbuild-chroot-config.cc b/sbuild/sbuild-chroot-config.cc index f6480ce0..719a80d6 100644 --- a/sbuild/sbuild-chroot-config.cc +++ b/sbuild/sbuild-chroot-config.cc @@ -610,7 +610,7 @@ chroot_config::load_data (std::string const& chroot_namespace, try { - sbuild::file_lock lock(fd); + file_lock lock(fd); lock.set_lock(lock::LOCK_SHARED, 2); parse_data(chroot_namespace, input); lock.unset_lock(); @@ -689,7 +689,7 @@ chroot_config::load_keyfile (std::string const& chroot_namespace, { chroot_facet_source_clonable::const_ptr psrc - (chroot->get_facet<sbuild::chroot_facet_source_clonable>()); + (chroot->get_facet<chroot_facet_source_clonable>()); if (psrc && psrc->get_source_clone() && !chroot->get_facet<chroot_facet_session>()) diff --git a/sbuild/sbuild-chroot-directory.cc b/sbuild/sbuild-chroot-directory.cc index b79810e5..23a67dcd 100644 --- a/sbuild/sbuild-chroot-directory.cc +++ b/sbuild/sbuild-chroot-directory.cc @@ -40,7 +40,7 @@ chroot_directory::chroot_directory (): chroot_directory_base() { #ifdef SBUILD_FEATURE_UNION - add_facet(sbuild::chroot_facet_union::create()); + add_facet(chroot_facet_union::create()); #endif // SBUILD_FEATURE_UNION } @@ -55,7 +55,7 @@ chroot_directory::chroot_directory (const chroot_btrfs_snapshot& rhs): { #ifdef SBUILD_FEATURE_UNION if (!get_facet<chroot_facet_union>()) - add_facet(sbuild::chroot_facet_union::create()); + add_facet(chroot_facet_union::create()); #endif // SBUILD_FEATURE_UNION set_directory(rhs.get_source_subvolume()); diff --git a/sbuild/sbuild-chroot-facet-session.cc b/sbuild/sbuild-chroot-facet-session.cc index 1ab27475..0c9eaa09 100644 --- a/sbuild/sbuild-chroot-facet-session.cc +++ b/sbuild/sbuild-chroot-facet-session.cc @@ -100,8 +100,8 @@ chroot_facet_session::set_keyfile (chroot& chroot, string_list& used_keys) { // Null methods for obsolete keys. - void (sbuild::chroot_facet_session::* nullmethod)(bool) = 0; - void (sbuild::chroot_facet_session::* nullvmethod)(string_list const&) = 0; + void (chroot_facet_session::* nullmethod)(bool) = 0; + void (chroot_facet_session::* nullvmethod)(string_list const&) = 0; // Setting when not clonable is deprecated. It can't be obsoleted // yet because it is required to allow use and ending of existing diff --git a/sbuild/sbuild-chroot-facet-union.cc b/sbuild/sbuild-chroot-facet-union.cc index c54b34f7..03004abb 100644 --- a/sbuild/sbuild-chroot-facet-union.cc +++ b/sbuild/sbuild-chroot-facet-union.cc @@ -97,7 +97,7 @@ chroot_facet_union::clone_source_setup (chroot::ptr& clone) const psrc->clone_source_setup(clone); chroot_facet_union::ptr puni - (clone->get_facet<sbuild::chroot_facet_union>()); + (clone->get_facet<chroot_facet_union>()); if (puni) puni->set_union_type("none"); } diff --git a/sbuild/sbuild-chroot-file.cc b/sbuild/sbuild-chroot-file.cc index 4418bbd5..24f0b7bc 100644 --- a/sbuild/sbuild-chroot-file.cc +++ b/sbuild/sbuild-chroot-file.cc @@ -40,7 +40,7 @@ chroot_file::chroot_file (): location(), repack(false) { - add_facet(sbuild::chroot_facet_source_clonable::create()); + add_facet(chroot_facet_source_clonable::create()); } chroot_file::chroot_file (const chroot_file& rhs): diff --git a/sbuild/sbuild-chroot-loopback.cc b/sbuild/sbuild-chroot-loopback.cc index e6718fb0..da12eb87 100644 --- a/sbuild/sbuild-chroot-loopback.cc +++ b/sbuild/sbuild-chroot-loopback.cc @@ -41,9 +41,9 @@ chroot_loopback::chroot_loopback (): chroot(), file() { - add_facet(sbuild::chroot_facet_mountable::create()); + add_facet(chroot_facet_mountable::create()); #ifdef SBUILD_FEATURE_UNION - add_facet(sbuild::chroot_facet_union::create()); + add_facet(chroot_facet_union::create()); #endif // SBUILD_FEATURE_UNION } diff --git a/sbuild/sbuild-chroot-lvm-snapshot.cc b/sbuild/sbuild-chroot-lvm-snapshot.cc index b21b7460..97780c0a 100644 --- a/sbuild/sbuild-chroot-lvm-snapshot.cc +++ b/sbuild/sbuild-chroot-lvm-snapshot.cc @@ -41,7 +41,7 @@ chroot_lvm_snapshot::chroot_lvm_snapshot (): snapshot_device(), snapshot_options() { - add_facet(sbuild::chroot_facet_source_clonable::create()); + add_facet(chroot_facet_source_clonable::create()); } chroot_lvm_snapshot::chroot_lvm_snapshot (const chroot_lvm_snapshot& rhs): @@ -169,14 +169,14 @@ chroot_lvm_snapshot::setup_lock (chroot::setup_type type, } else { - sbuild::device_lock dlock(device); + device_lock dlock(device); if (lock) { try { dlock.set_lock(lock::LOCK_EXCLUSIVE, 15); } - catch (sbuild::lock::error const& e) + catch (lock::error const& e) { throw error(get_device(), DEVICE_LOCK, e); } @@ -187,7 +187,7 @@ chroot_lvm_snapshot::setup_lock (chroot::setup_type type, { dlock.unset_lock(); } - catch (sbuild::lock::error const& e) + catch (lock::error const& e) { throw error(get_device(), DEVICE_UNLOCK, e); } diff --git a/sbuild/sbuild-chroot.cc b/sbuild/sbuild-chroot.cc index 8a9ce659..5833b887 100644 --- a/sbuild/sbuild-chroot.cc +++ b/sbuild/sbuild-chroot.cc @@ -553,7 +553,7 @@ sbuild::chroot::setup_session_info (bool start) std::ostream output(&fdbuf); output.imbue(std::locale::classic()); - sbuild::file_lock lock(fd); + file_lock lock(fd); try { lock.set_lock(lock::LOCK_EXCLUSIVE, 2); diff --git a/sbuild/sbuild-log.cc b/sbuild/sbuild-log.cc index e201c3e7..0426173e 100644 --- a/sbuild/sbuild-log.cc +++ b/sbuild/sbuild-log.cc @@ -30,6 +30,7 @@ #include <boost/format.hpp> using boost::format; +using namespace sbuild; namespace { @@ -47,12 +48,12 @@ namespace { try { - sbuild::error_base const& eb(dynamic_cast<sbuild::error_base const&>(e)); - sbuild::string_list lines = sbuild::split_string(eb.why(), "\n"); - for (sbuild::string_list::const_iterator line = lines.begin(); + error_base const& eb(dynamic_cast<error_base const&>(e)); + string_list lines = split_string(eb.why(), "\n"); + for (string_list::const_iterator line = lines.begin(); line != lines.end(); ++line) - ctty ? sbuild::log_ctty_info() : sbuild::log_info() + ctty ? log_ctty_info() : log_info() << *line << std::endl; } catch (std::bad_cast const& discard) diff --git a/sbuild/sbuild-run-parts.cc b/sbuild/sbuild-run-parts.cc index 25ffd515..e9fb10d4 100644 --- a/sbuild/sbuild-run-parts.cc +++ b/sbuild/sbuild-run-parts.cc @@ -37,7 +37,7 @@ using namespace sbuild; namespace { - typedef std::pair<sbuild::run_parts::error_code,const char *> emap; + typedef std::pair<run_parts::error_code,const char *> emap; /** * This is a list of the supported error codes. It's used to @@ -224,11 +224,11 @@ run_parts::run_child (std::string const& file, } catch (std::exception const& e) { - sbuild::log_exception_error(e); + log_exception_error(e); } catch (...) { - sbuild::log_error() + log_error() << _("An unknown exception occurred") << std::endl; } _exit(EXIT_FAILURE); diff --git a/sbuild/sbuild-session.cc b/sbuild/sbuild-session.cc index 07b51bf2..cb423a9f 100644 --- a/sbuild/sbuild-session.cc +++ b/sbuild/sbuild-session.cc @@ -59,7 +59,7 @@ using namespace sbuild; namespace { - typedef std::pair<sbuild::session::error_code,const char *> emap; + typedef std::pair<session::error_code,const char *> emap; /** * This is a list of the supported error codes. It's used to @@ -247,10 +247,10 @@ error<session::error_code>::error_strings (init_errors, init_errors + (sizeof(init_errors) / sizeof(init_errors[0]))); -session::session (std::string const& service, - config_ptr& config, - operation operation, - sbuild::string_list const& chroots): +session::session (std::string const& service, + config_ptr& config, + operation operation, + string_list const& chroots): authstat( #ifdef SBUILD_FEATURE_PAM auth_pam::create(service) @@ -390,7 +390,7 @@ session::save_termios () { if (tcgetattr(CTTY_FILENO, &this->saved_termios) < 0) { - sbuild::log_warning() + log_warning() << _("Error saving terminal settings") << endl; } @@ -411,7 +411,7 @@ session::restore_termios () termios_ok) { if (tcsetattr(CTTY_FILENO, TCSANOW, &this->saved_termios) < 0) - sbuild::log_warning() + log_warning() << _("Error restoring terminal settings") << endl; } @@ -440,12 +440,12 @@ session::get_chroot_membership (chroot::ptr const& chroot, in_groups = false; in_root_groups = false; - sbuild::string_list::const_iterator upos = + string_list::const_iterator upos = find(users.begin(), users.end(), this->authstat->get_ruser()); if (upos != users.end()) in_users = true; - sbuild::string_list::const_iterator rupos = + string_list::const_iterator rupos = find(root_users.begin(), root_users.end(), this->authstat->get_ruser()); if (rupos != root_users.end()) in_root_users = true; @@ -1127,11 +1127,11 @@ session::setup_chroot (sbuild::chroot::ptr& session_chroot, } catch (std::exception const& e) { - sbuild::log_exception_error(e); + log_exception_error(e); } catch (...) { - sbuild::log_error() + log_error() << _("An unknown exception occurred") << std::endl; } _exit(EXIT_FAILURE); @@ -1412,7 +1412,7 @@ session::run_chroot (sbuild::chroot::ptr& session_chroot) } catch (...) { - sbuild::log_error() + log_error() << _("An unknown exception occurred") << std::endl; } _exit (EXIT_FAILURE); diff --git a/sbuild/sbuild-util.cc b/sbuild/sbuild-util.cc index b4504ee7..16d8b143 100644 --- a/sbuild/sbuild-util.cc +++ b/sbuild/sbuild-util.cc @@ -235,8 +235,8 @@ sbuild::unique_identifier () } std::string -sbuild::string_list_to_string (sbuild::string_list const& list, - std::string const& separator) +sbuild::string_list_to_string (string_list const& list, + std::string const& separator) { std::string ret; |