core: Prefer packed metadata
This commit is contained in:
parent
f95090095e
commit
4f95106cda
|
|
@ -3975,14 +3975,7 @@ ostree_repo_load_variant (OstreeRepo *self,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Prefer loose metadata for now */
|
if (pack_checksum != NULL)
|
||||||
if (object_path != NULL)
|
|
||||||
{
|
|
||||||
if (!ot_util_variant_map (object_path, ostree_metadata_variant_type (objtype),
|
|
||||||
TRUE, &ret_variant, error))
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
else if (pack_checksum != NULL)
|
|
||||||
{
|
{
|
||||||
if (!ostree_repo_map_pack_file (self, pack_checksum, TRUE, &pack_data, &pack_len,
|
if (!ostree_repo_map_pack_file (self, pack_checksum, TRUE, &pack_data, &pack_len,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
|
|
@ -3994,6 +3987,12 @@ ostree_repo_load_variant (OstreeRepo *self,
|
||||||
|
|
||||||
g_variant_get_child (packed_object, 2, "v", &ret_variant);
|
g_variant_get_child (packed_object, 2, "v", &ret_variant);
|
||||||
}
|
}
|
||||||
|
else if (object_path != NULL)
|
||||||
|
{
|
||||||
|
if (!ot_util_variant_map (object_path, ostree_metadata_variant_type (objtype),
|
||||||
|
TRUE, &ret_variant, error))
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
else if (priv->parent_repo)
|
else if (priv->parent_repo)
|
||||||
{
|
{
|
||||||
if (!ostree_repo_load_variant (priv->parent_repo, objtype, sha256, &ret_variant, error))
|
if (!ostree_repo_load_variant (priv->parent_repo, objtype, sha256, &ret_variant, error))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue