* [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction
@ 2018-10-21 16:21 Luca Ceresoli
2018-10-21 16:54 ` Matthew Weber
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luca Ceresoli @ 2018-10-21 16:21 UTC (permalink / raw)
To: buildroot
From: Marcel Patzlaff <m.patzlaff@pilz.de>
The utils/diffconfig script works only on variables with the BR2_
prefix. This is OK for Buildroot [def]configs since this is the prefix
for all user-facing variables, but it prevents using the same script
to compare configs from kconfig-based packages.
Remove the BR2_ restriction, allowing usage such as:
./utils/diffconfig \
board/qemu/xtensa-lx60/linux.config \
board/qemu/xtensa-lx60/linux-nommu.config
Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changes v1 -> v2:
- rewrite commit message with a different motivation
- fix subject (use imperative verb, lowercase after colon)
---
utils/diffconfig | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/utils/diffconfig b/utils/diffconfig
index 5862a62f25cb..f1af23cfce5c 100755
--- a/utils/diffconfig
+++ b/utils/diffconfig
@@ -28,14 +28,14 @@ If no config files are specified, .config and .config.old are used.
Example usage:
$ diffconfig .config config-with-some-changes
--LINUX_KERNEL_INTREE_DTS_NAME "vexpress-v2p-ca9"
- LINUX_KERNEL_DTS_SUPPORT y -> n
- LINUX_KERNEL_USE_INTREE_DTS y -> n
- PACKAGE_DFU_UTIL n -> y
- PACKAGE_LIBUSB n -> y
- TARGET_GENERIC_HOSTNAME "buildroot" -> "Tuxie"
- TARGET_GENERIC_ISSUE "Welcome to Buildroot" -> "Welcome to CustomBoard"
-+PACKAGE_LIBUSB_COMPAT n
+-BR2_LINUX_KERNEL_INTREE_DTS_NAME "vexpress-v2p-ca9"
+ BR2_LINUX_KERNEL_DTS_SUPPORT y -> n
+ BR2_LINUX_KERNEL_USE_INTREE_DTS y -> n
+ BR2_PACKAGE_DFU_UTIL n -> y
+ BR2_PACKAGE_LIBUSB n -> y
+ BR2_TARGET_GENERIC_HOSTNAME "buildroot" -> "Tuxie"
+ BR2_TARGET_GENERIC_ISSUE "Welcome to Buildroot" -> "Welcome to CustomBoard"
++BR2_PACKAGE_LIBUSB_COMPAT n
""")
sys.exit(0)
@@ -44,12 +44,14 @@ Example usage:
def readconfig(config_file):
d = {}
for line in config_file:
- line = line[:-1]
- if line[:4] == "BR2_":
- name, val = line[4:].split("=", 1)
- d[name] = val
+ line = line.strip()
+ if len(line) == 0:
+ continue
if line[-11:] == " is not set":
- d[line[6:-11]] = "n"
+ d[line[2:-11]] = "n"
+ elif line[0] != "#":
+ name, val = line.split("=", 1)
+ d[name] = val
return d
def print_config(op, config, value, new_value):
@@ -58,9 +60,9 @@ def print_config(op, config, value, new_value):
if merge_style:
if new_value:
if new_value=="n":
- print("# BR2_%s is not set" % config)
+ print("# %s is not set" % config)
else:
- print("BR2_%s=%s" % (config, new_value))
+ print("%s=%s" % (config, new_value))
else:
if op=="-":
print("-%s %s" % (config, value))
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction
2018-10-21 16:21 [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction Luca Ceresoli
@ 2018-10-21 16:54 ` Matthew Weber
2018-10-21 17:56 ` Peter Korsgaard
2018-10-24 12:49 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Matthew Weber @ 2018-10-21 16:54 UTC (permalink / raw)
To: buildroot
Marcus, Luca,
On Sun, Oct 21, 2018 at 5:22 PM Luca Ceresoli <luca@lucaceresoli.net> wrote:
>
> From: Marcel Patzlaff <m.patzlaff@pilz.de>
>
> The utils/diffconfig script works only on variables with the BR2_
> prefix. This is OK for Buildroot [def]configs since this is the prefix
> for all user-facing variables, but it prevents using the same script
> to compare configs from kconfig-based packages.
>
> Remove the BR2_ restriction, allowing usage such as:
>
> ./utils/diffconfig \
> board/qemu/xtensa-lx60/linux.config \
> board/qemu/xtensa-lx60/linux-nommu.config
>
> Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
>
> ---
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
>
> Changes v1 -> v2:
> - rewrite commit message with a different motivation
> - fix subject (use imperative verb, lowercase after colon)
> ---
> utils/diffconfig | 32 +++++++++++++++++---------------
> 1 file changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/utils/diffconfig b/utils/diffconfig
> index 5862a62f25cb..f1af23cfce5c 100755
> --- a/utils/diffconfig
> +++ b/utils/diffconfig
> @@ -28,14 +28,14 @@ If no config files are specified, .config and .config.old are used.
>
> Example usage:
> $ diffconfig .config config-with-some-changes
> --LINUX_KERNEL_INTREE_DTS_NAME "vexpress-v2p-ca9"
> - LINUX_KERNEL_DTS_SUPPORT y -> n
> - LINUX_KERNEL_USE_INTREE_DTS y -> n
> - PACKAGE_DFU_UTIL n -> y
> - PACKAGE_LIBUSB n -> y
> - TARGET_GENERIC_HOSTNAME "buildroot" -> "Tuxie"
> - TARGET_GENERIC_ISSUE "Welcome to Buildroot" -> "Welcome to CustomBoard"
> -+PACKAGE_LIBUSB_COMPAT n
> +-BR2_LINUX_KERNEL_INTREE_DTS_NAME "vexpress-v2p-ca9"
> + BR2_LINUX_KERNEL_DTS_SUPPORT y -> n
> + BR2_LINUX_KERNEL_USE_INTREE_DTS y -> n
> + BR2_PACKAGE_DFU_UTIL n -> y
> + BR2_PACKAGE_LIBUSB n -> y
> + BR2_TARGET_GENERIC_HOSTNAME "buildroot" -> "Tuxie"
> + BR2_TARGET_GENERIC_ISSUE "Welcome to Buildroot" -> "Welcome to CustomBoard"
> ++BR2_PACKAGE_LIBUSB_COMPAT n
>
> """)
> sys.exit(0)
> @@ -44,12 +44,14 @@ Example usage:
> def readconfig(config_file):
> d = {}
> for line in config_file:
> - line = line[:-1]
> - if line[:4] == "BR2_":
> - name, val = line[4:].split("=", 1)
> - d[name] = val
> + line = line.strip()
> + if len(line) == 0:
> + continue
> if line[-11:] == " is not set":
> - d[line[6:-11]] = "n"
> + d[line[2:-11]] = "n"
> + elif line[0] != "#":
> + name, val = line.split("=", 1)
> + d[name] = val
> return d
>
> def print_config(op, config, value, new_value):
> @@ -58,9 +60,9 @@ def print_config(op, config, value, new_value):
> if merge_style:
> if new_value:
> if new_value=="n":
> - print("# BR2_%s is not set" % config)
> + print("# %s is not set" % config)
> else:
> - print("BR2_%s=%s" % (config, new_value))
> + print("%s=%s" % (config, new_value))
> else:
> if op=="-":
> print("-%s %s" % (config, value))
> --
> 2.17.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Matthew L Weber / Pr Software Engineer
Airborne Information Systems / RC Linux Secure Platforms
MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
www.rockwellcollins.com
Note: Any Export License Required Information and License Restricted
Third Party Intellectual Property (TPIP) content must be encrypted and
sent to matthew.weber at corp.rockwellcollins.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction
2018-10-21 16:21 [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction Luca Ceresoli
2018-10-21 16:54 ` Matthew Weber
@ 2018-10-21 17:56 ` Peter Korsgaard
2018-10-24 12:49 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-10-21 17:56 UTC (permalink / raw)
To: buildroot
>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:
> From: Marcel Patzlaff <m.patzlaff@pilz.de>
> The utils/diffconfig script works only on variables with the BR2_
> prefix. This is OK for Buildroot [def]configs since this is the prefix
> for all user-facing variables, but it prevents using the same script
> to compare configs from kconfig-based packages.
> Remove the BR2_ restriction, allowing usage such as:
> ./utils/diffconfig \
> board/qemu/xtensa-lx60/linux.config \
> board/qemu/xtensa-lx60/linux-nommu.config
> Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
> Changes v1 -> v2:
> - rewrite commit message with a different motivation
> - fix subject (use imperative verb, lowercase after colon)
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction
2018-10-21 16:21 [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction Luca Ceresoli
2018-10-21 16:54 ` Matthew Weber
2018-10-21 17:56 ` Peter Korsgaard
@ 2018-10-24 12:49 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-10-24 12:49 UTC (permalink / raw)
To: buildroot
>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:
> From: Marcel Patzlaff <m.patzlaff@pilz.de>
> The utils/diffconfig script works only on variables with the BR2_
> prefix. This is OK for Buildroot [def]configs since this is the prefix
> for all user-facing variables, but it prevents using the same script
> to compare configs from kconfig-based packages.
> Remove the BR2_ restriction, allowing usage such as:
> ./utils/diffconfig \
> board/qemu/xtensa-lx60/linux.config \
> board/qemu/xtensa-lx60/linux-nommu.config
> Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
> Changes v1 -> v2:
> - rewrite commit message with a different motivation
> - fix subject (use imperative verb, lowercase after colon)
Committed to 2018.02.x and 2018.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-24 12:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-21 16:21 [Buildroot] [PATCH v2] utils/diffconfig: remove BR2_* prefix restriction Luca Ceresoli
2018-10-21 16:54 ` Matthew Weber
2018-10-21 17:56 ` Peter Korsgaard
2018-10-24 12:49 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.