From d238683332e1aa7d18551d293d4c941a3d010545 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 4 Aug 2016 09:37:26 -0400 Subject: [PATCH] deploy: Use internal recursive copy rather than libgsystem Since we already had a "recursive copy" implementation here, let's reuse it rather than the libgsystem `gs_shutil_cp_a()`. Part of the libglnx porting. Closes: #428 Approved by: jlebon --- src/libostree/ostree-sysroot-deploy.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index d9f6ab94..a05ca30d 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -854,10 +854,15 @@ merge_configuration (OstreeSysroot *sysroot, if (usretc_exists) { + glnx_fd_close int deployment_usr_dfd = -1; + + if (!glnx_opendirat (deployment_dfd, "usr", TRUE, &deployment_usr_dfd, error)) + goto out; + /* TODO - set out labels as we copy files */ g_assert (!etc_exists); - if (!gs_shutil_cp_a (deployment_usretc_path, deployment_etc_path, - cancellable, error)) + if (!copy_dir_recurse (deployment_usr_dfd, deployment_dfd, "etc", + cancellable, error)) goto out; /* Here, we initialize SELinux policy from the /usr/etc inside