Skip to content

Commit

Permalink
cml1.bbclass: do_diffconfig: Don't override .config with .config.orig
Browse files Browse the repository at this point in the history
Fixed:
1) $ bitbake virtual/kernel -cmenuconfig
Do some changes and save the new config to default .config.
2) $ bitbake virtual/kernel -cdiffconfig
The config fragment is dumped into ${WORKDIR}/fragment.cfg.

But the .config which was saved by step #1 is overridden by .config.orig, so
the changes will be lost if run 'bitbake virtual/kernel'

And the following comment is for subprocess.call(), not for shutil.copy(),
so move subprocess.call() to the correct location.
    # No need to check the exit code as we know it's going to be
    # non-zero, but that's what we expect.

(From OE-Core rev: 94b583e4f7186bfd0909f0c300b3b5b31b9509c7)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
robertlinux authored and rpurdie committed Oct 10, 2024
1 parent 692cebc commit 944bd82
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions meta/classes-recipe/cml1.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ python do_diffconfig() {

if isdiff:
statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment
subprocess.call(statement, shell=True)
# No need to check the exit code as we know it's going to be
# non-zero, but that's what we expect.
shutil.copy(configorig, config)
subprocess.call(statement, shell=True)

bb.plain("Config fragment has been dumped into:\n %s" % fragment)
else:
Expand Down

0 comments on commit 944bd82

Please sign in to comment.