Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] cml1.bbclass: do_diffconfig: Don't override .config with .config.orig
@ 2024-10-08 15:47 liezhi.yang
  2024-10-08 15:47 ` [PATCH 1/1] " liezhi.yang
  0 siblings, 1 reply; 2+ messages in thread
From: liezhi.yang @ 2024-10-08 15:47 UTC (permalink / raw)
  To: openembedded-core, bruce.ashfield

From: Robert Yang <liezhi.yang@windriver.com>

The following changes since commit d80e20d70d170397f9827c5a5fc75ad1f2e8cd94:

  pseudo: Fix envp bug and add posix_spawn wrapper (2024-10-08 13:27:22 +0100)

are available in the Git repository at:

  https://github.com/robertlinux/yocto rbt/cml1
  https://github.com/robertlinux/yocto/tree/rbt/cml1

Robert Yang (1):
  cml1.bbclass: do_diffconfig: Don't override .config with .config.orig

 meta/classes-recipe/cml1.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] cml1.bbclass: do_diffconfig: Don't override .config with .config.orig
  2024-10-08 15:47 [PATCH 0/1] cml1.bbclass: do_diffconfig: Don't override .config with .config.orig liezhi.yang
@ 2024-10-08 15:47 ` liezhi.yang
  0 siblings, 0 replies; 2+ messages in thread
From: liezhi.yang @ 2024-10-08 15:47 UTC (permalink / raw)
  To: openembedded-core, bruce.ashfield

From: Robert Yang <liezhi.yang@windriver.com>

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.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes-recipe/cml1.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes-recipe/cml1.bbclass b/meta/classes-recipe/cml1.bbclass
index 8c207daec41..0bf171a6681 100644
--- a/meta/classes-recipe/cml1.bbclass
+++ b/meta/classes-recipe/cml1.bbclass
@@ -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:
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-08 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 15:47 [PATCH 0/1] cml1.bbclass: do_diffconfig: Don't override .config with .config.orig liezhi.yang
2024-10-08 15:47 ` [PATCH 1/1] " liezhi.yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox