Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1 of 9 v4] Config.in.legacy: update description for developers
Date: Mon, 02 Sep 2013 22:07:50 +0200	[thread overview]
Message-ID: <da9c19eca655653a9e82.1378152470@argentina> (raw)
In-Reply-To: <patchbomb.1378152469@argentina>

The existing comments in Config.in.legacy are not entirely in-line with
current practice. The comments implies that BR2_LEGACY should not be set when
the conversion from old-to-new symbol can be done automatically using the
appropriate 'select' statements. However, none of the existing legacy options
does it this way. Moreover, I think it's intentional that the user is notified
of the change, so that the removal of the legacy options in later buildroot
versions no longer poses a problem.
Additionally, the comments now describe how to handle string options.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

---
v4: no changes
v3:
    - reorganize description
    - update string description for automatic propagation
    - extend string example
    - 'depends on BR2_LEGACY' --> 'select BR2_LEGACY' (spotted by Arnout)
(v2): new patch in this series

 Config.in.legacy |  50 +++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -1,13 +1,9 @@
 #
 # Config.in.legacy - support for backward compatibility
 #
-# When an existing Config.in symbol is removed, it should be added again in this
-# file, and take appropriate action to approximate backward compatibility. If
-# there is an equivalent (set of) new symbols, these can just be select'ed by
-# the old symbol. This makes sure that running 'make oldconfig' will make things
-# "just work" when upgrading to a new buildroot version. If the change is too
-# fundamental and cannot be fixed by a simple select, then the old symbol should
-# select BR2_LEGACY.  If that symbol is set, the build will issue an error.
+# When an existing Config.in symbol is removed, it should be added again in
+# this file, and take appropriate action to approximate backward compatibility.
+# This will make the transition for the user more convenient.
 #
 # When adding legacy symbols to this file, add them to the front. The oldest
 # symbols will be removed again after about two years.
@@ -15,6 +11,46 @@
 # The symbol should be copied as-is from the place where it was previously
 # defined, but the help text should be removed or replaced with something that
 # explains how to fix it.
+#
+# For bool options, the old symbol should select BR2_LEGACY, so that the user
+# is informed at build-time about selected legacy options.
+# If there is an equivalent (set of) new symbols, these should be select'ed by
+# the old symbol for backwards compatibility.
+#
+# For string options, it is not possible to directly select another symbol. In
+# this case, a hidden wrap bool option has to be added, that defaults to y if
+# the old string is not set at its default value. The wrap symbol should select
+# BR2_LEGACY.
+# If the original symbol has been renamed, the new symbol should use the value
+# of the old symbol as default. This requires a change outside of
+# Config.in.legacy, and this should be clearly marked as such below, so that
+# removal of legacy options also include the removal of these external
+# references.
+#
+# [Example: renaming a string option from FOO to BAR]
+# original symbol:
+#     config BR2_FOO_STRING
+#             string "Some foo string"
+#
+# becomes:
+#     config BR2_BAR_STRING
+#             string "Some bar string"
+#             default BR2_FOO_STRING if BR2_FOO_STRING != ""  # legacy
+#
+# and in Config.in.legacy:
+#     config BR2_FOO_STRING
+#             string "The foo string has been renamed"
+#             help
+#               <suitable help text>
+#
+#     config BR2_FOO_STRING_WRAP
+#             bool
+#             default y if BR2_FOO_STRING != ""
+#             select BR2_LEGACY
+#
+#     # Note: BR2_FOO_STRING is still referenced from package/foo/Config.in
+#
+# [End of example]
 
 config BR2_LEGACY
 	bool

  reply	other threads:[~2013-09-02 20:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02 20:07 [Buildroot] [PATCH 0 of 9 v4] linux/uboot: add support for custom Mercurial repositories Thomas De Schampheleire
2013-09-02 20:07 ` Thomas De Schampheleire [this message]
2013-09-02 20:54   ` [Buildroot] [PATCH 1 of 9 v4] Config.in.legacy: update description for developers Thomas Petazzoni
2013-09-03 12:13     ` Thomas De Schampheleire
2013-09-03 16:46       ` Arnout Vandecappelle
2013-10-27  7:24   ` Peter Korsgaard
2013-10-27  8:10     ` Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 2 of 9 v4] Config.in.legacy: update description for users Thomas De Schampheleire
2013-09-02 20:55   ` Thomas Petazzoni
2013-09-03  6:16     ` Arnout Vandecappelle
2013-09-03  7:18       ` Thomas Petazzoni
2013-09-03 11:42         ` Thomas De Schampheleire
2013-09-03 11:52           ` Thomas Petazzoni
2013-09-03 15:06             ` Peter Korsgaard
2013-09-03 16:50               ` Arnout Vandecappelle
2013-09-04  8:33                 ` Thomas De Schampheleire
2013-09-04 16:08                   ` Arnout Vandecappelle
2013-09-04 19:07                     ` Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 3 of 9 v4] Config.in.legacy: add separator to " Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 4 of 9 v4] Remove redundant dollar signs in Config.in files Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 5 of 9 v4] linux: add support for custom Mercurial repository Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 6 of 9 v4] u-boot: " Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 7 of 9 v4] linux/uboot: line-up repository-related configuration options Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 8 of 9 v4] defconfigs: update after rename of custom git repo/version options Thomas De Schampheleire
2013-09-02 20:07 ` [Buildroot] [PATCH 9 of 9 v4] linux: mention 3.x.y kernels in 'custom version' help Thomas De Schampheleire
2013-09-02 21:04   ` Thomas Petazzoni
2013-09-19 19:49 ` [Buildroot] [PATCH 0 of 9 v4] linux/uboot: add support for custom Mercurial repositories Thomas Petazzoni
2013-09-20  9:22   ` Thomas De Schampheleire
2013-09-25 20:12     ` Thomas De Schampheleire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da9c19eca655653a9e82.1378152470@argentina \
    --to=patrickdepinguin+buildroot@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox