compose: Make boot_location: legacy be an alias for both

We have 3 locations to find kernels now; I can't think of
a reason to support placing kernels *only* in `/boot`.  The
original commit
15ecaacd36
doesn't give a reason, and I certainly can't think of one now.

This makes `legacy` be an alias for `both`, which should be fully compatible.

Prep for further refactoring towards changing `new` to mean both
`/usr/lib/ostree-boot` *and* `/usr/lib/modules`.

Closes: #959
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-08-28 10:58:01 -04:00 committed by Atomic Bot
parent aab7571fc1
commit 3ff48589b3
2 changed files with 4 additions and 12 deletions

View File

@ -30,8 +30,8 @@ It supports the following parameters:
in /boot. However, this has a few flaws; it gets shadowed at boot time,
and also makes dealing with Anaconda installation harder. There are 3
possible values:
* "legacy": kernel data goes in /boot
* "both": the default, kernel data goes in /boot and /usr/lib/ostree-boot
* "legacy": Now an alias for "both"; historically meant just "boot"
* "new": kernel data goes in /usr/lib/ostree-boot
* `etc-group-members`: Array of strings, optional: Unix groups in this

View File

@ -46,7 +46,6 @@
#include "rpmostree-util.h"
typedef enum {
RPMOSTREE_POSTPROCESS_BOOT_LOCATION_LEGACY,
RPMOSTREE_POSTPROCESS_BOOT_LOCATION_BOTH,
RPMOSTREE_POSTPROCESS_BOOT_LOCATION_NEW
} RpmOstreePostprocessBootLocation;
@ -801,9 +800,9 @@ create_rootfs_from_pkgroot_content (int target_root_dfd,
if (boot_location_str != NULL)
{
if (strcmp (boot_location_str, "legacy") == 0)
boot_location = RPMOSTREE_POSTPROCESS_BOOT_LOCATION_LEGACY;
else if (strcmp (boot_location_str, "both") == 0)
/* Note that "legacy" is now an alias for "both" */
if (strcmp (boot_location_str, "both") == 0 ||
strcmp (boot_location_str, "legacy") == 0)
boot_location = RPMOSTREE_POSTPROCESS_BOOT_LOCATION_BOTH;
else if (strcmp (boot_location_str, "new") == 0)
boot_location = RPMOSTREE_POSTPROCESS_BOOT_LOCATION_NEW;
@ -817,13 +816,6 @@ create_rootfs_from_pkgroot_content (int target_root_dfd,
switch (boot_location)
{
case RPMOSTREE_POSTPROCESS_BOOT_LOCATION_LEGACY:
{
g_print ("Using boot location: legacy\n");
if (!glnx_renameat (src_rootfs_fd, "boot", target_root_dfd, "boot", error))
return FALSE;
}
break;
case RPMOSTREE_POSTPROCESS_BOOT_LOCATION_BOTH:
{
g_print ("Using boot location: both\n");