Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] fs/cpio: add legacy entry for renamed option
@ 2022-09-18  8:05 Yann E. MORIN
  2022-09-18  8:47 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2022-09-18  8:05 UTC (permalink / raw)
  To: buildroot; +Cc: Adam Duskett, Yann E. MORIN, Thierry Bultel

Commit 4fd5d80e9dc0 (fs/cpio: accept a list of dracut.conf files) was
initially submitted before the first release wth dracut support was
made, so it took the liberty of renaming the option without introducing
the corresponding legacy entry.

But the patch was eventually applied after a release was made with
dracut support. In that case, renaming an option requires that the old
option be added to legacy, but that was understandably missed.

Fix that now.

We had two potions: revert to the previous name and add no legacy entry,
or keep the new name and add a legacy entry.

We choose the latter, because the new name with the plural form really
denotes that more than one file may be specified, and because we do not
expect too many people to be using that feature yet, so the burden of
updating should not impact too many (and it is very easy to update
anyway).

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Thierry Bultel <thierry.bultel@linatsea.fr>
Cc: Adam Duskett <aduskett@gmail.com>
---
 Config.in.legacy  | 13 +++++++++++++
 fs/cpio/Config.in |  1 +
 2 files changed, 14 insertions(+)

diff --git a/Config.in.legacy b/Config.in.legacy
index 631b31689b..b0aa8dff90 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,19 @@ endif
 
 comment "Legacy options removed in 2022.11"
 
+# Note: BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILE is still referenced
+# from fs/cpio/Config.in
+config BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILE
+	string "dracut configuration file option renamed"
+	help
+	  The option was renamed to make it clear it accepts more
+	  than one file.
+
+config BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILE_WRAP
+	bool
+	default y if BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILE != ""
+	select BR2_LEGACY
+
 config BR2_PACKAGE_GPSD_OLDSTYLE
 	bool "gpsd oldstyle removed"
 	select BR2_LEGACY
diff --git a/fs/cpio/Config.in b/fs/cpio/Config.in
index 94a826f9e4..6368dcccb5 100644
--- a/fs/cpio/Config.in
+++ b/fs/cpio/Config.in
@@ -31,6 +31,7 @@ if BR2_TARGET_ROOTFS_CPIO_DRACUT
 
 config BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILES
 	string "dracut configuration files"
+	default BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILE if BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILE != ""  # legacy
 	default "fs/cpio/dracut.conf"
 	help
 	  Space-separated list of Dracut configuration files. They
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-18  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-18  8:05 [Buildroot] [PATCH] fs/cpio: add legacy entry for renamed option Yann E. MORIN
2022-09-18  8:47 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox