[Libosinfo] [libosinfo PATCH] media: Make _supports_installer_sript() aware of media installers

Fabiano Fidêncio fidencio at redhat.com
Thu Feb 7 07:39:17 UTC 2019


Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
This has been written atop of
https://www.redhat.com/archives/libosinfo/2019-February/msg00028.html
---
 osinfo/osinfo_media.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index 6720736..9f77504 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -1661,7 +1661,8 @@ gboolean osinfo_media_supports_installer_script(OsinfoMedia *media)
     os = osinfo_media_get_os(media);
     list = osinfo_os_get_install_script_list(os);
 
-    if (osinfo_list_get_length(OSINFO_LIST(list)) == 0) {
+    if (osinfo_list_get_length(OSINFO_LIST(list)) == 0 &&
+        osinfo_list_get_length(OSINFO_LIST(media->priv->scripts)) == 0) {
         ret = FALSE;
         goto cleanup;
     }
-- 
2.20.1




More information about the Libosinfo mailing list