diff options
| author | Robert Yang <liezhi.yang@windriver.com> | 2024-10-08 08:47:27 -0700 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-11-26 05:37:09 -0800 |
| commit | 29732ee9dacc970f6bf68da5a44db5db517ea238 (patch) | |
| tree | decb12b9b51ec30fc75a801ae4426339d8a3a7cc /meta | |
| parent | daca1765ee8b9c09529d1f2b12c381cfbb60e668 (diff) | |
| download | poky-29732ee9dacc970f6bf68da5a44db5db517ea238.tar.gz | |
cml1.bbclass: do_diffconfig: Don't override .config with .config.orig
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: 3647eb69038917971a9d8ca9553875adddcc893f)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6cccf6b02f92dad514e65fd779ff659b19eb6be7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-recipe/cml1.bbclass | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes-recipe/cml1.bbclass b/meta/classes-recipe/cml1.bbclass index 8c207daec4..0bf171a668 100644 --- a/meta/classes-recipe/cml1.bbclass +++ b/meta/classes-recipe/cml1.bbclass | |||
| @@ -93,10 +93,9 @@ python do_diffconfig() { | |||
| 93 | 93 | ||
| 94 | if isdiff: | 94 | if isdiff: |
| 95 | statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment | 95 | statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment |
| 96 | subprocess.call(statement, shell=True) | ||
| 97 | # No need to check the exit code as we know it's going to be | 96 | # No need to check the exit code as we know it's going to be |
| 98 | # non-zero, but that's what we expect. | 97 | # non-zero, but that's what we expect. |
| 99 | shutil.copy(configorig, config) | 98 | subprocess.call(statement, shell=True) |
| 100 | 99 | ||
| 101 | bb.plain("Config fragment has been dumped into:\n %s" % fragment) | 100 | bb.plain("Config fragment has been dumped into:\n %s" % fragment) |
| 102 | else: | 101 | else: |
