All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig)
@ 2014-08-04 17:20 Yann E. MORIN
  2014-08-04 17:20 ` [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Yann E. MORIN @ 2014-08-04 17:20 UTC (permalink / raw)
  To: buildroot

Hello All!

This series fixes a nasty regression introduced with the pkg-kconfig
infrastructure recently applied, whereby kconfig packages are always
rebuilt on each 'make'.

The proposed fix consists in a post-configure hook, and I believe this
is enough to get us rolling for the next release.

A better fix would be to move the call to 'oldocnifg' out of the
packages, and into the kconfig infra itself, but this is a bit more
involved. This could be done in -next (or maybe in master shortly after
-rc1 if possible).

Regards,
Yann E. MORIN.


The following changes since commit 98a18ea01d7ea3f69bf5c44d48358dd110764c9c:

  m2tools: fix MIA comment dependencies (2014-08-04 18:29:40 +0200)

are available in the git repository at:

  git://gitorious.org/buildroot/buildroot.git yem/kconfig

for you to fetch changes up to fb48537ba04cc50d1f8043e5e347dedcdd5ba671:

  infra/pkg-kconfig: do not rebuild kconfig packages again and again (2014-08-04 19:13:30 +0200)

----------------------------------------------------------------
Yann E. MORIN (2):
      infra/pkg-kconfig: join comments to the related code-block
      infra/pkg-kconfig: do not rebuild kconfig packages again and again

 package/pkg-kconfig.mk | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block
  2014-08-04 17:20 [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Yann E. MORIN
@ 2014-08-04 17:20 ` Yann E. MORIN
  2014-08-04 17:24   ` Thomas De Schampheleire
  2014-08-04 17:24 ` [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again Yann E. MORIN
  2014-08-04 18:13 ` [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Thomas De Schampheleire
  2 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2014-08-04 17:20 UTC (permalink / raw)
  To: buildroot

Some one-line comment apply to equally-onel-line code blocks, and thus
the current layout is a bit hard to handle visually.

Remove empty lines between the comments and their respective related
code blocks.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pkg-kconfig.mk | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index 5220fdf..8b777f1 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -32,36 +32,30 @@ define inner-kconfig-package
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
 # Default values
-
 $(2)_KCONFIG_EDITORS ?= menuconfig
 $(2)_KCONFIG_OPT ?=
 $(2)_KCONFIG_FIXUP_CMDS ?=
 
 # FOO_KCONFIG_FILE is required
-
 ifndef $(2)_KCONFIG_FILE
 $$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
 endif
 
 # The .config file is obtained by copying it from the specified source
 # configuration file, after the package has been patched.
-
 $$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) | $(1)-patch
 	$$(INSTALL) -m 0644 $$($(2)_KCONFIG_FILE) $$($(2)_DIR)/.config
 
 # In order to get a usable, consistent configuration, some fixup may be needed.
 # The exact rules are specified by the package .mk file.
-
 $$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/.config
 	$$($(2)_KCONFIG_FIXUP_CMDS)
 	$$(Q)touch $$@
 
 # Before running configure, the configuration file should be present and fixed
-
 $$($(2)_TARGET_CONFIGURE): $$($(2)_DIR)/.stamp_kconfig_fixup_done
 
 # Configuration editors (menuconfig, ...)
-
 $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
 	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
 		$$($(2)_KCONFIG_OPT) $$(subst $(1)-,,$$@)
@@ -69,7 +63,6 @@ $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_
 	rm -f $$($(2)_DIR)/.stamp_{target,staging}_installed
 
 # Target to copy back the configuration to the source configuration file
-
 $(1)-update-config: $$($(2)_DIR)/.stamp_kconfig_fixup_done
 	cp -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
 
-- 
1.9.1

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

* [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block
  2014-08-04 17:20 ` [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block Yann E. MORIN
@ 2014-08-04 17:24   ` Thomas De Schampheleire
  2014-08-04 17:28     ` Yann E. MORIN
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas De Schampheleire @ 2014-08-04 17:24 UTC (permalink / raw)
  To: buildroot

"Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
>Some one-line comment apply to equally-onel-line code blocks, and thus

comments
'equally-onel-line'? Not sure what you mean here.

Content-wise:
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

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

* [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again
  2014-08-04 17:20 [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Yann E. MORIN
  2014-08-04 17:20 ` [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block Yann E. MORIN
@ 2014-08-04 17:24 ` Yann E. MORIN
  2014-08-04 17:32   ` Thomas De Schampheleire
  2014-08-04 18:13 ` [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Thomas De Schampheleire
  2 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2014-08-04 17:24 UTC (permalink / raw)
  To: buildroot

When a kconfig-based package executes its confiigure step, it may
overwrite it .config file. Thus, the .config file is more recent than
our stamp file .stamp_kconfig_fixup_done. On a subsequent build, out
dependency rules would kick in, and run the config fixup again, thus
kikcing in the package's configure, build and isntall steps yet once
more, that, ad libitum.

Fix that by introducing a post-configure hook that re-touches our stamp
file, so it is always more recent than the .config.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pkg-kconfig.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index 8b777f1..16cc154 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -55,6 +55,16 @@ $$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/.config
 # Before running configure, the configuration file should be present and fixed
 $$($(2)_TARGET_CONFIGURE): $$($(2)_DIR)/.stamp_kconfig_fixup_done
 
+# During their configure steps, some kconfig packages may regenerate their
+# .config file, thus making it more recent than our .stamp_kconfig_fixup_done
+# stamp file; thus, on a subsequent build, the package will be reconfigured
+# and rebuilt, re-installed, again and again...
+# Work around this by re-touching our stamp file after the configure step.
+define KCONFIG_RETOUCH_FIXUP_STAMP_HOOK
+	$$(Q)touch $$(@D)/.stamp_kconfig_fixup_done
+endef
+$(2)_POST_CONFIGURE_HOOKS += KCONFIG_RETOUCH_FIXUP_STAMP_HOOK
+
 # Configuration editors (menuconfig, ...)
 $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
 	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
-- 
1.9.1

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

* [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block
  2014-08-04 17:24   ` Thomas De Schampheleire
@ 2014-08-04 17:28     ` Yann E. MORIN
  0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2014-08-04 17:28 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-08-04 19:24 +0200, Thomas De Schampheleire spake thusly:
> "Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
> >Some one-line comment apply to equally-onel-line code blocks, and thus
> 
> comments
> 'equally-onel-line'? Not sure what you mean here.

Right, I will rephrase that (and try not to make other typoes).

> Content-wise:
> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again
  2014-08-04 17:24 ` [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again Yann E. MORIN
@ 2014-08-04 17:32   ` Thomas De Schampheleire
  2014-08-04 17:36     ` Thomas De Schampheleire
  2014-08-04 17:37     ` Yann E. MORIN
  0 siblings, 2 replies; 10+ messages in thread
From: Thomas De Schampheleire @ 2014-08-04 17:32 UTC (permalink / raw)
  To: buildroot

"Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
>When a kconfig-based package executes its confiigure step, it may

configure

>overwrite it .config file. Thus, the .config file is more recent than

its

>our stamp file .stamp_kconfig_fixup_done. On a subsequent build, out

our

>dependency rules would kick in, and run the config fixup again, thus
>kikcing in the package's configure, build and isntall steps yet once

kicking
install

>more, that, ad libitum.

You mean 'ad infinitum' ?

>
>Fix that by introducing a post-configure hook that re-touches our stamp
>file, so it is always more recent than the .config.

Could you share an example of which package does what type of change to the .config?

Thanks!
Thomas

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

* [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again
  2014-08-04 17:32   ` Thomas De Schampheleire
@ 2014-08-04 17:36     ` Thomas De Schampheleire
  2014-08-04 17:37     ` Yann E. MORIN
  1 sibling, 0 replies; 10+ messages in thread
From: Thomas De Schampheleire @ 2014-08-04 17:36 UTC (permalink / raw)
  To: buildroot

Thomas De Schampheleire <patrickdepinguin@gmail.com> schreef:
>"Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
>>When a kconfig-based package executes its confiigure step, it may
>
>configure
>
>>overwrite it .config file. Thus, the .config file is more recent than
>
>its
>
>>our stamp file .stamp_kconfig_fixup_done. On a subsequent build, out
>
>our
>
>>dependency rules would kick in, and run the config fixup again, thus
>>kikcing in the package's configure, build and isntall steps yet once
>
>kicking
>install
>
>>more, that, ad libitum.
>
>You mean 'ad infinitum' ?
>
>>
>>Fix that by introducing a post-configure hook that re-touches our stamp
>>file, so it is always more recent than the .config.
>
>Could you share an example of which package does what type of change to the .config?

Ah, this was explained in the intro mail, maybe it should be added here too...

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

* [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again
  2014-08-04 17:32   ` Thomas De Schampheleire
  2014-08-04 17:36     ` Thomas De Schampheleire
@ 2014-08-04 17:37     ` Yann E. MORIN
  1 sibling, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2014-08-04 17:37 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-08-04 19:32 +0200, Thomas De Schampheleire spake thusly:
> "Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
> >When a kconfig-based package executes its confiigure step, it may
> configure
> 
> >overwrite it .config file. Thus, the .config file is more recent than
> its
> 
> >our stamp file .stamp_kconfig_fixup_done. On a subsequent build, out
> our
> 
> >dependency rules would kick in, and run the config fixup again, thus
> >kikcing in the package's configure, build and isntall steps yet once
> kicking
> install

OK, fixed.

> >more, that, ad libitum.
> You mean 'ad infinitum' ?

Yep, that fits better, indeed. Ad nauseam fits, too... :-]
Will change, thanks.

> >Fix that by introducing a post-configure hook that re-touches our stamp
> >file, so it is always more recent than the .config.
> 
> Could you share an example of which package does what type of change to the .config?

Yep. Busybox. It calls 'make oldconfig' in its configure commands, thus
overwritting its .config.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig)
  2014-08-04 17:20 [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Yann E. MORIN
  2014-08-04 17:20 ` [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block Yann E. MORIN
  2014-08-04 17:24 ` [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again Yann E. MORIN
@ 2014-08-04 18:13 ` Thomas De Schampheleire
  2014-08-04 19:58   ` Yann E. MORIN
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas De Schampheleire @ 2014-08-04 18:13 UTC (permalink / raw)
  To: buildroot

"Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
>Hello All!
>
>This series fixes a nasty regression introduced with the pkg-kconfig
>infrastructure recently applied, whereby kconfig packages are always
>rebuilt on each 'make'.
>
>The proposed fix consists in a post-configure hook, and I believe this
>is enough to get us rolling for the next release.
>
>A better fix would be to move the call to 'oldocnifg' out of the
>packages, and into the kconfig infra itself, but this is a bit more
>involved. This could be done in -next (or maybe in master shortly after
>-rc1 if possible).

For uclibc, the oldconfig call is actually part of the fixup commands, so no problem there, right?

What if we do the same for busybox?

Best regards,
Thomas

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

* [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig)
  2014-08-04 18:13 ` [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Thomas De Schampheleire
@ 2014-08-04 19:58   ` Yann E. MORIN
  0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2014-08-04 19:58 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-08-04 20:13 +0200, Thomas De Schampheleire spake thusly:
> "Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
> >Hello All!
> >
> >This series fixes a nasty regression introduced with the pkg-kconfig
> >infrastructure recently applied, whereby kconfig packages are always
> >rebuilt on each 'make'.
> >
> >The proposed fix consists in a post-configure hook, and I believe this
> >is enough to get us rolling for the next release.
> >
> >A better fix would be to move the call to 'oldocnifg' out of the
> >packages, and into the kconfig infra itself, but this is a bit more
> >involved. This could be done in -next (or maybe in master shortly after
> >-rc1 if possible).
> 
> For uclibc, the oldconfig call is actually part of the fixup commands,
> so no problem there, right?

Right, I did look at it, and it should work OK.

> What if we do the same for busybox?

Well, I do not know what your plans are for the other kconfig packages,
so I came up with the hook solution, because it is fool-proof against
any future kconfig package messing arounf with oldconfig, and because we
need a quick fix.

But as I said in the cover-letter, we can further improve the situation
in -next.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2014-08-04 19:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 17:20 [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Yann E. MORIN
2014-08-04 17:20 ` [Buildroot] [PATCH 1/2] infra/pkg-kconfig: join comments to the related code-block Yann E. MORIN
2014-08-04 17:24   ` Thomas De Schampheleire
2014-08-04 17:28     ` Yann E. MORIN
2014-08-04 17:24 ` [Buildroot] [PATCH 2/2] infra/pkg-kconfig: do not rebuild kconfig packages again and again Yann E. MORIN
2014-08-04 17:32   ` Thomas De Schampheleire
2014-08-04 17:36     ` Thomas De Schampheleire
2014-08-04 17:37     ` Yann E. MORIN
2014-08-04 18:13 ` [Buildroot] [PATCH 0/2] Fix pkg-kconfig infra (branch yem/kconfig) Thomas De Schampheleire
2014-08-04 19:58   ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.