diff options
author | Roger Leigh <rleigh@debian.org> | 2013-05-04 14:51:19 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2013-05-04 17:17:18 +0100 |
commit | cde565540a403c751115b1bc2edc444e59ab4422 (patch) | |
tree | af023028c1fc5f7e700c8ebfa271da0e4723f4c9 /lib | |
parent | c1d2866451b6491c632e4d90979f01099d3a1070 (diff) | |
download | schroot-cde565540a403c751115b1bc2edc444e59ab4422.tar.gz |
sbuild::chroot::facet::session_clonable: Remove plain special case
A special case for plain is completely unnecesary since
plain chroots can't use this facet.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbuild/chroot/facet/session-clonable.cc | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/lib/sbuild/chroot/facet/session-clonable.cc b/lib/sbuild/chroot/facet/session-clonable.cc index aa757bad..86609b3a 100644 --- a/lib/sbuild/chroot/facet/session-clonable.cc +++ b/lib/sbuild/chroot/facet/session-clonable.cc @@ -25,10 +25,6 @@ #include <sbuild/chroot/facet/session-clonable.h> #include <sbuild/chroot/facet/session-setup.h> #include <sbuild/chroot/facet/source-clonable.h> -#include <sbuild/chroot/plain.h> -#ifdef SBUILD_FEATURE_BLOCKDEV -#include <sbuild/chroot/facet/block-device-base.h> -#endif #include "format-detail.h" #include <cassert> @@ -137,21 +133,17 @@ namespace sbuild << format("Cloned session %1%") % clone->get_name() << endl; - /* If a chroot mount location has not yet been set, and the - chroot is not a plain chroot, set a mount location with the - session id. Only set for non-plain chroots which run - setup scripts. */ - { - std::shared_ptr<plain> plain(std::dynamic_pointer_cast<plain>(clone)); - - if (clone->get_mount_location().empty() && !plain) - { - log_debug(DEBUG_NOTICE) << "Setting mount location" << endl; - std::string location(std::string(SCHROOT_MOUNT_DIR) + "/" + - session_id); - clone->set_mount_location(location); - } - } + /* If a chroot mount location has not yet been set, set a + mount location with the session id. Only set for non-plain + chroots which run setup scripts (plain chroots don't use + this facet). */ + if (clone->get_mount_location().empty()) + { + log_debug(DEBUG_NOTICE) << "Setting mount location" << endl; + std::string location(std::string(SCHROOT_MOUNT_DIR) + "/" + + session_id); + clone->set_mount_location(location); + } log_debug(DEBUG_NOTICE) << format("Mount Location: %1%") % clone->get_mount_location() |