diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-08-13 12:04:37 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2018-08-13 12:04:37 +0200 |
commit | 4f809e238700fee9ba6c140dad72bb75662f7cc7 (patch) | |
tree | 4606b82696fdd6979adaca1d6d44779378c28f4a | |
parent | 90be1f7515b870b509c55ca6771a1e6521a678f7 (diff) | |
download | flatpak-re-fix-p2p-downgrades.tar.gz |
Fix regression from #1961 which broke the testsre-fix-p2p-downgrades
Sometimes (for example in some test-repo-collections.sh test that broke) we
update from a remote with an older ostree-metadata branch, and the
check for downgrades broke in this case.
Its unclear exactly what it the best solution here, maybe to silently
disallow the update. However, this change instead just re-allows the
downgrade for this particular case so we get the old behaviour.
-rw-r--r-- | common/flatpak-dir.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 557722c9..6ca35602 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -11324,6 +11324,13 @@ _flatpak_dir_fetch_remote_state_metadata_branch (FlatpakDir *self, flatpak_flags = FLATPAK_PULL_FLAGS_DOWNLOAD_EXTRA_DATA; flatpak_flags |= FLATPAK_PULL_FLAGS_NO_STATIC_DELTAS; + /* TODO: This is somewhat weird. as it means downgrade the ostree-metadata branch + * if the currently available branch is older. However, it matches what we did before + * PR #1961 where we started disallowing downgrades in p2p updates. + * Long term we should have a better solution to this. + */ + flatpak_flags |= FLATPAK_PULL_FLAGS_ALLOW_DOWNGRADE; + if (flatpak_dir_use_system_helper (self, NULL)) { g_autoptr(OstreeRepo) child_repo = NULL; |