db: Add missing attributes to fill_media()
Some new attributes have been added to OsinfoMedia, as:
- the install-script list (during this cycle);
- installer-script (1.3.0);
However, none of those attributes have been filled in in the media
accordingly to matched media.
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Fabiano FidĂȘncio
5 years ago
641 | 641 | const gchar *initrd_path; |
642 | 642 | const gchar *arch; |
643 | 643 | const gchar *url; |
644 | gint i; | |
645 | gboolean installer_script; | |
646 | OsinfoInstallScriptList *install_script_list; | |
644 | 647 | GList *variants, *node; |
645 | 648 | |
646 | 649 | set_languages_for_media(db, media, matched_media); |
684 | 687 | "eject-after-install", eject_after_install, |
685 | 688 | NULL); |
686 | 689 | } |
690 | installer_script = osinfo_entity_get_param_value_boolean_with_default(OSINFO_ENTITY(matched_media), | |
691 | OSINFO_MEDIA_PROP_INSTALLER_SCRIPT, | |
692 | TRUE); | |
693 | g_object_set(G_OBJECT(media), | |
694 | "installer-script", installer_script, | |
695 | NULL); | |
696 | install_script_list = osinfo_media_get_install_script_list(matched_media); | |
697 | if (install_script_list != NULL && | |
698 | osinfo_list_get_length(OSINFO_LIST(install_script_list)) > 0) { | |
699 | for (i = 0; i < osinfo_list_get_length(OSINFO_LIST(install_script_list)); i++) { | |
700 | OsinfoInstallScript *script; | |
701 | ||
702 | script = OSINFO_INSTALL_SCRIPT(osinfo_list_get_nth(OSINFO_LIST(install_script_list), i)); | |
703 | osinfo_media_add_install_script(media, script); | |
704 | } | |
705 | } | |
706 | ||
687 | 707 | if (os != NULL) |
688 | 708 | osinfo_media_set_os(media, os); |
689 | 709 | } |