Skip to content

Commit

Permalink
compose: Make boot_location: legacy be an alias for both
Browse files Browse the repository at this point in the history
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
15ecaac
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
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Sep 12, 2017
1 parent bed10f6 commit 19b98a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/manual/treefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 3 additions & 11 deletions src/libpriv/rpmostree-postprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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");
Expand Down

0 comments on commit 19b98a0

Please sign in to comment.