From 53b9b50e3646c2ccea184e0a1b316e466c62e322 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 18 Apr 2017 10:13:45 -0400 Subject: [PATCH 1/2] checkout: Fix bare-user symlink checkouts Logic error introduced after refactoring; we hoisted the `is_bare_user_symlink` variable to the top, but its computation below. But the `is_bare` symlink depended on it. Closes: https://github.com/ostreedev/ostree/issues/798 Closes: #799 Approved by: jlebon --- src/libostree/ostree-repo-checkout.c | 2 +- tests/basic-test.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c index 392e16fd..71511824 100644 --- a/src/libostree/ostree-repo-checkout.c +++ b/src/libostree/ostree-repo-checkout.c @@ -479,7 +479,6 @@ checkout_one_file_at (OstreeRepo *repo, (current_repo->mode == OSTREE_REPO_MODE_BARE && options->mode == OSTREE_REPO_CHECKOUT_MODE_NONE) || (repo_is_usermode && options->mode == OSTREE_REPO_CHECKOUT_MODE_USER); - gboolean is_bare = is_hardlinkable && !is_bare_user_symlink; gboolean current_can_cache = (options->enable_uncompressed_cache && current_repo->enable_uncompressed_cache); gboolean is_archive_z2_with_cache = (current_repo->mode == OSTREE_REPO_MODE_ARCHIVE_Z2 @@ -491,6 +490,7 @@ checkout_one_file_at (OstreeRepo *repo, * as well as write_object(). */ is_bare_user_symlink = (repo_is_usermode && is_symlink); + const gboolean is_bare = is_hardlinkable && !is_bare_user_symlink; /* Verify if no_copy_fallback is set that we can hardlink, with a * special exception for bare-user symlinks. diff --git a/tests/basic-test.sh b/tests/basic-test.sh index 294854bf..f4b2b118 100644 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -44,6 +44,7 @@ validate_checkout_basic() { assert_has_file baz/cow assert_file_has_content baz/cow moo assert_has_file baz/deeper/ohyeah + assert_symlink_has_content somelink nosuchfile ) } From 65008edcc75768f6c23fc331e0309c9cd2aeab82 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 18 Apr 2017 11:05:19 -0400 Subject: [PATCH 2/2] Release 2017.5 This is a bugfix release for 2017.4 to fix a regression that broke flatpak: #798 See also: #800 Approved by: jlebon --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f6512c1f..c8e02930 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.63]) dnl If incrementing the version here, remember to update libostree.sym too m4_define([year_version], [2017]) -m4_define([release_version], [4]) +m4_define([release_version], [5]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org])