Fix image's load

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
Fabiano Fidêncio 2019-04-10 14:20:47 +02:00
parent 3272dc3464
commit d6aa609f21
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,37 @@
From 1940739805409af9e39c61dbfe238e6c9b1519b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
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 <fidencio@redhat.com>
---
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

View File

@ -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 <fidencio@redhat.com> - 1.4.0-2
- Fix usage of application ID
- Fix images' load
* Fri Mar 01 2019 Fabiano Fidêncio <fidencio@redhat.com> 1.4.0-1
- Update to 1.4.0 release