pull: Explicitly error out if metadata objects are fallbacks

I don't know why I added support for this; it makes no sense really. If we have
large metadata objects something has gone badly wrong.

The delta compiler has always only processed fallbacks for regular
content files.

Dropping support in the fetcher for this will simplify later handling of
fallback progress accounting.

Closes: #678
Approved by: giuseppe
This commit is contained in:
Colin Walters 2017-02-10 17:35:23 -05:00 committed by Atomic Bot
parent e1118e320d
commit 693f7c5f60

View File

@ -1618,19 +1618,14 @@ process_one_static_delta_fallback (OtPullData *pull_data,
}
if (!is_stored)
{
{
/* The delta compiler never did this, there's no reason to support it */
if (OSTREE_OBJECT_TYPE_IS_META (objtype))
{
g_autoptr(GVariant) objname = ostree_object_name_serialize (checksum, objtype);
if (!g_hash_table_lookup (pull_data->requested_metadata, objname))
{
gboolean do_fetch_detached;
g_hash_table_add (pull_data->requested_metadata, g_variant_ref (objname));
do_fetch_detached = (objtype == OSTREE_OBJECT_TYPE_COMMIT);
enqueue_one_object_request (pull_data, checksum, objtype, NULL, do_fetch_detached, FALSE);
checksum = NULL; /* Transfer ownership */
}
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Found metadata object as fallback: %s.%s", checksum,
ostree_object_type_to_string (objtype));
goto out;
}
else
{