build-update-repo: Remove unwanted deltas before updating summary

The list of deltas is stored in the summary, so we need to delete
them before we generate the summary, not before.

This means there is a short period where people may use the old summary
which references the old, now deleted summaries. However, that is
better than it referencing the deleted deltas forever.
This commit is contained in:
Alexander Larsson committed 2017-05-30 15:16:12 +02:00
1 parent 475dde6263
commit f616ada02b
1 file changed
+4 -4
+4 -4
View File
@@ -453,10 +453,6 @@ flatpak_builtin_build_update_repo (int argc, char **argv,
!generate_all_deltas (repo, &unwanted_deltas, cancellable, error))
return FALSE;
g_print (_("Updating summary\n"));
if (!flatpak_repo_update (repo, (const char **) opt_gpg_key_ids, opt_gpg_homedir, cancellable, error))
return FALSE;
if (unwanted_deltas != NULL)
{
int i;
@@ -470,6 +466,10 @@ flatpak_builtin_build_update_repo (int argc, char **argv,
}
}
g_print (_("Updating summary\n"));
if (!flatpak_repo_update (repo, (const char **) opt_gpg_key_ids, opt_gpg_homedir, cancellable, error))
return FALSE;
if (opt_prune)
{
gint n_objects_total;