0002-loader-Properly-load-the-arch-value-for-images.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 1940739805409af9e39c61dbfe238e6c9b1519b6 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
  3. Date: Wed, 10 Apr 2019 13:45:14 +0200
  4. Subject: [PATCH] loader: Properly load the arch value for images
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. osinfo_loader_image() has been considering the XML tag for the
  9. images' architecture was "architecture", while it actually is "arch".
  10. By trying to read the wrong tag, no arch was loaded, causing then any
  11. image load to fail with:
  12. CRITICAL **: 13:30:06.539: osinfo_entity_set_param: assertion 'value != NULL' failed
  13. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
  14. ---
  15. osinfo/osinfo_loader.c | 3 +--
  16. 1 file changed, 1 insertion(+), 2 deletions(-)
  17. diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
  18. index e30148b..84c25e5 100644
  19. --- a/osinfo/osinfo_loader.c
  20. +++ b/osinfo/osinfo_loader.c
  21. @@ -1312,8 +1312,7 @@ static OsinfoImage *osinfo_loader_image(OsinfoLoader *loader,
  22. { NULL, G_TYPE_INVALID }
  23. };
  24. - gchar *arch = (gchar *)xmlGetProp(root,
  25. - BAD_CAST OSINFO_IMAGE_PROP_ARCHITECTURE);
  26. + gchar *arch = (gchar *)xmlGetProp(root, BAD_CAST "arch");
  27. gchar *format = (gchar *)xmlGetProp(root,
  28. BAD_CAST OSINFO_IMAGE_PROP_FORMAT);
  29. gchar *cloud_init = (gchar *)xmlGetProp(root,
  30. --
  31. 2.20.1