New upstream version 2018.5+42+gecdebeb2
This commit is contained in:
commit
f92733af4a
112 files changed
+4463
-3226
No files matched your search
@@ -18,13 +18,66 @@
|
||||
***/
|
||||
|
||||
/* Add new symbols here. Release commits should copy this section into -released.sym. */
|
||||
LIBOSTREE_2018.6 {
|
||||
global:
|
||||
ostree_collection_ref_dup;
|
||||
ostree_collection_ref_dupv;
|
||||
ostree_collection_ref_equal;
|
||||
ostree_collection_ref_free;
|
||||
ostree_collection_ref_freev;
|
||||
ostree_collection_ref_get_type;
|
||||
ostree_collection_ref_hash;
|
||||
ostree_collection_ref_new;
|
||||
ostree_remote_get_name;
|
||||
ostree_remote_get_type;
|
||||
ostree_remote_get_url;
|
||||
ostree_remote_ref;
|
||||
ostree_remote_unref;
|
||||
ostree_repo_find_remotes_async;
|
||||
ostree_repo_find_remotes_finish;
|
||||
ostree_repo_finder_avahi_get_type;
|
||||
ostree_repo_finder_avahi_new;
|
||||
ostree_repo_finder_avahi_start;
|
||||
ostree_repo_finder_avahi_stop;
|
||||
ostree_repo_finder_config_get_type;
|
||||
ostree_repo_finder_config_new;
|
||||
ostree_repo_finder_get_type;
|
||||
ostree_repo_finder_mount_get_type;
|
||||
ostree_repo_finder_mount_new;
|
||||
ostree_repo_finder_override_add_uri;
|
||||
ostree_repo_finder_override_get_type;
|
||||
ostree_repo_finder_override_new;
|
||||
ostree_repo_finder_resolve_all_async;
|
||||
ostree_repo_finder_resolve_all_finish;
|
||||
ostree_repo_finder_resolve_async;
|
||||
ostree_repo_finder_resolve_finish;
|
||||
ostree_repo_finder_result_compare;
|
||||
ostree_repo_finder_result_dup;
|
||||
ostree_repo_finder_result_free;
|
||||
ostree_repo_finder_result_freev;
|
||||
ostree_repo_finder_result_get_type;
|
||||
ostree_repo_finder_result_new;
|
||||
ostree_repo_get_collection_id;
|
||||
ostree_repo_list_collection_refs;
|
||||
ostree_repo_pull_from_remotes_async;
|
||||
ostree_repo_pull_from_remotes_finish;
|
||||
ostree_repo_remote_list_collection_refs;
|
||||
ostree_repo_resolve_collection_ref;
|
||||
ostree_repo_resolve_keyring_for_collection;
|
||||
ostree_repo_set_collection_id;
|
||||
ostree_repo_set_collection_ref_immediate;
|
||||
ostree_repo_transaction_set_collection_ref;
|
||||
ostree_repo_traverse_reachable_refs;
|
||||
ostree_sysroot_cleanup_prune_repo;
|
||||
ostree_validate_collection_id;
|
||||
} LIBOSTREE_2018.5;
|
||||
|
||||
/* Stub section for the stable release *after* this development one; don't
|
||||
* edit this other than to update the last number. This is just a copy/paste
|
||||
* source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION
|
||||
* with whatever the next version with new symbols will be.
|
||||
LIBOSTREE_2017.$NEWVERSION {
|
||||
LIBOSTREE_2018.$NEWVERSION {
|
||||
global:
|
||||
someostree_symbol_deleteme;
|
||||
} LIBOSTREE_2017.$LASTSTABLE;
|
||||
} LIBOSTREE_2018.$LASTSTABLE;
|
||||
*/
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2017 Endless Mobile, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors:
|
||||
* - Philip Withnall <withnall@endlessm.com>
|
||||
*/
|
||||
|
||||
/* Symbols in this file are added to the build if OSTree is configured with
|
||||
* --enable-experimental-api. They are not stable or officially supported, and
|
||||
* might disappear or change in future releases. */
|
||||
|
||||
LIBOSTREE_2017.6_EXPERIMENTAL {
|
||||
global:
|
||||
ostree_remote_ref;
|
||||
ostree_remote_unref;
|
||||
} LIBOSTREE_2017.6;
|
||||
|
||||
LIBOSTREE_2017.7_EXPERIMENTAL {
|
||||
global:
|
||||
ostree_remote_get_name;
|
||||
} LIBOSTREE_2017.6_EXPERIMENTAL;
|
||||
|
||||
LIBOSTREE_2017.8_EXPERIMENTAL {
|
||||
global:
|
||||
ostree_collection_ref_dup;
|
||||
ostree_collection_ref_dupv;
|
||||
ostree_collection_ref_equal;
|
||||
ostree_collection_ref_free;
|
||||
ostree_collection_ref_freev;
|
||||
ostree_collection_ref_get_type;
|
||||
ostree_collection_ref_hash;
|
||||
ostree_collection_ref_new;
|
||||
ostree_repo_find_remotes_async;
|
||||
ostree_repo_find_remotes_finish;
|
||||
ostree_repo_finder_avahi_get_type;
|
||||
ostree_repo_finder_avahi_new;
|
||||
ostree_repo_finder_avahi_start;
|
||||
ostree_repo_finder_avahi_stop;
|
||||
ostree_repo_finder_config_get_type;
|
||||
ostree_repo_finder_config_new;
|
||||
ostree_repo_finder_get_type;
|
||||
ostree_repo_finder_mount_get_type;
|
||||
ostree_repo_finder_mount_new;
|
||||
ostree_repo_finder_resolve_async;
|
||||
ostree_repo_finder_resolve_all_async;
|
||||
ostree_repo_finder_resolve_all_finish;
|
||||
ostree_repo_finder_resolve_finish;
|
||||
ostree_repo_finder_result_compare;
|
||||
ostree_repo_finder_result_dup;
|
||||
ostree_repo_finder_result_free;
|
||||
ostree_repo_finder_result_freev;
|
||||
ostree_repo_finder_result_get_type;
|
||||
ostree_repo_finder_result_new;
|
||||
ostree_repo_get_collection_id;
|
||||
ostree_repo_list_collection_refs;
|
||||
ostree_repo_pull_from_remotes_async;
|
||||
ostree_repo_pull_from_remotes_finish;
|
||||
ostree_repo_remote_list_collection_refs;
|
||||
ostree_repo_resolve_keyring_for_collection;
|
||||
ostree_repo_set_collection_id;
|
||||
ostree_repo_set_collection_ref_immediate;
|
||||
ostree_repo_transaction_set_collection_ref;
|
||||
ostree_validate_collection_id;
|
||||
} LIBOSTREE_2017.7_EXPERIMENTAL;
|
||||
|
||||
LIBOSTREE_2017.12_EXPERIMENTAL {
|
||||
global:
|
||||
ostree_repo_resolve_collection_ref;
|
||||
} LIBOSTREE_2017.8_EXPERIMENTAL;
|
||||
|
||||
LIBOSTREE_2017.13_EXPERIMENTAL {
|
||||
global:
|
||||
ostree_repo_finder_override_add_uri;
|
||||
ostree_repo_finder_override_get_type;
|
||||
ostree_repo_finder_override_new;
|
||||
} LIBOSTREE_2017.12_EXPERIMENTAL;
|
||||
|
||||
LIBOSTREE_2017.14_EXPERIMENTAL {
|
||||
global:
|
||||
ostree_remote_get_type;
|
||||
ostree_remote_get_url;
|
||||
} LIBOSTREE_2017.13_EXPERIMENTAL;
|
||||
@@ -60,7 +60,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeSysrootUpgrader, g_object_unref)
|
||||
|
||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (OstreeRepoCommitTraverseIter, ostree_repo_commit_traverse_iter_clear)
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeCollectionRef, ostree_collection_ref_free)
|
||||
G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeCollectionRefv, ostree_collection_ref_freev, NULL)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRemote, ostree_remote_unref)
|
||||
@@ -71,7 +70,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderMount, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderOverride, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderResult, ostree_repo_finder_result_free)
|
||||
G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeRepoFinderResultv, ostree_repo_finder_result_freev, NULL)
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "libglnx.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
|
||||
@@ -140,6 +140,10 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self,
|
||||
if (val)
|
||||
g_ptr_array_add (new_lines, g_strdup_printf ("ramdisk_image%s=%s", index_suffix, val));
|
||||
|
||||
val = ostree_bootconfig_parser_get (config, "devicetree");
|
||||
if (val)
|
||||
g_ptr_array_add (new_lines, g_strdup_printf ("fdt_file%s=%s", index_suffix, val));
|
||||
|
||||
val = ostree_bootconfig_parser_get (config, "options");
|
||||
if (val)
|
||||
{
|
||||
|
||||
@@ -207,10 +207,6 @@ _ostree_raw_file_to_archive_stream (GInputStream *input,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#ifndef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
gboolean ostree_validate_collection_id (const char *collection_id, GError **error);
|
||||
#endif /* !OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
gboolean
|
||||
_ostree_compare_timestamps (const char *current_rev,
|
||||
guint64 current_ts,
|
||||
@@ -218,28 +214,4 @@ _ostree_compare_timestamps (const char *current_rev,
|
||||
guint64 new_ts,
|
||||
GError **error);
|
||||
|
||||
#if (defined(OSTREE_COMPILATION) || GLIB_CHECK_VERSION(2, 44, 0)) && !defined(OSTREE_ENABLE_EXPERIMENTAL_API)
|
||||
#include <libglnx.h>
|
||||
#include "ostree-ref.h"
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeCollectionRef, ostree_collection_ref_free)
|
||||
G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeCollectionRefv, ostree_collection_ref_freev, NULL)
|
||||
|
||||
#include "ostree-repo-finder.h"
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinder, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderResult, ostree_repo_finder_result_free)
|
||||
G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeRepoFinderResultv, ostree_repo_finder_result_freev, NULL)
|
||||
|
||||
#include "ostree-repo-finder-avahi.h"
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderAvahi, g_object_unref)
|
||||
|
||||
#include "ostree-repo-finder-config.h"
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderConfig, g_object_unref)
|
||||
|
||||
#include "ostree-repo-finder-mount.h"
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderMount, g_object_unref)
|
||||
|
||||
#include "ostree-repo-finder-override.h"
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderOverride, g_object_unref)
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
@@ -302,6 +302,7 @@ ostree_validate_remote_name (const char *remote_name,
|
||||
*
|
||||
* Returns: %TRUE if @collection_id is a valid collection ID, %FALSE if it is invalid
|
||||
* or %NULL
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_validate_collection_id (const char *collection_id, GError **error)
|
||||
|
||||
@@ -271,11 +271,9 @@ typedef enum {
|
||||
* This is most useful in concert with `OSTREE_COMMIT_META_KEY_REF_BINDING`,
|
||||
* as it more strongly binds the commit to the repository and branch.
|
||||
*
|
||||
* Since: 2017.9
|
||||
* Since: 2018.6
|
||||
*/
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
#define OSTREE_COMMIT_META_KEY_COLLECTION_BINDING "ostree.collection-binding"
|
||||
#endif
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
const GVariantType *ostree_metadata_variant_type (OstreeObjectType objtype);
|
||||
@@ -324,10 +322,8 @@ int ostree_cmp_checksum_bytes (const guchar *a, const guchar *b);
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_validate_rev (const char *rev, GError **error);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_validate_collection_id (const char *collection_id, GError **error);
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_validate_remote_name (const char *remote_name, GError **error);
|
||||
|
||||
@@ -337,19 +337,7 @@ check_multi_info (OstreeFetcher *fetcher)
|
||||
curl_easy_getinfo (easy, CURLINFO_RESPONSE_CODE, &response);
|
||||
if (!is_file && !(response >= 200 && response < 300))
|
||||
{
|
||||
GIOErrorEnum giocode;
|
||||
|
||||
/* TODO - share with soup */
|
||||
switch (response)
|
||||
{
|
||||
case 404:
|
||||
case 403:
|
||||
case 410:
|
||||
giocode = G_IO_ERROR_NOT_FOUND;
|
||||
break;
|
||||
default:
|
||||
giocode = G_IO_ERROR_FAILED;
|
||||
}
|
||||
GIOErrorEnum giocode = _ostree_fetcher_http_status_code_to_io_error (response);
|
||||
|
||||
if (req->idx + 1 == req->mirrorlist->len)
|
||||
{
|
||||
|
||||
@@ -1070,15 +1070,27 @@ on_request_sent (GObject *object,
|
||||
soup_uri_to_string (soup_request_get_uri (pending->request), FALSE);
|
||||
|
||||
GIOErrorEnum code;
|
||||
|
||||
switch (msg->status_code)
|
||||
{
|
||||
case 404:
|
||||
case 403:
|
||||
case 410:
|
||||
code = G_IO_ERROR_NOT_FOUND;
|
||||
/* These statuses are internal to libsoup, and not standard HTTP ones: */
|
||||
case SOUP_STATUS_CANCELLED:
|
||||
code = G_IO_ERROR_CANCELLED;
|
||||
break;
|
||||
case SOUP_STATUS_CANT_RESOLVE:
|
||||
case SOUP_STATUS_CANT_CONNECT:
|
||||
code = G_IO_ERROR_HOST_NOT_FOUND;
|
||||
break;
|
||||
case SOUP_STATUS_IO_ERROR:
|
||||
#if !GLIB_CHECK_VERSION(2, 44, 0)
|
||||
code = G_IO_ERROR_BROKEN_PIPE;
|
||||
#else
|
||||
code = G_IO_ERROR_CONNECTION_CLOSED;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
code = G_IO_ERROR_FAILED;
|
||||
code = _ostree_fetcher_http_status_code_to_io_error (msg->status_code);
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -52,15 +52,15 @@ fetch_uri_sync_on_complete (GObject *object,
|
||||
data->done = TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
|
||||
GPtrArray *mirrorlist,
|
||||
const char *filename,
|
||||
OstreeFetcherRequestFlags flags,
|
||||
GBytes **out_contents,
|
||||
guint64 max_size,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
static gboolean
|
||||
_ostree_fetcher_mirrored_request_to_membuf_once (OstreeFetcher *fetcher,
|
||||
GPtrArray *mirrorlist,
|
||||
const char *filename,
|
||||
OstreeFetcherRequestFlags flags,
|
||||
GBytes **out_contents,
|
||||
guint64 max_size,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
g_autoptr(GMainContext) mainctx = NULL;
|
||||
@@ -108,11 +108,42 @@ _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
|
||||
GPtrArray *mirrorlist,
|
||||
const char *filename,
|
||||
OstreeFetcherRequestFlags flags,
|
||||
guint n_network_retries,
|
||||
GBytes **out_contents,
|
||||
guint64 max_size,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(GError) local_error = NULL;
|
||||
guint n_retries_remaining = n_network_retries;
|
||||
|
||||
do
|
||||
{
|
||||
g_clear_error (&local_error);
|
||||
if (_ostree_fetcher_mirrored_request_to_membuf_once (fetcher, mirrorlist,
|
||||
filename, flags,
|
||||
out_contents, max_size,
|
||||
cancellable, &local_error))
|
||||
return TRUE;
|
||||
}
|
||||
while (_ostree_fetcher_should_retry_request (local_error, n_retries_remaining--));
|
||||
|
||||
g_assert (local_error != NULL);
|
||||
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Helper for callers who just want to fetch single one-off URIs */
|
||||
gboolean
|
||||
_ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher,
|
||||
OstreeFetcherURI *uri,
|
||||
OstreeFetcherRequestFlags flags,
|
||||
guint n_network_retries,
|
||||
GBytes **out_contents,
|
||||
guint64 max_size,
|
||||
GCancellable *cancellable,
|
||||
@@ -121,7 +152,7 @@ _ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher,
|
||||
g_autoptr(GPtrArray) mirrorlist = g_ptr_array_new ();
|
||||
g_ptr_array_add (mirrorlist, uri); /* no transfer */
|
||||
return _ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, NULL, flags,
|
||||
out_contents, max_size,
|
||||
n_network_retries, out_contents, max_size,
|
||||
cancellable, error);
|
||||
}
|
||||
|
||||
@@ -144,3 +175,65 @@ _ostree_fetcher_journal_failure (const char *remote_name,
|
||||
NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Check whether a particular operation should be retried. This is entirely
|
||||
* based on how it failed (if at all) last time, and whether the operation has
|
||||
* some retries left. The retry count is set when the operation is first
|
||||
* created, and must be decremented by the caller. (@n_retries_remaining == 0)
|
||||
* will always return %FALSE from this function.
|
||||
*
|
||||
* FIXME: In future, we may decide to use transient failures like this as a hint
|
||||
* to prioritise other mirrors for a particular pull operation (for example). */
|
||||
gboolean
|
||||
_ostree_fetcher_should_retry_request (const GError *error,
|
||||
guint n_retries_remaining)
|
||||
{
|
||||
if (error == NULL)
|
||||
g_debug ("%s: error: unset, n_retries_remaining: %u",
|
||||
G_STRFUNC, n_retries_remaining);
|
||||
else
|
||||
g_debug ("%s: error: %u:%u %s, n_retries_remaining: %u",
|
||||
G_STRFUNC, error->domain, error->code, error->message,
|
||||
n_retries_remaining);
|
||||
|
||||
if (error == NULL || n_retries_remaining == 0)
|
||||
return FALSE;
|
||||
|
||||
/* Return TRUE for transient errors. */
|
||||
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT) ||
|
||||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND) ||
|
||||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE) ||
|
||||
#if !GLIB_CHECK_VERSION(2, 44, 0)
|
||||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE) ||
|
||||
#else
|
||||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED) ||
|
||||
#endif
|
||||
g_error_matches (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND) ||
|
||||
g_error_matches (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_TEMPORARY_FAILURE))
|
||||
{
|
||||
g_debug ("Should retry request (remaining: %u retries), due to transient error: %s",
|
||||
n_retries_remaining, error->message);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Convert a HTTP status code representing an error from libsoup or libcurl to
|
||||
* a #GIOError. This will return %G_IO_ERROR_FAILED if the status code is
|
||||
* unknown or otherwise unhandled. */
|
||||
GIOError
|
||||
_ostree_fetcher_http_status_code_to_io_error (guint status_code)
|
||||
{
|
||||
switch (status_code)
|
||||
{
|
||||
case 403: /* SOUP_STATUS_FORBIDDEN */
|
||||
case 404: /* SOUP_STATUS_NOT_FOUND */
|
||||
case 410: /* SOUP_STATUS_GONE */
|
||||
return G_IO_ERROR_NOT_FOUND;
|
||||
case 408: /* SOUP_STATUS_REQUEST_TIMEOUT */
|
||||
return G_IO_ERROR_TIMED_OUT;
|
||||
default:
|
||||
return G_IO_ERROR_FAILED;
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,7 @@ gboolean _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
|
||||
GPtrArray *mirrorlist,
|
||||
const char *filename,
|
||||
OstreeFetcherRequestFlags flags,
|
||||
guint n_network_retries,
|
||||
GBytes **out_contents,
|
||||
guint64 max_size,
|
||||
GCancellable *cancellable,
|
||||
@@ -64,6 +65,7 @@ gboolean _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
|
||||
gboolean _ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher,
|
||||
OstreeFetcherURI *uri,
|
||||
OstreeFetcherRequestFlags flags,
|
||||
guint n_network_retries,
|
||||
GBytes **out_contents,
|
||||
guint64 max_size,
|
||||
GCancellable *cancellable,
|
||||
@@ -73,6 +75,10 @@ void _ostree_fetcher_journal_failure (const char *remote_name,
|
||||
const char *url,
|
||||
const char *msg);
|
||||
|
||||
gboolean _ostree_fetcher_should_retry_request (const GError *error,
|
||||
guint n_retries_remaining);
|
||||
|
||||
GIOError _ostree_fetcher_http_status_code_to_io_error (guint status_code);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ struct OstreeMetalink
|
||||
OstreeFetcher *fetcher;
|
||||
char *requested_file;
|
||||
guint64 max_size;
|
||||
guint n_network_retries;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (OstreeMetalink, _ostree_metalink, G_TYPE_OBJECT)
|
||||
@@ -401,7 +402,8 @@ OstreeMetalink *
|
||||
_ostree_metalink_new (OstreeFetcher *fetcher,
|
||||
const char *requested_file,
|
||||
guint64 max_size,
|
||||
OstreeFetcherURI *uri)
|
||||
OstreeFetcherURI *uri,
|
||||
guint n_network_retries)
|
||||
{
|
||||
OstreeMetalink *self = (OstreeMetalink*)g_object_new (OSTREE_TYPE_METALINK, NULL);
|
||||
|
||||
@@ -409,6 +411,7 @@ _ostree_metalink_new (OstreeFetcher *fetcher,
|
||||
self->requested_file = g_strdup (requested_file);
|
||||
self->max_size = max_size;
|
||||
self->uri = _ostree_fetcher_uri_clone (uri);
|
||||
self->n_network_retries = n_network_retries;
|
||||
|
||||
return self;
|
||||
}
|
||||
@@ -432,7 +435,9 @@ try_one_url (OstreeMetalinkRequest *self,
|
||||
gssize n_bytes;
|
||||
|
||||
if (!_ostree_fetcher_request_uri_to_membuf (self->metalink->fetcher,
|
||||
uri, 0, &bytes,
|
||||
uri, 0,
|
||||
self->metalink->n_network_retries,
|
||||
&bytes,
|
||||
self->metalink->max_size,
|
||||
self->cancellable,
|
||||
error))
|
||||
@@ -613,6 +618,7 @@ _ostree_metalink_request_sync (OstreeMetalink *self,
|
||||
request.parser = g_markup_parse_context_new (&metalink_parser, G_MARKUP_PREFIX_ERROR_POSITION, &request, NULL);
|
||||
|
||||
if (!_ostree_fetcher_request_uri_to_membuf (self->fetcher, self->uri, 0,
|
||||
self->n_network_retries,
|
||||
&contents, self->max_size,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
@@ -48,7 +48,8 @@ GType _ostree_metalink_get_type (void) G_GNUC_CONST;
|
||||
OstreeMetalink *_ostree_metalink_new (OstreeFetcher *fetcher,
|
||||
const char *requested_file,
|
||||
guint64 max_size,
|
||||
OstreeFetcherURI *uri);
|
||||
OstreeFetcherURI *uri,
|
||||
guint n_network_retries);
|
||||
|
||||
gboolean _ostree_metalink_request_sync (OstreeMetalink *self,
|
||||
OstreeFetcherURI **out_target_uri,
|
||||
|
||||
@@ -48,7 +48,7 @@ G_DEFINE_BOXED_TYPE (OstreeCollectionRef, ostree_collection_ref,
|
||||
* operations.
|
||||
*
|
||||
* Returns: (transfer full): a new #OstreeCollectionRef
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeCollectionRef *
|
||||
ostree_collection_ref_new (const gchar *collection_id,
|
||||
@@ -74,7 +74,7 @@ ostree_collection_ref_new (const gchar *collection_id,
|
||||
* Create a copy of the given @ref.
|
||||
*
|
||||
* Returns: (transfer full): a newly allocated copy of @ref
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeCollectionRef *
|
||||
ostree_collection_ref_dup (const OstreeCollectionRef *ref)
|
||||
@@ -90,7 +90,7 @@ ostree_collection_ref_dup (const OstreeCollectionRef *ref)
|
||||
*
|
||||
* Free the given @ref.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_collection_ref_free (OstreeCollectionRef *ref)
|
||||
@@ -110,7 +110,7 @@ ostree_collection_ref_free (OstreeCollectionRef *ref)
|
||||
* @ref must be non-%NULL.
|
||||
*
|
||||
* Returns: hash value for @ref
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
guint
|
||||
ostree_collection_ref_hash (gconstpointer ref)
|
||||
@@ -132,7 +132,7 @@ ostree_collection_ref_hash (gconstpointer ref)
|
||||
* ref name, and %FALSE otherwise. Both @ref1 and @ref2 must be non-%NULL.
|
||||
*
|
||||
* Returns: %TRUE if @ref1 and @ref2 are equal, %FALSE otherwise
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_collection_ref_equal (gconstpointer ref1,
|
||||
@@ -153,7 +153,7 @@ ostree_collection_ref_equal (gconstpointer ref1,
|
||||
* %NULL.
|
||||
*
|
||||
* Returns: (transfer full) (array zero-terminated=1): a newly allocated copy of @refs
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeCollectionRef **
|
||||
ostree_collection_ref_dupv (const OstreeCollectionRef * const *refs)
|
||||
@@ -179,7 +179,7 @@ ostree_collection_ref_dupv (const OstreeCollectionRef * const *refs)
|
||||
* Free the given array of @refs, including freeing all its elements. @refs
|
||||
* must be %NULL-terminated; it may be empty, but must not be %NULL.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_collection_ref_freev (OstreeCollectionRef **refs)
|
||||
|
||||
@@ -42,7 +42,7 @@ G_BEGIN_DECLS
|
||||
* (@collection_id, @ref_name). For backwards compatibility, @collection_id may be %NULL,
|
||||
* indicating a ref name which is not globally unique.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
@@ -82,7 +82,7 @@ void ostree_collection_ref_freev (OstreeCollectionRef **refs);
|
||||
* g_auto(OstreeCollectionRefv) refs = NULL;
|
||||
* ]|
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
typedef OstreeCollectionRef** OstreeCollectionRefv;
|
||||
|
||||
|
||||
@@ -60,8 +60,4 @@ G_GNUC_INTERNAL
|
||||
OstreeRemote *ostree_remote_new_from_keyfile (GKeyFile *keyfile,
|
||||
const gchar *group);
|
||||
|
||||
#if (defined(OSTREE_COMPILATION) || GLIB_CHECK_VERSION(2, 44, 0)) && !defined(OSTREE_ENABLE_EXPERIMENTAL_API)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRemote, ostree_remote_unref)
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
@@ -50,7 +50,7 @@
|
||||
* refs are currently on a remote, or the commits they currently point to. Use
|
||||
* #OstreeRepo in combination with an #OstreeRemote to query that information.
|
||||
*
|
||||
* Since: 2017.6
|
||||
* Since: 2018.6
|
||||
*/
|
||||
|
||||
OstreeRemote *
|
||||
@@ -119,7 +119,7 @@ ostree_remote_new_from_keyfile (GKeyFile *keyfile,
|
||||
* Increase the reference count on the given @remote.
|
||||
*
|
||||
* Returns: (transfer full): a copy of @remote, for convenience
|
||||
* Since: 2017.6
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeRemote *
|
||||
ostree_remote_ref (OstreeRemote *remote)
|
||||
@@ -138,7 +138,7 @@ ostree_remote_ref (OstreeRemote *remote)
|
||||
* Decrease the reference count on the given @remote and free it if the
|
||||
* reference count reaches 0.
|
||||
*
|
||||
* Since: 2017.6
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_remote_unref (OstreeRemote *remote)
|
||||
@@ -158,11 +158,9 @@ ostree_remote_unref (OstreeRemote *remote)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
G_DEFINE_BOXED_TYPE(OstreeRemote, ostree_remote,
|
||||
ostree_remote_ref,
|
||||
ostree_remote_unref);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ostree_remote_get_name:
|
||||
@@ -173,7 +171,7 @@ G_DEFINE_BOXED_TYPE(OstreeRemote, ostree_remote,
|
||||
* arbitrary, string.
|
||||
*
|
||||
* Returns: remote’s name
|
||||
* Since: 2017.7
|
||||
* Since: 2018.6
|
||||
*/
|
||||
const gchar *
|
||||
ostree_remote_get_name (OstreeRemote *remote)
|
||||
@@ -191,7 +189,7 @@ ostree_remote_get_name (OstreeRemote *remote)
|
||||
* Get the URL from the remote.
|
||||
*
|
||||
* Returns: (transfer full): the remote's URL
|
||||
* Since: 2017.14
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gchar *
|
||||
ostree_remote_get_url (OstreeRemote *remote)
|
||||
|
||||
@@ -42,12 +42,8 @@ G_BEGIN_DECLS
|
||||
* remotes can only be passed around as (reference counted) opaque handles. In
|
||||
* future, more API may be added to create and interrogate them.
|
||||
*
|
||||
* Since: 2017.6
|
||||
* Since: 2018.6
|
||||
*/
|
||||
#ifndef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
/* This is in ostree-types.h otherwise */
|
||||
typedef struct OstreeRemote OstreeRemote;
|
||||
#endif
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
GType ostree_remote_get_type (void) G_GNUC_CONST;
|
||||
|
||||
@@ -1961,7 +1961,7 @@ ostree_repo_transaction_set_ref (OstreeRepo *self,
|
||||
*
|
||||
* Multithreading: Since v2017.15 this function is MT safe.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_transaction_set_collection_ref (OstreeRepo *self,
|
||||
@@ -2045,7 +2045,7 @@ ostree_repo_set_alias_ref_immediate (OstreeRepo *self,
|
||||
* case where we're creating or overwriting an existing ref.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE otherwise
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_set_collection_ref_immediate (OstreeRepo *self,
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <avahi-common/strlst.h>
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <libglnx.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ostree-autocleanups.h"
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include <avahi-common/strlst.h>
|
||||
#include <avahi-glib/glib-malloc.h>
|
||||
#include <avahi-glib/glib-watch.h>
|
||||
#include <libsoup/soup.h>
|
||||
#include <netinet/in.h>
|
||||
#include <string.h>
|
||||
#endif /* HAVE_AVAHI */
|
||||
@@ -44,6 +43,7 @@
|
||||
#include <gio/gio.h>
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <libglnx.h>
|
||||
|
||||
#include "ostree-autocleanups.h"
|
||||
#include "ostree-repo-finder.h"
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "ostree-repo-private.h"
|
||||
#include "ostree-repo.h"
|
||||
#include "ostree-repo-finder-avahi-private.h"
|
||||
#include "ostree-soup-uri.h"
|
||||
#include "otutil.h"
|
||||
#endif /* HAVE_AVAHI */
|
||||
|
||||
@@ -98,7 +99,7 @@
|
||||
* and the resolver is used to retrieve information about services advertised by
|
||||
* each peer, including the services’ TXT records.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
|
||||
#ifdef HAVE_AVAHI
|
||||
@@ -1363,7 +1364,7 @@ ostree_repo_finder_avahi_init (OstreeRepoFinderAvahi *self)
|
||||
* If @context is %NULL, the current thread-default #GMainContext is used.
|
||||
*
|
||||
* Returns: (transfer full): a new #OstreeRepoFinderAvahi
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeRepoFinderAvahi *
|
||||
ostree_repo_finder_avahi_new (GMainContext *context)
|
||||
@@ -1412,7 +1413,7 @@ ostree_repo_finder_avahi_new (GMainContext *context)
|
||||
* #OstreeRepoFinderAvahi instance, or to call it after
|
||||
* ostree_repo_finder_avahi_stop().
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_finder_avahi_start (OstreeRepoFinderAvahi *self,
|
||||
@@ -1494,7 +1495,7 @@ static gboolean stop_cb (gpointer user_data);
|
||||
* #OstreeRepoFinderAvahi instance, or to call it before
|
||||
* ostree_repo_finder_avahi_start().
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_finder_avahi_stop (OstreeRepoFinderAvahi *self)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* intersection is non-empty, that remote is returned as a result. Remotes which
|
||||
* do not have their `collection-id` key configured are ignored.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
|
||||
static void ostree_repo_finder_config_iface_init (OstreeRepoFinderInterface *iface);
|
||||
@@ -234,7 +234,7 @@ ostree_repo_finder_config_iface_init (OstreeRepoFinderInterface *iface)
|
||||
* Create a new #OstreeRepoFinderConfig.
|
||||
*
|
||||
* Returns: (transfer full): a new #OstreeRepoFinderConfig
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeRepoFinderConfig *
|
||||
ostree_repo_finder_config_new (void)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
* The volume monitor used to find mounted volumes can be overridden by setting
|
||||
* #OstreeRepoFinderMount:monitor. By default, g_volume_monitor_get() is used.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
|
||||
typedef GList/*<owned GObject>*/ ObjectList;
|
||||
@@ -649,7 +649,7 @@ ostree_repo_finder_mount_class_init (OstreeRepoFinderMountClass *klass)
|
||||
*
|
||||
* Volume monitor to use to look up mounted volumes when queried.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
g_object_class_install_property (object_class, PROP_MONITOR,
|
||||
g_param_spec_object ("monitor",
|
||||
@@ -680,7 +680,7 @@ ostree_repo_finder_mount_iface_init (OstreeRepoFinderInterface *iface)
|
||||
* be used.
|
||||
*
|
||||
* Returns: (transfer full): a new #OstreeRepoFinderMount
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeRepoFinderMount *
|
||||
ostree_repo_finder_mount_new (GVolumeMonitor *monitor)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
* which uses #OstreeRepoFinder. For production use, #OstreeRepoFinderConfig is
|
||||
* recommended instead.
|
||||
*
|
||||
* Since: 2017.13
|
||||
* Since: 2018.6
|
||||
*/
|
||||
|
||||
static void ostree_repo_finder_override_iface_init (OstreeRepoFinderInterface *iface);
|
||||
@@ -296,7 +296,7 @@ ostree_repo_finder_override_iface_init (OstreeRepoFinderInterface *iface)
|
||||
* Create a new #OstreeRepoFinderOverride.
|
||||
*
|
||||
* Returns: (transfer full): a new #OstreeRepoFinderOverride
|
||||
* Since: 2017.13
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeRepoFinderOverride *
|
||||
ostree_repo_finder_override_new (void)
|
||||
@@ -311,7 +311,7 @@ ostree_repo_finder_override_new (void)
|
||||
* Add the given @uri to the set of URIs which the repo finder will search for
|
||||
* matching refs when ostree_repo_finder_resolve_async() is called on it.
|
||||
*
|
||||
* Since: 2017.13
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_finder_override_add_uri (OstreeRepoFinderOverride *self,
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <gio/gio.h>
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <libglnx.h>
|
||||
|
||||
#include "ostree-autocleanups.h"
|
||||
#include "ostree-core.h"
|
||||
@@ -138,7 +139,7 @@ static void resolve_cb (GObject *obj,
|
||||
* Pass the results to ostree_repo_pull_from_remotes_async() to pull the given
|
||||
* @refs from those remotes.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_finder_resolve_async (OstreeRepoFinder *self,
|
||||
@@ -196,7 +197,7 @@ resolve_cb (GObject *obj,
|
||||
*
|
||||
* Returns: (transfer full) (element-type OstreeRepoFinderResult): array of zero
|
||||
* or more results
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
GPtrArray *
|
||||
ostree_repo_finder_resolve_finish (OstreeRepoFinder *self,
|
||||
@@ -254,7 +255,7 @@ static void resolve_all_finished_one (GTask *task);
|
||||
* A version of ostree_repo_finder_resolve_async() which queries one or more
|
||||
* @finders in parallel and combines the results.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_finder_resolve_all_async (OstreeRepoFinder * const *finders,
|
||||
@@ -411,7 +412,7 @@ resolve_all_finished_one (GTask *task)
|
||||
*
|
||||
* Returns: (transfer full) (element-type OstreeRepoFinderResult): array of zero
|
||||
* or more results
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
GPtrArray *
|
||||
ostree_repo_finder_resolve_all_finish (GAsyncResult *result,
|
||||
@@ -446,7 +447,7 @@ G_DEFINE_BOXED_TYPE (OstreeRepoFinderResult, ostree_repo_finder_result,
|
||||
* are as described in the #OstreeRepoFinderResult documentation.
|
||||
*
|
||||
* Returns: (transfer full): a new #OstreeRepoFinderResult
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeRepoFinderResult *
|
||||
ostree_repo_finder_result_new (OstreeRemote *remote,
|
||||
@@ -480,7 +481,7 @@ ostree_repo_finder_result_new (OstreeRemote *remote,
|
||||
* Copy an #OstreeRepoFinderResult.
|
||||
*
|
||||
* Returns: (transfer full): a newly allocated copy of @result
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeRepoFinderResult *
|
||||
ostree_repo_finder_result_dup (OstreeRepoFinderResult *result)
|
||||
@@ -502,7 +503,7 @@ ostree_repo_finder_result_dup (OstreeRepoFinderResult *result)
|
||||
*
|
||||
* Returns: <0 if @a is ordered before @b, 0 if they are ordered equally,
|
||||
* >0 if @b is ordered before @a
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gint
|
||||
ostree_repo_finder_result_compare (const OstreeRepoFinderResult *a,
|
||||
@@ -549,7 +550,7 @@ ostree_repo_finder_result_compare (const OstreeRepoFinderResult *a,
|
||||
*
|
||||
* Free the given @result.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_finder_result_free (OstreeRepoFinderResult *result)
|
||||
@@ -571,7 +572,7 @@ ostree_repo_finder_result_free (OstreeRepoFinderResult *result)
|
||||
*
|
||||
* Free the given @results array, freeing each element and the container.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
void
|
||||
ostree_repo_finder_result_freev (OstreeRepoFinderResult **results)
|
||||
|
||||
@@ -133,7 +133,7 @@ GPtrArray *ostree_repo_finder_resolve_all_finish (GAsyncResult *result,
|
||||
* ostree_repo_find_remotes_async (2) there was an error in trying to get the
|
||||
* commit metadata (3) the checksum for this ref is %NULL in @ref_to_checksum.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
@@ -176,7 +176,7 @@ void ostree_repo_finder_result_free (OstreeRepoFinderResult *result);
|
||||
* g_auto(OstreeRepoFinderResultv) results = NULL;
|
||||
* ]|
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
typedef OstreeRepoFinderResult** OstreeRepoFinderResultv;
|
||||
|
||||
|
||||
@@ -460,33 +460,4 @@ OstreeRepoAutoLock * _ostree_repo_auto_lock_push (OstreeRepo *self,
|
||||
void _ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *lock);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoAutoLock, _ostree_repo_auto_lock_cleanup)
|
||||
|
||||
#ifndef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
/* These APIs are duplicated in the public headers when doing an
|
||||
* experimental-API build.
|
||||
*/
|
||||
const gchar * ostree_repo_get_collection_id (OstreeRepo *self);
|
||||
gboolean ostree_repo_set_collection_id (OstreeRepo *self,
|
||||
const gchar *collection_id,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_repo_list_collection_refs (OstreeRepo *self,
|
||||
const char *match_collection_id,
|
||||
GHashTable **out_all_refs,
|
||||
OstreeRepoListRefsExtFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void ostree_repo_transaction_set_collection_ref (OstreeRepo *self,
|
||||
const OstreeCollectionRef *ref,
|
||||
const char *checksum);
|
||||
|
||||
gboolean ostree_repo_set_collection_ref_immediate (OstreeRepo *self,
|
||||
const OstreeCollectionRef *ref,
|
||||
const char *checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#endif /* !OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
G_END_DECLS
|
||||
@@ -301,6 +301,64 @@ repo_prune_internal (OstreeRepo *self,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_traverse_reachable_refs:
|
||||
* @self: Repo
|
||||
* @depth: Depth of traversal
|
||||
* @reachable: (element-type GVariant GVariant): Set of reachable objects (will be modified)
|
||||
* @cancellable: Cancellable
|
||||
* @error: Error
|
||||
*
|
||||
* Add all commit objects directly reachable via a ref to @reachable.
|
||||
*
|
||||
* Locking: shared
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_traverse_reachable_refs (OstreeRepo *self,
|
||||
guint depth,
|
||||
GHashTable *reachable,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(OstreeRepoAutoLock) lock =
|
||||
_ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_SHARED, cancellable, error);
|
||||
if (!lock)
|
||||
return FALSE;
|
||||
|
||||
/* Ignoring collections. */
|
||||
g_autoptr(GHashTable) all_refs = NULL; /* (element-type utf8 utf8) */
|
||||
|
||||
if (!ostree_repo_list_refs (self, NULL, &all_refs,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
GLNX_HASH_TABLE_FOREACH_V (all_refs, const char*, checksum)
|
||||
{
|
||||
g_debug ("Finding objects to keep for commit %s", checksum);
|
||||
if (!ostree_repo_traverse_commit_union (self, checksum, depth, reachable,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Using collections. */
|
||||
g_autoptr(GHashTable) all_collection_refs = NULL; /* (element-type OstreeChecksumRef utf8) */
|
||||
|
||||
if (!ostree_repo_list_collection_refs (self, NULL, &all_collection_refs,
|
||||
OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
GLNX_HASH_TABLE_FOREACH_V (all_collection_refs, const char*, checksum)
|
||||
{
|
||||
g_debug ("Finding objects to keep for commit %s", checksum);
|
||||
if (!ostree_repo_traverse_commit_union (self, checksum, depth, reachable,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_prune:
|
||||
* @self: Repo
|
||||
@@ -355,35 +413,8 @@ ostree_repo_prune (OstreeRepo *self,
|
||||
|
||||
if (refs_only)
|
||||
{
|
||||
/* Ignoring collections. */
|
||||
g_autoptr(GHashTable) all_refs = NULL; /* (element-type utf8 utf8) */
|
||||
|
||||
if (!ostree_repo_list_refs (self, NULL, &all_refs,
|
||||
cancellable, error))
|
||||
if (!ostree_repo_traverse_reachable_refs (self, depth, reachable, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
GLNX_HASH_TABLE_FOREACH_V (all_refs, const char*, checksum)
|
||||
{
|
||||
g_debug ("Finding objects to keep for commit %s", checksum);
|
||||
if (!ostree_repo_traverse_commit_union (self, checksum, depth, reachable,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Using collections. */
|
||||
g_autoptr(GHashTable) all_collection_refs = NULL; /* (element-type OstreeChecksumRef utf8) */
|
||||
|
||||
if (!ostree_repo_list_collection_refs (self, NULL, &all_collection_refs,
|
||||
OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
GLNX_HASH_TABLE_FOREACH_V (all_collection_refs, const char*, checksum)
|
||||
{
|
||||
g_debug ("Finding objects to keep for commit %s", checksum);
|
||||
if (!ostree_repo_traverse_commit_union (self, checksum, depth, reachable,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ostree_repo_list_objects (self, OSTREE_REPO_LIST_OBJECTS_ALL | OSTREE_REPO_LIST_OBJECTS_NO_PARENTS,
|
||||
|
||||
+511
-280
File diff suppressed because it is too large.
Load diff
@@ -470,7 +470,6 @@ ostree_repo_resolve_rev_ext (OstreeRepo *self,
|
||||
return _ostree_repo_resolve_rev_internal (self, refspec, allow_noent, FALSE, out_rev, error);
|
||||
}
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
/**
|
||||
* ostree_repo_resolve_collection_ref:
|
||||
* @self: an #OstreeRepo
|
||||
@@ -494,7 +493,7 @@ ostree_repo_resolve_rev_ext (OstreeRepo *self,
|
||||
* There are currently no @flags which affect the behaviour of this function.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on failure
|
||||
* Since: 2017.12
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_resolve_collection_ref (OstreeRepo *self,
|
||||
@@ -531,7 +530,6 @@ ostree_repo_resolve_collection_ref (OstreeRepo *self,
|
||||
*out_rev = g_strdup (ret_contents);
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
static gboolean
|
||||
enumerate_refs_recurse (OstreeRepo *repo,
|
||||
@@ -876,7 +874,6 @@ ostree_repo_remote_list_refs (OstreeRepo *self,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
static gboolean
|
||||
remote_list_collection_refs_process_refs (OstreeRepo *self,
|
||||
const gchar *remote_name,
|
||||
@@ -934,7 +931,7 @@ remote_list_collection_refs_process_refs (OstreeRepo *self,
|
||||
* Any refs for other collections stored in the repository will also be returned.
|
||||
* No filtering is performed.
|
||||
*
|
||||
* Since: 2017.10
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_remote_list_collection_refs (OstreeRepo *self,
|
||||
@@ -995,7 +992,6 @@ ostree_repo_remote_list_collection_refs (OstreeRepo *self,
|
||||
ot_transfer_out_value (out_all_refs, &ret_all_refs);
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
static char *
|
||||
relative_symlink_to (const char *relpath,
|
||||
@@ -1206,7 +1202,7 @@ _ostree_repo_update_collection_refs (OstreeRepo *self,
|
||||
* %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE otherwise
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_list_collection_refs (OstreeRepo *self,
|
||||
|
||||
@@ -5703,7 +5703,7 @@ _ostree_repo_memory_cache_ref_destroy (OstreeRepoMemoryCacheRef *state)
|
||||
* Get the collection ID of this repository. See [collection IDs][collection-ids].
|
||||
*
|
||||
* Returns: (nullable): collection ID for the repository
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
const gchar *
|
||||
ostree_repo_get_collection_id (OstreeRepo *self)
|
||||
@@ -5724,7 +5724,7 @@ ostree_repo_get_collection_id (OstreeRepo *self)
|
||||
* configuration on disk using ostree_repo_write_config().
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE otherwise
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_set_collection_id (OstreeRepo *self,
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
#include "ostree-core.h"
|
||||
#include "ostree-types.h"
|
||||
#include "ostree-async-progress.h"
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
#include "ostree-ref.h"
|
||||
#include "ostree-repo-finder.h"
|
||||
#endif
|
||||
#include "ostree-sepolicy.h"
|
||||
#include "ostree-gpg-verify-result.h"
|
||||
|
||||
@@ -107,8 +105,6 @@ OstreeRepo * ostree_repo_create_at (int dfd,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
const gchar * ostree_repo_get_collection_id (OstreeRepo *self);
|
||||
_OSTREE_PUBLIC
|
||||
@@ -116,8 +112,6 @@ gboolean ostree_repo_set_collection_id (OstreeRepo *self,
|
||||
const gchar *collection_id,
|
||||
GError **error);
|
||||
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
GFile * ostree_repo_get_path (OstreeRepo *self);
|
||||
|
||||
@@ -339,15 +333,11 @@ void ostree_repo_transaction_set_ref (OstreeRepo *self,
|
||||
const char *ref,
|
||||
const char *checksum);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_repo_transaction_set_collection_ref (OstreeRepo *self,
|
||||
const OstreeCollectionRef *ref,
|
||||
const char *checksum);
|
||||
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_set_ref_immediate (OstreeRepo *self,
|
||||
const char *remote,
|
||||
@@ -364,8 +354,6 @@ gboolean ostree_repo_set_alias_ref_immediate (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_set_collection_ref_immediate (OstreeRepo *self,
|
||||
const OstreeCollectionRef *ref,
|
||||
@@ -373,8 +361,6 @@ gboolean ostree_repo_set_collection_ref_immediate (OstreeRepo
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_has_object (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
@@ -479,7 +465,6 @@ gboolean ostree_repo_resolve_rev_ext (OstreeRepo *self,
|
||||
char **out_rev,
|
||||
GError **error);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_resolve_collection_ref (OstreeRepo *self,
|
||||
const OstreeCollectionRef *ref,
|
||||
@@ -488,7 +473,6 @@ gboolean ostree_repo_resolve_collection_ref (OstreeRepo
|
||||
char **out_rev,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_list_refs (OstreeRepo *self,
|
||||
@@ -524,14 +508,12 @@ gboolean ostree_repo_remote_list_refs (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_list_collection_refs (OstreeRepo *self,
|
||||
const char *remote_name,
|
||||
GHashTable **out_all_refs,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_load_variant (OstreeRepo *self,
|
||||
@@ -1202,6 +1184,14 @@ struct _OstreeRepoPruneOptions {
|
||||
|
||||
typedef struct _OstreeRepoPruneOptions OstreeRepoPruneOptions;
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean
|
||||
ostree_repo_traverse_reachable_refs (OstreeRepo *self,
|
||||
guint depth,
|
||||
GHashTable *reachable,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_prune_from_reachable (OstreeRepo *self,
|
||||
OstreeRepoPruneOptions *options,
|
||||
@@ -1257,8 +1247,6 @@ gboolean ostree_repo_pull_with_options (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_repo_find_remotes_async (OstreeRepo *self,
|
||||
const OstreeCollectionRef * const *refs,
|
||||
@@ -1300,8 +1288,6 @@ gboolean ostree_repo_list_collection_refs (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_repo_pull_default_console_progress_changed (OstreeAsyncProgress *progress,
|
||||
gpointer user_data);
|
||||
@@ -1386,8 +1372,6 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
/**
|
||||
* OSTREE_REPO_METADATA_REF:
|
||||
*
|
||||
@@ -1407,12 +1391,10 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo *self,
|
||||
* keys must be namespaced by product or developer. For example,
|
||||
* `exampleos.end-of-life`. The `ostree.` prefix is reserved.
|
||||
*
|
||||
* Since: 2017.8
|
||||
* Since: 2018.6
|
||||
*/
|
||||
#define OSTREE_REPO_METADATA_REF "ostree-metadata"
|
||||
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
|
||||
@@ -420,25 +420,76 @@ generate_deployment_refs (OstreeSysroot *self,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
prune_repo (OstreeRepo *repo,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
/**
|
||||
* ostree_sysroot_cleanup_prune_repo:
|
||||
* @sysroot: Sysroot
|
||||
* @options: Flags controlling pruning
|
||||
* @out_objects_total: (out): Number of objects found
|
||||
* @out_objects_pruned: (out): Number of objects deleted
|
||||
* @out_pruned_object_size_total: (out): Storage size in bytes of objects deleted
|
||||
* @cancellable: Cancellable
|
||||
* @error: Error
|
||||
*
|
||||
* Prune the system repository. This is a thin wrapper
|
||||
* around ostree_repo_prune_from_reachable(); the primary
|
||||
* addition is that this function automatically gathers
|
||||
* all deployed commits into the reachable set.
|
||||
*
|
||||
* You generally want to at least set the `OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY`
|
||||
* flag in @options. A commit traversal depth of `0` is assumed.
|
||||
*
|
||||
* Locking: exclusive
|
||||
* Since: 2018.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_sysroot_cleanup_prune_repo (OstreeSysroot *sysroot,
|
||||
OstreeRepoPruneOptions *options,
|
||||
gint *out_objects_total,
|
||||
gint *out_objects_pruned,
|
||||
guint64 *out_pruned_object_size_total,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gint n_objects_total;
|
||||
gint n_objects_pruned;
|
||||
guint64 freed_space;
|
||||
if (!ostree_repo_prune (repo, OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY, 0,
|
||||
&n_objects_total, &n_objects_pruned, &freed_space,
|
||||
cancellable, error))
|
||||
GLNX_AUTO_PREFIX_ERROR ("Pruning system repository", error);
|
||||
OstreeRepo *repo = ostree_sysroot_repo (sysroot);
|
||||
const guint depth = 0; /* Historical default */
|
||||
|
||||
/* Hold an exclusive lock by default across gathering refs and doing
|
||||
* the prune.
|
||||
*/
|
||||
g_autoptr(OstreeRepoAutoLock) lock =
|
||||
_ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error);
|
||||
if (!lock)
|
||||
return FALSE;
|
||||
|
||||
if (freed_space > 0)
|
||||
/* Ensure reachable has refs, but default to depth 0. This is
|
||||
* what we've always done for the system repo, but perhaps down
|
||||
* the line we could add a depth flag to the repo config or something?
|
||||
*/
|
||||
if (!ostree_repo_traverse_reachable_refs (repo, depth, options->reachable, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
/* Since ostree was created we've been generating "deployment refs" in
|
||||
* generate_deployment_refs() that look like ostree/0/1 etc. to ensure that
|
||||
* anything doing a direct prune won't delete commits backing deployments.
|
||||
* This bit might allow us to eventually drop that behavior, although we'd
|
||||
* have to be very careful to ensure that all software is updated to use
|
||||
* `ostree_sysroot_cleanup_prune_repo()`.
|
||||
*/
|
||||
for (guint i = 0; i < sysroot->deployments->len; i++)
|
||||
{
|
||||
g_autofree char *freed_space_str = g_format_size_full (freed_space, 0);
|
||||
g_print ("Freed objects: %s\n", freed_space_str);
|
||||
const char *checksum = ostree_deployment_get_csum (sysroot->deployments->pdata[i]);
|
||||
if (!ostree_repo_traverse_commit_union (repo, checksum, depth, options->reachable,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!ostree_repo_prune_from_reachable (repo, options,
|
||||
out_objects_total, out_objects_pruned,
|
||||
out_pruned_object_size_total,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -501,8 +552,22 @@ _ostree_sysroot_cleanup_internal (OstreeSysroot *self,
|
||||
|
||||
if (do_prune_repo)
|
||||
{
|
||||
if (!prune_repo (repo, cancellable, error))
|
||||
return glnx_prefix_error (error, "Pruning repo");
|
||||
gint n_objects_total;
|
||||
gint n_objects_pruned;
|
||||
guint64 freed_space;
|
||||
g_autoptr(GHashTable) reachable = ostree_repo_traverse_new_reachable ();
|
||||
OstreeRepoPruneOptions opts = { OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY, reachable };
|
||||
if (!ostree_sysroot_cleanup_prune_repo (self, &opts, &n_objects_total,
|
||||
&n_objects_pruned, &freed_space,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
/* TODO remove printf in library */
|
||||
if (freed_space > 0)
|
||||
{
|
||||
g_autofree char *freed_space_str = g_format_size_full (freed_space, 0);
|
||||
g_print ("Freed objects: %s\n", freed_space_str);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -122,6 +122,16 @@ gboolean ostree_sysroot_prepare_cleanup (OstreeSysroot *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean
|
||||
ostree_sysroot_cleanup_prune_repo (OstreeSysroot *sysroot,
|
||||
OstreeRepoPruneOptions *options,
|
||||
gint *out_objects_total,
|
||||
gint *out_objects_pruned,
|
||||
guint64 *out_pruned_object_size_total,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_sysroot_write_origin_file (OstreeSysroot *sysroot,
|
||||
OstreeDeployment *deployment,
|
||||
|
||||
@@ -38,9 +38,6 @@ typedef struct OstreeSysroot OstreeSysroot;
|
||||
typedef struct OstreeSysrootUpgrader OstreeSysrootUpgrader;
|
||||
typedef struct OstreeMutableTree OstreeMutableTree;
|
||||
typedef struct OstreeRepoFile OstreeRepoFile;
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
typedef struct OstreeRemote OstreeRemote;
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
@@ -43,7 +43,7 @@
|
||||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
#define OSTREE_RELEASE_VERSION (5)
|
||||
#define OSTREE_RELEASE_VERSION (6)
|
||||
|
||||
/**
|
||||
* OSTREE_VERSION
|
||||
@@ -52,7 +52,7 @@
|
||||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
#define OSTREE_VERSION (2018.5)
|
||||
#define OSTREE_VERSION (2018.6)
|
||||
|
||||
/**
|
||||
* OSTREE_VERSION_S:
|
||||
@@ -62,7 +62,7 @@
|
||||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
#define OSTREE_VERSION_S "2018.5"
|
||||
#define OSTREE_VERSION_S "2018.6"
|
||||
|
||||
#define OSTREE_ENCODE_VERSION(year,release) \
|
||||
((year) << 16 | (release))
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
#include <ostree-core.h>
|
||||
#include <ostree-repo.h>
|
||||
#include <ostree-mutable-tree.h>
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
#include <ostree-remote.h>
|
||||
#endif
|
||||
#include <ostree-repo-file.h>
|
||||
#include <ostree-sysroot.h>
|
||||
#include <ostree-sysroot-upgrader.h>
|
||||
@@ -35,15 +33,11 @@
|
||||
#include <ostree-bootconfig-parser.h>
|
||||
#include <ostree-diff.h>
|
||||
#include <ostree-gpg-verify-result.h>
|
||||
|
||||
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
#include <ostree-ref.h>
|
||||
#include <ostree-repo-finder.h>
|
||||
#include <ostree-repo-finder-avahi.h>
|
||||
#include <ostree-repo-finder-config.h>
|
||||
#include <ostree-repo-finder-mount.h>
|
||||
#include <ostree-repo-finder-override.h>
|
||||
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
|
||||
|
||||
#include <ostree-autocleanups.h>
|
||||
#include <ostree-version.h>
|
||||
Reference in new issue
Block a user