65 lines
2.5 KiB
Diff
65 lines
2.5 KiB
Diff
|
From 0853089457a3e2ca343ea467dfc703bf99c416b9 Mon Sep 17 00:00:00 2001
|
||
|
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||
|
Date: Thu, 6 Jul 2017 17:07:08 -0400
|
||
|
Subject: [PATCH] OCI: Update org.opencontainers.ref.name to
|
||
|
org.opencontainers.image.ref.name
|
||
|
|
||
|
This annotation was changed in later versions of the OCI Image specification.
|
||
|
(See https://github.com/projectatomic/skopeo/issues/369#issuecomment-310158211)
|
||
|
---
|
||
|
common/flatpak-json-oci.c | 10 +++++-----
|
||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/common/flatpak-json-oci.c b/common/flatpak-json-oci.c
|
||
|
index a64a0e0..718e0dc 100644
|
||
|
--- a/common/flatpak-json-oci.c
|
||
|
+++ b/common/flatpak-json-oci.c
|
||
|
@@ -426,7 +426,7 @@ flatpak_oci_index_add_manifest (FlatpakOciIndex *self,
|
||
|
int count;
|
||
|
|
||
|
if (desc->annotations != NULL)
|
||
|
- m_ref = g_hash_table_lookup (desc->annotations, "org.opencontainers.ref.name");
|
||
|
+ m_ref = g_hash_table_lookup (desc->annotations, "org.opencontainers.image.ref.name");
|
||
|
|
||
|
if (m_ref != NULL)
|
||
|
flatpak_oci_index_remove_manifest (self, m_ref);
|
||
|
@@ -449,7 +449,7 @@ flatpak_oci_manifest_descriptor_get_ref (FlatpakOciManifestDescriptor *m)
|
||
|
if (m->parent.annotations == NULL)
|
||
|
return NULL;
|
||
|
|
||
|
- return g_hash_table_lookup (m->parent.annotations, "org.opencontainers.ref.name");
|
||
|
+ return g_hash_table_lookup (m->parent.annotations, "org.opencontainers.image.ref.name");
|
||
|
}
|
||
|
|
||
|
static int
|
||
|
@@ -703,7 +703,7 @@ flatpak_oci_export_annotations (GHashTable *source,
|
||
|
GHashTable *dest)
|
||
|
{
|
||
|
const char *keys[] = {
|
||
|
- "org.opencontainers.ref.name",
|
||
|
+ "org.opencontainers.image.ref.name",
|
||
|
"org.flatpak.installed-size",
|
||
|
"org.flatpak.download-size",
|
||
|
"org.flatpak.metadata",
|
||
|
@@ -750,7 +750,7 @@ flatpak_oci_add_annotations_for_commit (GHashTable *annotations,
|
||
|
GVariant *commit_data)
|
||
|
{
|
||
|
if (ref)
|
||
|
- add_annotation (annotations,"org.opencontainers.ref.name", ref);
|
||
|
+ add_annotation (annotations,"org.opencontainers.image.ref.name", ref);
|
||
|
|
||
|
if (commit)
|
||
|
add_annotation (annotations,"org.flatpak.commit", commit);
|
||
|
@@ -809,7 +809,7 @@ flatpak_oci_parse_commit_annotations (GHashTable *annotations,
|
||
|
GHashTableIter iter;
|
||
|
gpointer _key, _value;
|
||
|
|
||
|
- oci_ref = g_hash_table_lookup (annotations, "org.opencontainers.ref.name");
|
||
|
+ oci_ref = g_hash_table_lookup (annotations, "org.opencontainers.image.ref.name");
|
||
|
if (oci_ref != NULL && out_ref != NULL && *out_ref == NULL)
|
||
|
*out_ref = g_strdup (oci_ref);
|
||
|
|
||
|
--
|
||
|
2.13.0
|
||
|
|