source: trunk/debathena/third/schroot/sbuild/sbuild-chroot-plain.cc @ 24167

Revision 24167, 2.0 KB checked in by broder, 15 years ago (diff)
Import schroot upstream into subversion.
RevLine 
[24167]1/* Copyright © 2005-2007  Roger Leigh <rleigh@debian.org>
2 *
3 * schroot is free software: you can redistribute it and/or modify it
4 * under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * schroot is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program.  If not, see
15 * <http://www.gnu.org/licenses/>.
16 *
17 *********************************************************************/
18
19#include <config.h>
20
21#include "sbuild-chroot-plain.h"
22#include "sbuild-chroot-facet-session-clonable.h"
23#include "sbuild-format-detail.h"
24#include "sbuild-lock.h"
25
26#include <cerrno>
27
28#include <sys/types.h>
29#include <sys/stat.h>
30#include <sys/sysmacros.h>
31#include <unistd.h>
32
33using namespace sbuild;
34
35chroot_plain::chroot_plain ():
36  chroot_directory_base()
37{
38  set_run_setup_scripts(false);
39
40  remove_facet<chroot_facet_session_clonable>();
41}
42
43chroot_plain::~chroot_plain ()
44{
45}
46
47sbuild::chroot::ptr
48chroot_plain::clone () const
49{
50  return ptr(new chroot_plain(*this));
51}
52
53chroot::ptr
54sbuild::chroot_plain::clone_session (std::string const& session_id,
55                                     std::string const& user,
56                                     bool               root) const
57{
58  return ptr();
59}
60
61chroot::ptr
62sbuild::chroot_plain::clone_source () const
63{
64  return ptr();
65}
66
67std::string const&
68chroot_plain::get_chroot_type () const
69{
70  static const std::string type("plain");
71
72  return type;
73}
74
75std::string
76chroot_plain::get_path () const
77{
78  return get_directory();
79}
80
81void
82chroot_plain::setup_lock (chroot::setup_type type,
83                          bool               lock,
84                          int                status)
85{
86  /* By default, plain chroots do no locking. */
87}
88
89sbuild::chroot::session_flags
90chroot_plain::get_session_flags (chroot const& chroot) const
91{
92  return SESSION_NOFLAGS;
93}
Note: See TracBrowser for help on using the repository browser.