summaryrefslogtreecommitdiff
path: root/common/flatpak-dir.c
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2018-04-17 11:35:47 -0700
committerMatthew Leeds <matthew.leeds@endlessm.com>2018-04-17 11:46:02 -0700
commit14dde8a37dd76d86d9cf349a4b97ad462f7141b3 (patch)
tree6d4b91e34e1316446ecba82c6b7916e0a8976c52 /common/flatpak-dir.c
parent1e1ed6911e8c1ba15ad904407f2b1dee8fe995ab (diff)
downloadflatpak-14dde8a37dd76d86d9cf349a4b97ad462f7141b3.tar.gz
dir: Use child_repo_ensure_summary() more
This introduces no functional change; it just makes use of a helper function and updates a comment.
Diffstat (limited to 'common/flatpak-dir.c')
-rw-r--r--common/flatpak-dir.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index 598dc3c1..6a7d6841 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -2401,7 +2401,10 @@ child_repo_ensure_summary (OstreeRepo *child_repo,
/* Regenerate the summary in the child repo because the summary copied
* into the repo by flatpak_dir_pull() is reflective of the refs on the
* remote that was pulled from, which might be a peer remote and might not
- * have the full set of refs that was pulled. */
+ * have the full set of refs that was pulled. It's also possible that
+ * ostree didn't copy the remote summary into the repo at all if the
+ * "branches" key is set in the remote config. See
+ * https://github.com/ostreedev/ostree/issues/1461 */
if (!ostree_repo_regenerate_summary (child_repo, NULL, cancellable, error))
return FALSE;
}
@@ -10095,11 +10098,7 @@ _flatpak_dir_fetch_remote_state_metadata_branch (FlatpakDir *self,
NULL, cancellable, error))
return FALSE;
- /* Regenerate the summary in the child repo because the
- * flatpak_dir_pull() call above might not copy the remote summary
- * into the repo if the "branches" key is set on the remote. */
- if (state->collection_id != NULL &&
- !ostree_repo_regenerate_summary (child_repo, NULL, cancellable, error))
+ if (!child_repo_ensure_summary (child_repo, state, cancellable, error))
return FALSE;
child_repo_path = g_file_get_path (ostree_repo_get_path (child_repo));