diff --git a/0002-loader-Properly-load-the-arch-value-for-images.patch b/0002-loader-Properly-load-the-arch-value-for-images.patch new file mode 100644 index 0000000..50611e8 --- /dev/null +++ b/0002-loader-Properly-load-the-arch-value-for-images.patch @@ -0,0 +1,37 @@ +From 1940739805409af9e39c61dbfe238e6c9b1519b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Wed, 10 Apr 2019 13:45:14 +0200 +Subject: [PATCH] loader: Properly load the arch value for images +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +osinfo_loader_image() has been considering the XML tag for the +images' architecture was "architecture", while it actually is "arch". + +By trying to read the wrong tag, no arch was loaded, causing then any +image load to fail with: +CRITICAL **: 13:30:06.539: osinfo_entity_set_param: assertion 'value != NULL' failed + +Signed-off-by: Fabiano FidĂȘncio +--- + osinfo/osinfo_loader.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c +index e30148b..84c25e5 100644 +--- a/osinfo/osinfo_loader.c ++++ b/osinfo/osinfo_loader.c +@@ -1312,8 +1312,7 @@ static OsinfoImage *osinfo_loader_image(OsinfoLoader *loader, + { NULL, G_TYPE_INVALID } + }; + +- gchar *arch = (gchar *)xmlGetProp(root, +- BAD_CAST OSINFO_IMAGE_PROP_ARCHITECTURE); ++ gchar *arch = (gchar *)xmlGetProp(root, BAD_CAST "arch"); + gchar *format = (gchar *)xmlGetProp(root, + BAD_CAST OSINFO_IMAGE_PROP_FORMAT); + gchar *cloud_init = (gchar *)xmlGetProp(root, +-- +2.20.1 + diff --git a/libosinfo.spec b/libosinfo.spec index 4db6228..9c2135e 100644 --- a/libosinfo.spec +++ b/libosinfo.spec @@ -10,6 +10,7 @@ URL: https://libosinfo.org/ ###Patches### Patch0001: 0001-media-Fix-usage-of-application-id.patch +Patch0002: 0002-loader-Properly-load-the-arch-value-for-images.patch BuildRequires: gettext-devel BuildRequires: glib2-devel @@ -104,6 +105,7 @@ fi %changelog * Wed Apr 10 2019 Fabiano FidĂȘncio - 1.4.0-2 - Fix usage of application ID +- Fix images' load * Fri Mar 01 2019 Fabiano FidĂȘncio 1.4.0-1 - Update to 1.4.0 release