diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 5b126d89df..2c471be568 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -647,6 +647,22 @@ checkout_deployment_tree (OstreeSysroot *sysroot, cancellable, error)) return FALSE; +#ifdef HAVE_COMPOSEFS + /* Create a composefs image and put in deploy dir as .ostree.cfs */ + OstreeRepoCheckoutComposefsOptions composefs_opts = { 0 }; + g_autoptr(OstreeComposefsTarget) target = ostree_composefs_target_new (); + + composefs_opts.ensure_rootfs_dirs = TRUE; + if (!ostree_repo_checkout_composefs (repo, &composefs_opts, target, csum, + cancellable, error)) + return FALSE; + + g_autofree char *composefs_cfs_path = g_strdup_printf("%s/.ostree.cfs", checkout_target_name); + if (!ostree_composefs_target_write_at (target, osdeploy_dfd, composefs_cfs_path, NULL, + cancellable, error)) + return FALSE; +#endif + return glnx_opendirat (osdeploy_dfd, checkout_target_name, TRUE, out_deployment_dfd, error); }