diff options
-rw-r--r-- | sbuild/sbuild-chroot-facet-source-clonable.cc | 13 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-facet-source-clonable.h | 18 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-facet-union.cc | 13 | ||||
-rw-r--r-- | sbuild/sbuild-chroot-facet-union.h | 3 | ||||
-rw-r--r-- | test/test-sbuild-chroot.h | 11 |
5 files changed, 6 insertions, 52 deletions
diff --git a/sbuild/sbuild-chroot-facet-source-clonable.cc b/sbuild/sbuild-chroot-facet-source-clonable.cc index c807d8bf..5963b788 100644 --- a/sbuild/sbuild-chroot-facet-source-clonable.cc +++ b/sbuild/sbuild-chroot-facet-source-clonable.cc @@ -30,7 +30,6 @@ using namespace sbuild; chroot_facet_source_clonable::chroot_facet_source_clonable (): chroot_facet(), - source_clonable(true), source_users(), source_groups(), source_root_users(), @@ -85,18 +84,6 @@ chroot_facet_source_clonable::clone_source_setup (chroot::ptr& clone) const clone->add_facet(chroot_facet_source::create()); } -bool -chroot_facet_source_clonable::get_source_clonable () const -{ - return this->source_clonable; -} - -void -chroot_facet_source_clonable::set_source_clonable (bool clonable) -{ - this->source_clonable = clonable; -} - string_list const& chroot_facet_source_clonable::get_source_users () const { diff --git a/sbuild/sbuild-chroot-facet-source-clonable.h b/sbuild/sbuild-chroot-facet-source-clonable.h index 32331033..5d8ae074 100644 --- a/sbuild/sbuild-chroot-facet-source-clonable.h +++ b/sbuild/sbuild-chroot-facet-source-clonable.h @@ -143,22 +143,6 @@ namespace sbuild virtual void set_source_root_groups (string_list const& groups); - /** - * Get if the chroot is a clonable source chroot or not. - * - * @returns true if the chroot is a clonable source chroot, otherwise false. - */ - virtual bool - get_source_clonable () const; - - /** - * Set if the chroot is a clonable source chroot or not. - * - * @param clonable true if a clonable source chroot, or false if not. - */ - virtual void - set_source_clonable (bool clonable); - virtual void setup_env (chroot const& chroot, environment& env) const; @@ -180,8 +164,6 @@ namespace sbuild string_list& used_keys); private: - /// Is the chroot source or clone? - bool source_clonable; /// Users allowed to access the source chroot. string_list source_users; /// Groups allowed to access the source chroot. diff --git a/sbuild/sbuild-chroot-facet-union.cc b/sbuild/sbuild-chroot-facet-union.cc index 2535e139..b38a00cb 100644 --- a/sbuild/sbuild-chroot-facet-union.cc +++ b/sbuild/sbuild-chroot-facet-union.cc @@ -102,19 +102,6 @@ chroot_facet_union::clone_source_setup (chroot::ptr& clone) const } bool -chroot_facet_union::get_source_clonable () const -{ - const chroot *base = dynamic_cast<const chroot *>(this); - assert(base); - chroot_facet_source_clonable::const_ptr psrc - (base->get_facet<chroot_facet_source_clonable>()); - assert(psrc); - - return psrc->get_source_clonable() && - get_union_configured(); -} - -bool chroot_facet_union::get_union_configured () const { return get_union_type() != "none"; diff --git a/sbuild/sbuild-chroot-facet-union.h b/sbuild/sbuild-chroot-facet-union.h index 715e3c3a..b308d516 100644 --- a/sbuild/sbuild-chroot-facet-union.h +++ b/sbuild/sbuild-chroot-facet-union.h @@ -79,9 +79,6 @@ namespace sbuild void clone_source_setup (chroot::ptr& clone) const; - bool - get_source_clonable () const; - /** * Get fs union configured state. * diff --git a/test/test-sbuild-chroot.h b/test/test-sbuild-chroot.h index 6257d271..14e16c46 100644 --- a/test/test-sbuild-chroot.h +++ b/test/test-sbuild-chroot.h @@ -94,13 +94,14 @@ public: this->source = this->chroot->clone_source(); if (this->source) { - sbuild::chroot_facet_source_clonable::const_ptr ssrc + sbuild::chroot_facet_source_clonable::const_ptr pfsrcc (this->source-> template get_facet<sbuild::chroot_facet_source_clonable>()); - if (ssrc) - { - CPPUNIT_ASSERT(ssrc->get_source_clonable() == true); - } + CPPUNIT_ASSERT(!pfsrcc); + sbuild::chroot_facet_source::const_ptr pfsrc + (this->source-> + template get_facet<sbuild::chroot_facet_source>()); + CPPUNIT_ASSERT(pfsrc); } this->chroot_union = sbuild::chroot::ptr(new T); |