Skip to contentSkip to conversation

add diffconfig utility

PATCH In review Tim Bird 9 participants 19 messages Jun 10, 2008 – Jun 27, 2008 Kbuild

lore
Share & tools
lore

Tim Bird

author
#0 lore raw

PATCH 1/1 add diffconfig utility

diffconfig is a simple utility for comparing two .config files. Using standard diff to compare .config files often includes extraneous and distracting information. This utility produces sorted output with only the changes in configuration values between the two files.

I have found this handy for use in testing to detect when option dependencies unexpectedly affect other options.

To use, apply the patch and 'chmod a+x scripts/diffconfig'

 diffconfig |   90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+)
scripts/diffconfig +90 -0
@@ -0,0 +1,90 @@
+#!/usr/bin/python
+#
+# diffconfig - a tool to compare .config files.
+#
+# originally written in 2006 by Matt Mackall
+#  (at least, this was in his bloatwatch source code)
+#
+# diffconfig is a simple utility for comparing two .config files.
+# Using standard diff to compare .config files often includes
+# extraneous and distracting information.  This utility produces
+# sorted output with only the changes in configuration values
+# between the two files.
+#
+# Added and removed items are shown with a leading plus or minus,
+# respectively.  Changed items show the old and new values on a
+# single line.
+#
+# Example usage:
+# $ diffconfig .config config-test-nfs-off
+# -LOCKD  y
+# -LOCKD_V4  y
+# -NFS_COMMON  y
+# -NFS_DIRECTIO  n
+# -NFS_V3  y
+# -NFS_V3_ACL  n
+# -NFS_V4  n
+# -ROOT_NFS  y
+# -RPCSEC_GSS_KRB5  n
+# -RPCSEC_GSS_SPKM3  n
+# -SUNRPC  y
+# -SUNRPC_BIND34  n
+#  NFS_FS  y -> n
+
+import sys, os
+
+if len(sys.argv) < 3:
+	print "Usage: diffconfig <config1> <config2>"
+	sys.exit(0)
+
+# returns a dictionary of name/value pairs for config items in the file
+def readconfig(config_file):
+    d = {}
+    for line in config_file:
+        line = line[:-1]
+        if line[:7] == "CONFIG_":
+            name, val = line[7:].split("=", 1)
+            d[name] = val
+        if line[-11:] == " is not set":
+            d[line[9:-11]] = "n"
+    return d
+
+a = readconfig(file(sys.argv[1]))
+b = readconfig(file(sys.argv[2]))
+
+# print items in a but not b (accumulate, sort and print)
+old = []
+for config in a:
+    if config not in b:
+        old.append(config)
+
+old.sort()
+
+for config in old:
+    print "-%s  %s" % (config, a[config])
+    del a[config]
+
+# print items that changed (accumulate, sort, and print)
+changed = []
+for config in a:
+    if a[config] != b[config]:
+        changed.append(config)
+    else:
+        del b[config]
+
+changed.sort()
+
+for config in changed:
+    print " %s  %s -> %s" % (config, a[config], b[config])
+    del b[config]
+
+# now print items in b but not in a
+
+# the items from b that were in a (either the same or that changed) were removed
+# the only items left were not in a
+new = b.keys()
+
+new.sort()
+
+for config in new:
+    print "+%s  %s" % (config, b[config])
#1 lore raw
Quoted 5 lines · Tim Bird

Delivery-date: Tue, 10 Jun 2008 21:44:08 +0200
From: Tim Bird <[email protected]>
To: linux-embedded <[email protected]>
CC: linux kernel <[email protected]>
Subject: [PATCH] add diffconfig utility

Neat. But I have one nagging question: who do you expect to merge this patch? ;)

Jörn

Signature · 2 lines
Premature optimization is the root of all evil.
-- Donald Knuth
#2 lore raw
Quoted 9 lines · Jörn Engel
Quoted 5 lines · Tim Bird

Delivery-date: Tue, 10 Jun 2008 21:44:08 +0200
From: Tim Bird <[email protected]>
To: linux-embedded <[email protected]>
CC: linux kernel <[email protected]>
Subject: [PATCH] add diffconfig utility

Neat. But I have one nagging question: who do you expect to merge this patch? ;)

I will merge it if the feedabck is positive and eventual feedback is dealt with. (And Tim reminds me to do so in a week or so).

I take most of the random scripts in scripts/ via kbuild.git.

Sam

author
#3 lore raw

execute bit on scripts (was Re: [PATCH] add diffconfig utility)

Quoted 2 lines · Sam Ravnborg

I will merge it if the feedabck is positive and eventual feedback is dealt with. (And Tim reminds me to do so in a week or so).

Thanks.

Quoted 1 line

I take most of the random scripts in scripts/ via kbuild.git.

OK - sounds like you're the right person to ask a question that has been nagging me.

Is there a proper way to get the execute bit set in the git tree on patches that contain scripts? I think patches produced by git have something that sets the file permissions? Is this something that can (or should) be hand-added to a non-git patch? (I use quilt).

I put that blurb in the patch description about doing a 'chmod a+x', but that doesn't seem reliable.
-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony Corporation of America
=============================

#4 lore raw

Re: execute bit on scripts (was Re: [PATCH] add diffconfig utility)

Quoted 9 lines · Tim Bird
Quoted 2 lines

I take most of the random scripts in scripts/ via kbuild.git.

OK - sounds like you're the right person to ask a question that has been nagging me.

Is there a proper way to get the execute bit set in the git tree on patches that contain scripts? I think patches produced by git have something that sets the file permissions?

If the patch was produced with git it should have a line like

	new file mode 100755
#5 lore raw
In reply to Tim Bird
Quoted 48 lines · Tim Bird

diffconfig is a simple utility for comparing two .config files. Using standard diff to compare .config files often includes extraneous and distracting information. This utility produces sorted output with only the changes in configuration values between the two files.

I have found this handy for use in testing to detect when option dependencies unexpectedly affect other options.

To use, apply the patch and 'chmod a+x scripts/diffconfig'

 diffconfig |   90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+)
scripts/diffconfig +28 -0
@@ -0,0 +1,90 @@
+#!/usr/bin/python
+#
+# diffconfig - a tool to compare .config files.
+#
+# originally written in 2006 by Matt Mackall
+#  (at least, this was in his bloatwatch source code)
+#
+# diffconfig is a simple utility for comparing two .config files.
+# Using standard diff to compare .config files often includes
+# extraneous and distracting information.  This utility produces
+# sorted output with only the changes in configuration values
+# between the two files.
+#
+# Added and removed items are shown with a leading plus or minus,
+# respectively.  Changed items show the old and new values on a
+# single line.
+#
+# Example usage:
+# $ diffconfig .config config-test-nfs-off
+# -LOCKD  y
+# -LOCKD_V4  y
+# -NFS_COMMON  y
+# -NFS_DIRECTIO  n
+# -NFS_V3  y
+# -NFS_V3_ACL  n
+# -NFS_V4  n
+# -ROOT_NFS  y
+# -RPCSEC_GSS_KRB5  n

scripts/diffconfig line 38

Quoted 10 lines
scripts/diffconfig +10 -0
+# -RPCSEC_GSS_SPKM3  n
+# -SUNRPC  y
+# -SUNRPC_BIND34  n
+#  NFS_FS  y -> n
+
+import sys, os
+
+if len(sys.argv) < 3:
+	print "Usage: diffconfig <config1> <config2>"
+	sys.exit(0)

I know this is unix style to be very short in usage - but then they have man pages.
Could we add a bit more from the nice description above to usage?

Quoted 42 lines
scripts/diffconfig +42 -0
+
+# returns a dictionary of name/value pairs for config items in the file
+def readconfig(config_file):
+    d = {}
+    for line in config_file:
+        line = line[:-1]
+        if line[:7] == "CONFIG_":
+            name, val = line[7:].split("=", 1)
+            d[name] = val
+        if line[-11:] == " is not set":
+            d[line[9:-11]] = "n"
+    return d
+
+a = readconfig(file(sys.argv[1]))
+b = readconfig(file(sys.argv[2]))
+
+# print items in a but not b (accumulate, sort and print)
+old = []
+for config in a:
+    if config not in b:
+        old.append(config)
+
+old.sort()
+
+for config in old:
+    print "-%s  %s" % (config, a[config])
+    del a[config]
+
+# print items that changed (accumulate, sort, and print)
+changed = []
+for config in a:
+    if a[config] != b[config]:
+        changed.append(config)
+    else:
+        del b[config]
+
+changed.sort()
+
+for config in changed:
+    print " %s  %s -> %s" % (config, a[config], b[config])
+    del b[config]
+

scripts/diffconfig line 90

Quoted 10 lines
scripts/diffconfig +10 -0
+# now print items in b but not in a
+
+# the items from b that were in a (either the same or that changed) were removed
+# the only items left were not in a
+new = b.keys()
+
+new.sort()
+
+for config in new:
+    print "+%s  %s" % (config, b[config])

No feedback on the implmentation - I do not speak phython.

Sam

author
#6 lore raw
Quoted 3 lines · Sam Ravnborg

I know this is unix style to be very short in usage - but then they have man pages.
Could we add a bit more from the nice description above to usage?

Good idea. Might as well make it visible.

Quoted 5 lines · David Woodhouse

It'd be really nice if it could give its output in the same form as the .config file itself -- so it'd look something like:

# CONFIG_FOO is not set
CONFIG_BAR=y

OK, a new version is below. Right now, when printing in "merge" style, the code omits items that are absent in the new config. These should get set correctly (removed) if you do a 'make oldconfig'. It would be trivial to have them output as well, if you think that would be better.

I am experimentally trying to attach a git-style file mode to this patch. I did this by hand, so it might not work. (The index line is totally made up). Let me know if there are problems.

Diffconfig is a simple utility for comparing two .config files. See usage in the script for more info.

 scripts/diffconfig |  108 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 108 insertions(+)
 create mode 100755 scripts/diffconfig
scripts/diffconfig new file +108 -0
new file mode 100755
index 0000000..aa6cfe1
@@ -0,0 +1,108 @@
+#!/usr/bin/python
+#
+# diffconfig - a tool to compare .config files.
+#
+# originally written in 2006 by Matt Mackall
+#  (at least, this was in his bloatwatch source code)
+# last worked on 2008 by Tim Bird
+#
+
+import sys, os
+
+merge_style = 0
+if "-m" in sys.argv:
+    merge_style = 1
+    sys.argv.remove("-m")
+
+if "-h" in sys.argv or len(sys.argv) < 3:
+    print "Usage: diffconfig [-h] [-m] <config1> <config2>\n"
+    print """Diffconfig is a simple utility for comparing two .config files.
+Using standard diff to compare .config files often includes
+extraneous and distracting information.  This utility produces
+sorted output with only the changes in configuration values
+between the two files.
+
+Added and removed items are shown with a leading plus or minus,
+respectively.  Changed items show the old and new values on a
+single line.
+
+If -m is specified, then output will be in "merge" style,
+which has the changed and new values in kernel config option format.
+
+Example usage:
+ $ diffconfig .config config-with-some-changes
+-EXT2_FS_XATTR  n
+-EXT2_FS_XIP  n
+ CRAMFS  n -> y
+ EXT2_FS  y -> n
+ LOG_BUF_SHIFT  14 -> 16
+ PRINTK_TIME  n -> y
+"""
+    sys.exit(0)
+
+# returns a dictionary of name/value pairs for config items in the file
+def readconfig(config_file):
+    d = {}
+    for line in config_file:
+        line = line[:-1]
+        if line[:7] == "CONFIG_":
+            name, val = line[7:].split("=", 1)
+            d[name] = val
+        if line[-11:] == " is not set":
+            d[line[9:-11]] = "n"
+    return d
+
+a = readconfig(file(sys.argv[1]))
+b = readconfig(file(sys.argv[2]))
+
+def print_config(op, config, value, new_value):
+    if merge_style:
+        if new_value:
+            if new_value=="n":
+                print "# CONFIG_%s is not set" % config
+            else:
+                print "CONFIG_%s=%s" % (config, new_value)
+    else:
+        if op=="-":
+            print "-%s %s" % (config, value)
+        elif op=="+":
+            print "+%s %s" % (config, new_value)
+        else:
+            print " %s %s -> %s" % (config, value, new_value)
+
+# print items in a but not b (accumulate, sort and print)
+old = []
+for config in a:
+    if config not in b:
+        old.append(config)
+
+old.sort()
+
+for config in old:
+    print_config("-", config, a[config], None)
+    del a[config]
+
+# print items that changed (accumulate, sort, and print)
+changed = []
+for config in a:
+    if a[config] != b[config]:
+        changed.append(config)
+    else:
+        del b[config]
+
+changed.sort()
+
+for config in changed:
+    print_config("->", config, a[config], b[config])
+    del b[config]
+
+# now print items in b but not in a
+
+# the items from b that were in a (either the same or that changed) were removed
+# the only items left were not in a
+new = b.keys()
+
+new.sort()
+
+for config in new:
+    print_config("+", config, None, b[config])
#7 lore raw

scripts/diffconfig line 17

Quoted 6 lines · Tim Bird
scripts/diffconfig new file +6 -0
+merge_style = 0
+if "-m" in sys.argv:
+    merge_style = 1
+    sys.argv.remove("-m")
+
+if "-h" in sys.argv or len(sys.argv) < 3:
                                        ^^^

No checking for excess arguments?

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   [email protected]
Internet: http://www.sony-europe.com/

Sony Technology and Software Centre Europe
A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels
Fortis 293-0376800-10 GEBA-BE-BB

author
#8 lore raw
Quoted 1 line · Geert Uytterhoeven

No checking for excess arguments?

Quoted 2 lines · Holger Schurig

Would it be helpful to compare .config.old to .config if you don't provide any command line arguments?

Both good ideas. These are implemented in the latest version. Note that I check for and use KBUILD_OUTPUT. (I always put my build output outside the source directory, since I usually build for multiple arches from a single tree.)

The program is also now better structured, IMHO.
-- Tim

Diffconfig is a simple utility for comparing two .config files. See usage in the script for more info.

 scripts/diffconfig |  128 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 128 insertions(+)
 create mode 100755 scripts/diffconfig
scripts/diffconfig new file +128 -0
new file mode 100755
index 0000000..aa6cfe1
@@ -0,0 +1,128 @@
+#!/usr/bin/python
+#
+# diffconfig - a tool to compare .config files.
+#
+# originally written in 2006 by Matt Mackall
+#  (at least, this was in his bloatwatch source code)
+# last worked on 2008 by Tim Bird
+#
+
+import sys, os
+
+def usage():
+    print "Usage: diffconfig [-h] [-m] [<config1> <config2>]\n"
+    print """Diffconfig is a simple utility for comparing two .config files.
+Using standard diff to compare .config files often includes extraneous and
+distracting information.  This utility produces sorted output with only the
+changes in configuration values between the two files.
+
+Added and removed items are shown with a leading plus or minus, respectively.
+Changed items show the old and new values on a single line.
+
+If -m is specified, then output will be in "merge" style, which has the changed
+and new values in kernel config option format.
+
+If no config files are specified, .config and .config.old are used.
+
+Example usage:
+ $ diffconfig .config config-with-some-changes
+-EXT2_FS_XATTR  n
+-EXT2_FS_XIP  n
+ CRAMFS  n -> y
+ EXT2_FS  y -> n
+ LOG_BUF_SHIFT  14 -> 16
+ PRINTK_TIME  n -> y
+"""
+    sys.exit(0)
+
+# returns a dictionary of name/value pairs for config items in the file
+def readconfig(config_file):
+    d = {}
+    for line in config_file:
+        line = line[:-1]
+        if line[:7] == "CONFIG_":
+            name, val = line[7:].split("=", 1)
+            d[name] = val
+        if line[-11:] == " is not set":
+            d[line[9:-11]] = "n"
+    return d
+
+def print_config(op, config, value, new_value):
+    global merge_style
+
+    if merge_style:
+        if new_value:
+            if new_value=="n":
+                print "# CONFIG_%s is not set" % config
+            else:
+                print "CONFIG_%s=%s" % (config, new_value)
+    else:
+        if op=="-":
+            print "-%s %s" % (config, value)
+        elif op=="+":
+            print "+%s %s" % (config, new_value)
+        else:
+            print " %s %s -> %s" % (config, value, new_value)
+
+def main():
+    global merge_style
+
+    # parse command line args
+    if ("-h" in sys.argv or "--help" in sys.argv):
+	usage()
+
+    merge_style = 0
+    if "-m" in sys.argv:
+        merge_style = 1
+        sys.argv.remove("-m")
+
+    argc = len(sys.argv)
+    if not (argc==1 or argc == 3):
+        print "Error: incorrect number of arguments or unrecognized option"
+        usage()
+
+    if argc == 1:
+        # if no filenames given, assume .config and .config.old
+        build_dir=""
+        if os.environ.has_key("KBUILD_OUTPUT"):
+            build_dir = os.environ["KBUILD_OUTPUT"]+"/"
+
+        configa_filename = build_dir + ".config.old"
+        configb_filename = build_dir + ".config"
+    else:
+        configa_filename = sys.argv[1]
+        configb_filename = sys.argv[2]
+
+    a = readconfig(file(configa_filename))
+    b = readconfig(file(configb_filename))
+
+    # print items in a but not b (accumulate, sort and print)
+    old = []
+    for config in a:
+        if config not in b:
+            old.append(config)
+    old.sort()
+    for config in old:
+        print_config("-", config, a[config], None)
+        del a[config]
+
+    # print items that changed (accumulate, sort, and print)
+    changed = []
+    for config in a:
+        if a[config] != b[config]:
+            changed.append(config)
+        else:
+            del b[config]
+    changed.sort()
+    for config in changed:
+        print_config("->", config, a[config], b[config])
+        del b[config]
+
+    # now print items in b but not in a
+    # (items from b that were in a were removed above)
+    new = b.keys()
+    new.sort()
+    for config in new:
+        print_config("+", config, None, b[config])
+
+main()
#9 lore raw

Hi Tim.

Quoted 2 lines

The program is also now better structured, IMHO.
-- Tim

Seeing this programs gets frequent updates (good!) I have not yet applied it.

When you consider it stabilized could you please drop me a new mail including full changelog and updated patch.

And please cc: [email protected] + linux-kernel on the submission.

Thanks,
Sam

author
#10 lore raw
Quoted 5 lines · Sam Ravnborg

Hi Tim.

Quoted 2 lines

The program is also now better structured, IMHO.
-- Tim

Quoted 8 lines

Seeing this programs gets frequent updates (good!) I have not yet applied it.

When you consider it stabilized could you please drop me a new mail including full changelog and updated patch.

And please cc: [email protected] + linux-kernel on the submission.

Will do. I'll give it a little settle time, and then notify you.
-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony Corporation of America
=============================

author
#11 lore raw

PATCH 1/1 add diffconfig utility (v2)

In reply to Sam Ravnborg
Quoted 5 lines · Sam Ravnborg

When you consider it stabilized could you please drop me a new mail including full changelog and updated patch.

And please cc: [email protected] + linux-kernel on the submission.

Sam,

I haven't gotten any more feedback, and I believe I've addressed all previous feedback.

As for the ChangeLog, here's some information about history and recent changes. I can put this in the patch/script if desired.

CHANGELOG:
2008-06-24 - Tim Bird <[email protected]> - add usage function,
add -m feature for merge-style output, use .config and .config.old by default, improve command line handling
~2007 - Tim Bird - re-format code for internal use at Sony ~2006 - Matt Mackall - create original diffconfig tool as part of
bloatwatch project

Diffconfig is a simple utility for comparing two kernel configuration files. See usage in the script for more info.

 scripts/diffconfig |  129 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100755 scripts/diffconfig
scripts/diffconfig new file +129 -0
new file mode 100755
index 0000000..aa6cfe1
@@ -0,0 +1,129 @@
+#!/usr/bin/python
+#
+# diffconfig - a tool to compare .config files.
+#
+# originally written in 2006 by Matt Mackall
+#  (at least, this was in his bloatwatch source code)
+# last worked on 2008 by Tim Bird
+#
+
+import sys, os
+
+def usage():
+    print """Usage: diffconfig [-h] [-m] [<config1> <config2>]
+
+Diffconfig is a simple utility for comparing two .config files.
+Using standard diff to compare .config files often includes extraneous and
+distracting information.  This utility produces sorted output with only the
+changes in configuration values between the two files.
+
+Added and removed items are shown with a leading plus or minus, respectively.
+Changed items show the old and new values on a single line.
+
+If -m is specified, then output will be in "merge" style, which has the
+changed and new values in kernel config option format.
+
+If no config files are specified, .config and .config.old are used.
+
+Example usage:
+ $ diffconfig .config config-with-some-changes
+-EXT2_FS_XATTR  n
+-EXT2_FS_XIP  n
+ CRAMFS  n -> y
+ EXT2_FS  y -> n
+ LOG_BUF_SHIFT  14 -> 16
+ PRINTK_TIME  n -> y
+"""
+    sys.exit(0)
+
+# returns a dictionary of name/value pairs for config items in the file
+def readconfig(config_file):
+    d = {}
+    for line in config_file:
+        line = line[:-1]
+        if line[:7] == "CONFIG_":
+            name, val = line[7:].split("=", 1)
+            d[name] = val
+        if line[-11:] == " is not set":
+            d[line[9:-11]] = "n"
+    return d
+
+def print_config(op, config, value, new_value):
+    global merge_style
+
+    if merge_style:
+        if new_value:
+            if new_value=="n":
+                print "# CONFIG_%s is not set" % config
+            else:
+                print "CONFIG_%s=%s" % (config, new_value)
+    else:
+        if op=="-":
+            print "-%s %s" % (config, value)
+        elif op=="+":
+            print "+%s %s" % (config, new_value)
+        else:
+            print " %s %s -> %s" % (config, value, new_value)
+
+def main():
+    global merge_style
+
+    # parse command line args
+    if ("-h" in sys.argv or "--help" in sys.argv):
+	usage()
+
+    merge_style = 0
+    if "-m" in sys.argv:
+        merge_style = 1
+        sys.argv.remove("-m")
+
+    argc = len(sys.argv)
+    if not (argc==1 or argc == 3):
+        print "Error: incorrect number of arguments or unrecognized option"
+        usage()
+
+    if argc == 1:
+        # if no filenames given, assume .config and .config.old
+        build_dir=""
+        if os.environ.has_key("KBUILD_OUTPUT"):
+            build_dir = os.environ["KBUILD_OUTPUT"]+"/"
+
+        configa_filename = build_dir + ".config.old"
+        configb_filename = build_dir + ".config"
+    else:
+        configa_filename = sys.argv[1]
+        configb_filename = sys.argv[2]
+
+    a = readconfig(file(configa_filename))
+    b = readconfig(file(configb_filename))
+
+    # print items in a but not b (accumulate, sort and print)
+    old = []
+    for config in a:
+        if config not in b:
+            old.append(config)
+    old.sort()
+    for config in old:
+        print_config("-", config, a[config], None)
+        del a[config]
+
+    # print items that changed (accumulate, sort, and print)
+    changed = []
+    for config in a:
+        if a[config] != b[config]:
+            changed.append(config)
+        else:
+            del b[config]
+    changed.sort()
+    for config in changed:
+        print_config("->", config, a[config], b[config])
+        del b[config]
+
+    # now print items in b but not in a
+    # (items from b that were in a were removed above)
+    new = b.keys()
+    new.sort()
+    for config in new:
+        print_config("+", config, None, b[config])
+
+main()
#12 lore raw

Re: [PATCH] add diffconfig utility (v2)

Quoted 7 lines · Tim Bird
Quoted 5 lines · Sam Ravnborg

When you consider it stabilized could you please drop me a new mail including full changelog and updated patch.

And please cc: [email protected] + linux-kernel on the submission.

Quoted 7 lines

Sam,

I haven't gotten any more feedback, and I believe I've addressed all previous feedback.

As for the ChangeLog, here's some information about history and recent changes. I can put this in the patch/script if desired.

Very cool tool, I like it a lot, thanks for pushing this.

greg k-h

Applied
#13 lore raw

Re: [PATCH] add diffconfig utility (v2)

In reply to Tim Bird
Quoted 11 lines · Tim Bird
Quoted 5 lines · Sam Ravnborg

When you consider it stabilized could you please drop me a new mail including full changelog and updated patch.

And please cc: [email protected] + linux-kernel on the submission.

Sam,

I haven't gotten any more feedback, and I believe I've addressed all previous feedback.

Thanks, applied

Sam

#14 lore raw
In reply to Tim Bird

scripts/diffconfig line 16

Quoted 3 lines · Tim Bird
scripts/diffconfig +3 -0
+# Added and removed items are shown with a leading plus or minus,
+# respectively.  Changed items show the old and new values on a
+# single line.

It'd be really nice if it could give its output in the same form as the .config file itself -- so it'd look something like:

# CONFIG_FOO is not set
CONFIG_BAR=y

That can be used with this kind of tool too...

Signature · 1 line
dwmw2
author
#15 lore raw
Quoted 10 lines · David Woodhouse

scripts/diffconfig line 16

Quoted 3 lines · Tim Bird
scripts/diffconfig +3 -0
+# Added and removed items are shown with a leading plus or minus,
+# respectively.  Changed items show the old and new values on a
+# single line.

It'd be really nice if it could give its output in the same form as the .config file itself -- so it'd look something like:

# CONFIG_FOO is not set
CONFIG_BAR=y

Would an option for that style of output be OK?

The tool currently produces something similar to a diff (but with changed lines compressed to a single line for conciseness). It should be easy to produce something that can be used with another tool to transform one config into another.

It's unclear what to do with variables that are supposed to be removed from the config (as opposed to be set to "CONFIG_FOO is not set" Does merge.pl handle this, or is this left to something like 'make oldconfig'?
-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony Corporation of America
=============================

#16 lore raw
In reply to David Woodhouse
Quoted 8 lines · On Tue, 10 Jun 2008 23:07:04 +0100 David Woodhouse <[email protected]> wrote:

scripts/diffconfig line 16

Quoted 3 lines · Tim Bird
scripts/diffconfig +3 -0
+# Added and removed items are shown with a leading plus or minus,
+# respectively.  Changed items show the old and new values on a
+# single line.

It'd be really nice if it could give its output in the same form as the .config file itself -- so it'd look something like:

Quoted 5 lines

# CONFIG_FOO is not set
CONFIG_BAR=y

That can be used with this kind of tool too...

the person who wrote that tool also wrote a similar diff tool ;) but it's horrible perl I suspect.

Signature · 3 lines
If you want to reach me at my work email, use [email protected]
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#17 lore raw
Quoted 2 lines · Arjan van de Ven

the person who wrote that tool also wrote a similar diff tool ;) but it's horrible perl I suspect.

Yeah, but I can't find it in CVS right now for some reason.

Signature · 1 line
dwmw2
#18 lore raw
In reply to Tim Bird

Nice.

Would it be helpful to compare .config.old to .config if you don't provide any command line arguments?

scripts/diffconfig

would then do the job.