[ostree] repo: Note global transaction resume is legacy
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] repo: Note global transaction resume is legacy
- Date: Wed, 13 Jan 2016 18:10:09 +0000 (UTC)
commit 46c3fc5d76653d7e5497c0782ef21a7d422e5f96
Author: Colin Walters <walters verbum org>
Date: Wed Jan 13 10:34:32 2016 -0500
repo: Note global transaction resume is legacy
See docs for details.
https://github.com/GNOME/ostree/pull/169
src/libostree/ostree-repo-commit.c | 3 ++-
src/libostree/ostree-repo-pull.c | 9 +++++----
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index 0919028..5ea49ef 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -1144,7 +1144,8 @@ ostree_repo_scan_hardlinks (OstreeRepo *self,
* ostree_repo_prepare_transaction:
* @self: An #OstreeRepo
* @out_transaction_resume: (allow-none) (out): Whether this transaction
- * is resuming from a previous one.
+ * is resuming from a previous one. This is a legacy state, now OSTree
+ * pulls use per-commit `state/.commitpartial` files.
* @cancellable: Cancellable
* @error: Error
*
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 907ed45..c6c9108 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -48,7 +48,7 @@ typedef struct {
GCancellable *cancellable;
OstreeAsyncProgress *progress;
- gboolean transaction_resuming;
+ gboolean legacy_transaction_resuming;
enum {
OSTREE_PULL_PHASE_FETCHING_REFS,
OSTREE_PULL_PHASE_FETCHING_OBJECTS
@@ -1227,7 +1227,7 @@ scan_one_metadata_object_c (OtPullData *pull_data,
}
else if (is_stored)
{
- gboolean do_scan = pull_data->transaction_resuming || is_requested || pull_data->commitpartial_exists;
+ gboolean do_scan = pull_data->legacy_transaction_resuming || is_requested ||
pull_data->commitpartial_exists;
/* For commits, always refetch detached metadata. */
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
@@ -2182,11 +2182,12 @@ ostree_repo_pull_with_options (OstreeRepo *self,
if (pull_data->fetcher == NULL)
goto out;
- if (!ostree_repo_prepare_transaction (pull_data->repo, &pull_data->transaction_resuming,
+ if (!ostree_repo_prepare_transaction (pull_data->repo, &pull_data->legacy_transaction_resuming,
cancellable, error))
goto out;
- g_debug ("resuming transaction: %s", pull_data->transaction_resuming ? "true" : " false");
+ if (pull_data->legacy_transaction_resuming)
+ g_debug ("resuming legacy transaction");
g_hash_table_iter_init (&hash_iter, commits_to_fetch);
while (g_hash_table_iter_next (&hash_iter, &key, &value))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]