summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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