admin: Don't fail to deploy if there isn't a bootloader config
Currently, when deploying an OSTree that does not contain a bootloader configuration it fails with the following message: "No known bootloader configuration detected" A bootloader configuration is not strictly necessary if the bootloader used is able to parse /boot/loader/entries on boot. So, failing to deploy seems to be a little harsh. It is better to just not write the bootloader configuration if a previous one was not found but still swap the bootversion. https://bugzilla.gnome.org/show_bug.cgi?id=706477 Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
This commit is contained in:
parent
8abad0b452
commit
6f6c87877e
|
|
@ -975,15 +975,7 @@ ot_admin_write_deployments (GFile *sysroot,
|
|||
{
|
||||
gboolean ret = FALSE;
|
||||
guint i;
|
||||
gs_unref_object OtBootloader *bootloader = NULL;
|
||||
|
||||
bootloader = ot_admin_query_bootloader (sysroot);
|
||||
if (!bootloader)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"No known bootloader configuration detected");
|
||||
goto out;
|
||||
}
|
||||
gs_unref_object OtBootloader *bootloader = ot_admin_query_bootloader (sysroot);
|
||||
|
||||
if (current_bootversion == new_bootversion)
|
||||
{
|
||||
|
|
@ -1029,9 +1021,12 @@ ot_admin_write_deployments (GFile *sysroot,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (!ot_bootloader_write_config (bootloader, new_bootversion,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
if (bootloader && !ot_bootloader_write_config (bootloader, new_bootversion,
|
||||
cancellable, error))
|
||||
{
|
||||
g_prefix_error (error, "Bootloader write config: ");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!swap_bootloader (sysroot, current_bootversion, new_bootversion,
|
||||
cancellable, error))
|
||||
|
|
|
|||
Loading…
Reference in New Issue