Merge pull request #2149 from stb-tester/boot-self-symlink

sysroot: Support /boot on root or as seperate filesystem for syslinux and u-boot
This commit is contained in:
OpenShift Merge Robot authored and GitHub committed 2020-08-19 01:08:30 +02:00
commit 199562fc14
4 files changed
+55 -26

No files matched your search

+6
View File
@@ -1994,6 +1994,12 @@ prepare_new_bootloader_link (OstreeSysroot *sysroot,
g_assert ((current_bootversion == 0 && new_bootversion == 1) ||
(current_bootversion == 1 && new_bootversion == 0));
/* This allows us to support both /boot on a seperate filesystem to / as well
* as on the same filesystem. */
if (TEMP_FAILURE_RETRY (symlinkat (".", sysroot->sysroot_fd, "boot/boot")) < 0)
if (errno != EEXIST)
return glnx_throw_errno_prefix (error, "symlinkat");
g_autofree char *new_target = g_strdup_printf ("loader.%d", new_bootversion);
/* We shouldn't actually need to replace but it's easier to reuse