summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2018-02-19 08:05:16 -0800
committerMatthew Leeds <matthew.leeds@endlessm.com>2018-02-19 08:05:16 -0800
commitc94bcbbdca5b688065fdbf99dbea4334d903cbfc (patch)
tree6b8107f16e0e1a931c8170a74a4885a89c3fa284
parentacc1df7acd26e441e7f8ace97925a1f9bbcf8eed (diff)
downloadflatpak-mwleeds/fix-p2p-build.tar.gz
dir: Fix P2P build failuremwleeds/fix-p2p-build
Apparently when I rebased https://github.com/flatpak/flatpak/pull/1314 to master, git cleanly applied the patch in a different place than it was originally. Commit c5ab9e22b moved the find_remotes_async() call to find_latest_rev(), so all that needs to be done is pass along the checksum in check_for_update(). This way when you're trying to downgrade something the specified commit will be searched for instead of the latest one. Fixes https://github.com/flatpak/flatpak/issues/1431
-rw-r--r--common/flatpak-dir.c5
-rw-r--r--common/flatpak-dir.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index 3d96145f..9a6517ed 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -1998,6 +1998,7 @@ gboolean
flatpak_dir_find_latest_rev (FlatpakDir *self,
const char *remote,
const char *ref,
+ const char *checksum_or_latest,
char **out_rev,
OstreeRepoFinderResult ***out_results,
GCancellable *cancellable,
@@ -2115,7 +2116,7 @@ flatpak_dir_check_for_appstream_update (FlatpakDir *self,
branch = g_strdup_printf ("appstream/%s", arch);
- if (!flatpak_dir_find_latest_rev (self, remote, branch, &new_checksum,
+ if (!flatpak_dir_find_latest_rev (self, remote, branch, NULL, &new_checksum,
NULL, NULL, &local_error))
{
if (g_strcmp0 (arch, flatpak_get_arch ()) == 0)
@@ -6684,7 +6685,7 @@ flatpak_dir_check_for_update (FlatpakDir *self,
}
else
{
- if (!flatpak_dir_find_latest_rev (self, remote_name, ref, &latest_rev,
+ if (!flatpak_dir_find_latest_rev (self, remote_name, ref, checksum_or_latest, &latest_rev,
out_results, cancellable, error))
return FALSE;
}
diff --git a/common/flatpak-dir.h b/common/flatpak-dir.h
index 1964a650..9740ab10 100644
--- a/common/flatpak-dir.h
+++ b/common/flatpak-dir.h
@@ -346,6 +346,7 @@ gboolean flatpak_dir_deploy_appstream (FlatpakDir *self,
gboolean flatpak_dir_find_latest_rev (FlatpakDir *self,
const char *remote,
const char *ref,
+ const char *checksum_or_latest,
char **out_rev,
OstreeRepoFinderResult ***out_results,
GCancellable *cancellable,