summaryrefslogtreecommitdiff
path: root/sbuild
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2009-07-05 17:24:32 +0100
committerRoger Leigh <rleigh@debian.org>2009-07-05 17:24:32 +0100
commitce38ce45588fff9c7b812d516902728fc40fecb8 (patch)
tree84b3ad6cbe687680c62cf49b944ad7715411fbbd /sbuild
parent43cfe200c2f00f36476c704739c061c993c40b8f (diff)
downloadschroot-ce38ce45588fff9c7b812d516902728fc40fecb8.tar.gz
[sbuild::chroot_union] Only set keyfile keys if union is configured
Diffstat (limited to 'sbuild')
-rw-r--r--sbuild/sbuild-chroot-union.cc30
1 files changed, 17 insertions, 13 deletions
diff --git a/sbuild/sbuild-chroot-union.cc b/sbuild/sbuild-chroot-union.cc
index 246201b5..fc467eb1 100644
--- a/sbuild/sbuild-chroot-union.cc
+++ b/sbuild/sbuild-chroot-union.cc
@@ -199,19 +199,23 @@ chroot_union::get_keyfile (keyfile& keyfile) const
keyfile::set_object_value(*this, &chroot_union::get_union_type,
keyfile, base->get_keyfile_name(), "union-type");
- keyfile::set_object_value(*this,
- &chroot_union::get_union_mount_options,
- keyfile, base->get_keyfile_name(), "union-mount-options");
-
- keyfile::set_object_value(*this,
- &chroot_union::get_union_overlay_directory,
- keyfile, base->get_keyfile_name(),
- "union-overlay-directory");
-
- keyfile::set_object_value(*this,
- &chroot_union::get_union_underlay_directory,
- keyfile, base->get_keyfile_name(),
- "union-underlay-directory");
+ if (get_union_configured())
+ {
+ keyfile::set_object_value(*this,
+ &chroot_union::get_union_mount_options,
+ keyfile, base->get_keyfile_name(),
+ "union-mount-options");
+
+ keyfile::set_object_value(*this,
+ &chroot_union::get_union_overlay_directory,
+ keyfile, base->get_keyfile_name(),
+ "union-overlay-directory");
+
+ keyfile::set_object_value(*this,
+ &chroot_union::get_union_underlay_directory,
+ keyfile, base->get_keyfile_name(),
+ "union-underlay-directory");
+ }
}
void