diff mbox series

package/nut: workaround parallel build issue

Message ID 20171223152911.12640-1-yann.morin.1998@free.fr
State Rejected
Headers show
Series package/nut: workaround parallel build issue | expand

Commit Message

Yann E. MORIN Dec. 23, 2017, 3:29 p.m. UTC
The conditions are not trivial to reproduce, but it can happen that the
headers are not fully regenerated by the time they are included.

Since they already are present and current in the archive, just patch
out their generation from the Makefile.

Fixes:
    http://autobuild.buildroot.org/results/523/5231ff39a0839ec5e1962662004214d4b0773068/
    http://autobuild.buildroot.org/results/5a7/5a75d44c028e77b58f0fd9ab794952f2b477dd84/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 .../nut/0003-tools-do-not-regenerate-headers.patch | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/nut/0003-tools-do-not-regenerate-headers.patch

Comments

Peter Korsgaard Dec. 26, 2017, 6:56 p.m. UTC | #1
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > The conditions are not trivial to reproduce, but it can happen that the
 > headers are not fully regenerated by the time they are included.

 > Since they already are present and current in the archive, just patch
 > out their generation from the Makefile.

 > Fixes:
 >     http://autobuild.buildroot.org/results/523/5231ff39a0839ec5e1962662004214d4b0773068/
 >     http://autobuild.buildroot.org/results/5a7/5a75d44c028e77b58f0fd9ab794952f2b477dd84/

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Thanks, but doesn't it make more sense to just use MAKE1 instead of such
a non-upstreamable patch?

Nut is not a very big package and has no reverse dependencies, so the
impact of MAKE1 is quite small.
Yann E. MORIN Dec. 28, 2017, 1:24 p.m. UTC | #2
On 2017-12-26 19:56 +0100, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > The conditions are not trivial to reproduce, but it can happen that the
>  > headers are not fully regenerated by the time they are included.
> 
>  > Since they already are present and current in the archive, just patch
>  > out their generation from the Makefile.
> 
>  > Fixes:
>  >     http://autobuild.buildroot.org/results/523/5231ff39a0839ec5e1962662004214d4b0773068/
>  >     http://autobuild.buildroot.org/results/5a7/5a75d44c028e77b58f0fd9ab794952f2b477dd84/
> 
>  > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Thanks, but doesn't it make more sense to just use MAKE1 instead of such
> a non-upstreamable patch?
> 
> Nut is not a very big package and has no reverse dependencies, so the
> impact of MAKE1 is quite small.

I timed a nut build, and indeed the build time for a non-parallel build
is split as such (on an otherwise-unloaded machine):

    14:18:03 >>> nut 2.7.4 Extracting
    14:18:03 >>> nut 2.7.4 Patching
    14:18:03 >>> nut 2.7.4 Updating config.sub and config.guess
    14:18:03 >>> nut 2.7.4 Configuring
    14:18:03 >>> nut 2.7.4 Autoreconfiguring
    14:18:10 >>> nut 2.7.4 Patching libtool
    14:18:15 >>> nut 2.7.4 Building
    14:18:37 >>> nut 2.7.4 Installing to target

So it is about 34s, of which 22s to build, while a parallel build would
take just about 8s to build.

I'll send a patch to use MAKE1.

Regards,
Yann E. MORIN.
Peter Korsgaard Dec. 28, 2017, 10:11 p.m. UTC | #3
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 >> Nut is not a very big package and has no reverse dependencies, so the
 >> impact of MAKE1 is quite small.

 > I timed a nut build, and indeed the build time for a non-parallel build
 > is split as such (on an otherwise-unloaded machine):

 >     14:18:03 >>> nut 2.7.4 Extracting
 >     14:18:03 >>> nut 2.7.4 Patching
 >     14:18:03 >>> nut 2.7.4 Updating config.sub and config.guess
 >     14:18:03 >>> nut 2.7.4 Configuring
 >     14:18:03 >>> nut 2.7.4 Autoreconfiguring
 >     14:18:10 >>> nut 2.7.4 Patching libtool
 >     14:18:15 >>> nut 2.7.4 Building
 >     14:18:37 >>> nut 2.7.4 Installing to target

 > So it is about 34s, of which 22s to build, while a parallel build would
 > take just about 8s to build.

 > I'll send a patch to use MAKE1.

Great, thanks!
diff mbox series

Patch

diff --git a/package/nut/0003-tools-do-not-regenerate-headers.patch b/package/nut/0003-tools-do-not-regenerate-headers.patch
new file mode 100644
index 0000000000..4045c5668d
--- /dev/null
+++ b/package/nut/0003-tools-do-not-regenerate-headers.patch
@@ -0,0 +1,39 @@ 
+From f14e783b3575ccd3db5ca61fddec3ff5a033d530 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Sat, 23 Dec 2017 16:21:27 +0100
+Subject: [PATCH] tools: do not regenerate headers
+
+This is definitely not parallel-safe, and as the commetns explain,
+fixing is not trivial. Since the headers are alreasy correct in the
+archive, we just do not regenerate them.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+---
+Upstream status: not upstreamable.
+---
+ tools/Makefile.am | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 1ba28201..7c144649 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -14,13 +14,11 @@
+ # Anyway, for the time being, we force build in ./ before nut-scanner,
+ # to have nutscan-{usb,snmp}.h built before going into the nut-scanner
+ # sub-directory
+-SUBDIRS = . nut-scanner
++SUBDIRS = nut-scanner
+ 
+ EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh nut-ddl-dump.sh \
+   gitlog2changelog.py nut-snmpinfo.py driver-list-format.sh
+ 
+-all: nut-scanner-deps 
+-
+ # XXX these rules are all bogus!  They cause un-named target files to
+ # always be rebuilt!  None of that is ever the right way to use make,
+ # and especially not Automake.  Explicit filenames and their exact
+-- 
+2.11.0
+