Remove support for older ostree without bundle support

This is not needed when we depend on 2016.5
tingping/wmclass
Alexander Larsson 2016-04-21 18:34:28 +02:00
parent 16a02dd6c1
commit 29458bc154
4 changed files with 0 additions and 39 deletions

View File

@ -277,9 +277,6 @@ xdg_app_builtin_build_bundle (int argc, char **argv, GCancellable *cancellable,
repofile = g_file_new_for_commandline_arg (location);
repo = ostree_repo_new (repofile);
if (!xdg_app_supports_bundles (repo))
return xdg_app_fail (error, "Your version of ostree is too old to support single-file bundles");
if (!g_file_query_exists (repofile, cancellable))
return xdg_app_fail (error, "'%s' is not a valid repository", location);

View File

@ -96,9 +96,6 @@ xdg_app_builtin_build_import (int argc, char **argv, GCancellable *cancellable,
repofile = g_file_new_for_commandline_arg (location);
repo = ostree_repo_new (repofile);
if (!xdg_app_supports_bundles (repo))
return xdg_app_fail (error, "Your version of ostree is too old to support single-file bundles");
if (!g_file_query_exists (repofile, cancellable))
return xdg_app_fail (error, "'%s' is not a valid repository", location);

View File

@ -1161,34 +1161,6 @@ xdg_app_connection_track_name_owners (GDBusConnection *connection)
NULL, NULL);
}
gboolean
xdg_app_supports_bundles (OstreeRepo *repo)
{
g_autofree char *tmpfile = g_build_filename (g_get_tmp_dir (), ".xdg-app-test-ostree-XXXXXX", NULL);
g_autoptr(GFile) file = NULL;
g_autoptr(GError) error = NULL;
int fd;
gboolean res;
fd = g_mkstemp (tmpfile);
if (fd == -1)
return FALSE;
close (fd);
res = TRUE;
file = g_file_new_for_path (tmpfile);
if (!ostree_repo_static_delta_execute_offline (repo, file, FALSE, NULL, &error))
{
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY))
res = FALSE;
}
unlink (tmpfile);
return res;
}
typedef struct
{
GError *error;
@ -2720,9 +2692,6 @@ xdg_app_pull_from_bundle (OstreeRepo *repo,
g_autoptr(GVariant) metadata = NULL;
gboolean metadata_valid;
if (!xdg_app_supports_bundles (repo))
return xdg_app_fail (error, "Your version of ostree is too old to support single-file bundles");
metadata = xdg_app_bundle_load (file, &to_checksum, NULL, NULL, NULL, NULL, error);
if (metadata == NULL)
return FALSE;

View File

@ -94,8 +94,6 @@ gboolean xdg_app_remove_dangling_symlinks (GFile *dir,
GCancellable *cancellable,
GError **error);
gboolean xdg_app_supports_bundles (OstreeRepo *repo);
void xdg_app_invocation_lookup_app_id (GDBusMethodInvocation *invocation,
GCancellable *cancellable,
GAsyncReadyCallback callback,