diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index f53bc2c2..e36a6193 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -161,7 +161,7 @@ merge_etc_changes (GFile *orig_etc, g_assert (path); target_file = g_file_resolve_relative_path (new_etc, path); - if (!ot_gfile_ensure_unlinked (target_file, cancellable, error)) + if (!gs_shutil_rm_rf (target_file, cancellable, error)) goto out; } diff --git a/tests/libtest.sh b/tests/libtest.sh index 05cc01a4..8c5a7841 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -218,6 +218,8 @@ EOF echo "a config file" > usr/etc/aconfigfile mkdir -p usr/etc/NetworkManager echo "a default daemon file" > usr/etc/NetworkManager/nm.conf + mkdir -p usr/etc/testdirectory + echo "a default daemon file" > usr/etc/testdirectory/test ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Build" diff --git a/tests/test-admin-deploy-1.sh b/tests/test-admin-deploy-1.sh index 02f5b208..e591f9bd 100755 --- a/tests/test-admin-deploy-1.sh +++ b/tests/test-admin-deploy-1.sh @@ -101,6 +101,7 @@ ostree admin --sysroot=sysroot status echo "ok fourth deploy (retain)" echo "a new local config file" > sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/a-new-config-file +rm -r sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/testdirectory rm sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/aconfigfile ln -s /ENOENT sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/a-new-broken-symlink ostree admin --sysroot=sysroot deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime