Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file
@ 2015-06-04  8:16 Herve Codina
  2015-06-05 20:24 ` Arnout Vandecappelle
  2015-06-06 11:54 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Herve Codina @ 2015-06-04  8:16 UTC (permalink / raw)
  To: buildroot

BR2_DEFCONFIG should not be present in saved defconfig file.

The use case is:
make qemu_arm_versatile
make savedefconfig BR2_DEFCONFIG=my_custom_defconfig

BR2_DEFCONFIG is set in my_custom_defconfig with an absolute path
to qemu_arm_versatile (value present in .config) and set in
my_custom_defconfig as it is different from default mentionned in
config.in (default is BR2_DEFCONFIG from environnement).

On savedefconfig recipe, simply remove BR2_DEFCONFIG from generated file

Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
---
 Makefile |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 43b5ba5..3c9e6fb 100644
--- a/Makefile
+++ b/Makefile
@@ -777,6 +777,7 @@ savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@$(COMMON_CONFIG_ENV) $< \
 		--savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
 		$(CONFIG_CONFIG_IN)
+	@sed -i '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)
 
 .PHONY: defconfig savedefconfig
 
-- 
1.7.9.5

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

* [Buildroot] [PATCH 1/1] savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file
  2015-06-04  8:16 [Buildroot] [PATCH 1/1] savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file Herve Codina
@ 2015-06-05 20:24 ` Arnout Vandecappelle
  2015-06-06 11:54 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2015-06-05 20:24 UTC (permalink / raw)
  To: buildroot

On 06/04/15 10:16, Herve Codina wrote:
> BR2_DEFCONFIG should not be present in saved defconfig file.
> 
> The use case is:
> make qemu_arm_versatile
> make savedefconfig BR2_DEFCONFIG=my_custom_defconfig
> 
> BR2_DEFCONFIG is set in my_custom_defconfig with an absolute path
> to qemu_arm_versatile (value present in .config) and set in

 Although that behaviour is clearly wrong, I thought long and hard about what
the appropriate behaviour would be. And indeed, even if you _don't_ change the
value of BR2_DEFCONFIG, it should not be saved into the defconfig file itself.

 I also thought Yann had a similar patch pending but couldn't find anything.

 So yes, this gets my

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

except for some small nits below.


> my_custom_defconfig as it is different from default mentionned in

mentioned

> config.in (default is BR2_DEFCONFIG from environnement).

environment

> 
> On savedefconfig recipe, simply remove BR2_DEFCONFIG from generated file
> 
> Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
> ---
>  Makefile |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 43b5ba5..3c9e6fb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -777,6 +777,7 @@ savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
>  	@$(COMMON_CONFIG_ENV) $< \
>  		--savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
>  		$(CONFIG_CONFIG_IN)
> +	@sed -i '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)

 sed -i -> $(SED)


 Now I see this, I wonder whether the condition is really needed. savedefconfig
only makes sense if there already is a .config, and if there is a .config, it
will have BR2_DEFCONFIG defined. But that's for a separate patch.


 Regards,
 Arnout

>  
>  .PHONY: defconfig savedefconfig
>  
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 1/1] savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file
  2015-06-04  8:16 [Buildroot] [PATCH 1/1] savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file Herve Codina
  2015-06-05 20:24 ` Arnout Vandecappelle
@ 2015-06-06 11:54 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2015-06-06 11:54 UTC (permalink / raw)
  To: buildroot

>>>>> "Herve" == Herve Codina <Herve.CODINA@celad.com> writes:

 > BR2_DEFCONFIG should not be present in saved defconfig file.
 > The use case is:
 > make qemu_arm_versatile
 > make savedefconfig BR2_DEFCONFIG=my_custom_defconfig

 > BR2_DEFCONFIG is set in my_custom_defconfig with an absolute path
 > to qemu_arm_versatile (value present in .config) and set in
 > my_custom_defconfig as it is different from default mentionned in
 > config.in (default is BR2_DEFCONFIG from environnement).

 > On savedefconfig recipe, simply remove BR2_DEFCONFIG from generated file

 > Signed-off-by: Herve Codina <Herve.CODINA@celad.com>

Committed with the issues pointed out by Arnout fixed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2015-06-06 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04  8:16 [Buildroot] [PATCH 1/1] savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file Herve Codina
2015-06-05 20:24 ` Arnout Vandecappelle
2015-06-06 11:54 ` Peter Korsgaard

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