Patchwork cml1: correct diffconfig output format

login
register
mail settings
Submitter Stefan Müller-Klieser
Date July 28, 2014, 8:14 a.m.
Message ID <1406535284-12222-1-git-send-email-s.mueller-klieser@phytec.de>
Download mbox | patch
Permalink /patch/76745/
State Accepted
Commit 6a7b98993350d0d24eae0058ae26ae19cfdf7c4c
Headers show

Comments

Stefan Müller-Klieser - July 28, 2014, 8:14 a.m.
If used with some packages using kconfig mechanism, the diffconfig
command generates wrong output format. Diff provides all options to
format the output correctly. This method formats as intended, is more
robust and works with the merge_config.h script from yocto-kernel-tools.

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
---
 meta/classes/cml1.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 34c0c4e..0d4b10b 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -58,7 +58,7 @@  python do_diffconfig() {
         bb.fatal("No config files found. Did you do menuconfig ?\n%s" % e)
 
     if isdiff:
-        statement = 'diff -Nurp ' + configorig + ' ' + config + '| sed -n "s/^\+//p" >' + fragment
+        statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L"' + configorig + ' ' + config + '>' + fragment
         subprocess.call(statement, shell=True)
 
         shutil.copy(configorig, config)