~ubuntu-branches/ubuntu/maverick/schroot/maverick

« back to all changes in this revision

Viewing changes to sbuild/sbuild-chroot-facet-session-clonable.cc

  • Committer: Bazaar Package Importer
  • Author(s): Roger Leigh
  • Date: 2010-07-06 23:34:30 UTC
  • mfrom: (1.1.24 upstream) (2.2.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100706233430-0xhzqj6105yuyvb1
Tags: 1.4.7-1
* New upstream stable release.
* Use standards version 3.9.0.
* Correctly distribute profile conffiles (Closes: #588247).  Thanks
  to Mario Holbe.
* Update it and zh_CN translations.  Thanks to Vincenzo Campanella
  and Ji ZhengYu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#ifdef SBUILD_FEATURE_LVMSNAP
27
27
#include "sbuild-chroot-lvm-snapshot.h"
28
28
#endif // SBUILD_FEATURE_LVMSNAP
 
29
#ifdef SBUILD_FEATURE_BTRFSSNAP
 
30
#include "sbuild-chroot-btrfs-snapshot.h"
 
31
#endif // SBUILD_FEATURE_BTRFSSNAP
29
32
#ifdef SBUILD_FEATURE_UNION
30
33
#include "sbuild-chroot-facet-union.h"
31
34
#endif // SBUILD_FEATURE_UNION
146
149
    }
147
150
#endif // SBUILD_FEATURE_LVMSNAP
148
151
 
 
152
#ifdef SBUILD_FEATURE_BTRFSSNAP
 
153
  /* Btrfs snapshots need the snapshot name specifying. */
 
154
  std::tr1::shared_ptr<chroot_btrfs_snapshot> btrfs_snapshot(std::tr1::dynamic_pointer_cast<chroot_btrfs_snapshot>(clone));
 
155
  if (btrfs_snapshot && !btrfs_snapshot->get_snapshot_directory().empty())
 
156
    {
 
157
      std::string snapname(btrfs_snapshot->get_snapshot_directory());
 
158
      snapname += "/" + clone->get_session_id();
 
159
      btrfs_snapshot->set_snapshot_name(snapname);
 
160
    }
 
161
#endif // SBUILD_FEATURE_BTRFSSNAP
 
162
 
149
163
#ifdef SBUILD_FEATURE_UNION
150
164
  /* Filesystem unions need the overlay directory specifying. */
151
165
  chroot_facet_union::ptr puni(clone->get_facet<chroot_facet_union>());