[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19614: Split packaging invocation to catch errors

From: Bogdan
Subject: bug#19614: Split packaging invocation to catch errors
Date: Tue, 18 Jul 2023 21:26:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Nick Bowler <nbowler@draconx.ca>, Tue Jul 18 2023 08:55:53 GMT+0200
(Central European Summer Time)
On 2023-07-17, Karl Berry <karl@freefriends.org> wrote:
Hi Dimitrios, Bogdan - back on this bug from 2015 (sorry):

Bogdan sent a patch that splits the tar and compress into separate
invocations.  It seems basically good to me, but the dist-formats test
fails because it builds multiple archive formats (.tar.gz, .tar.bz2,
etc.) in parallel, and so removing $(distdir).tar (and .err) files are
subject to a race condition.

  dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c
+       tardir=$(distdir) && $(am__tar) > $(distdir).tar 2>$(distdir).tarerr

So my question is, will it suffice in this limited case to just put $$
into the filenames? It seems like it should be ok to me, but I'm not
sure I have enough imagination to know why that would fail. I can't see
figuring out how to run mktemp here.

With the tar file generation as a separate command, it should be
straightforward to avoid this problem by just moving the tar generation
and error checking commands into a separate rule.  Then changing all the
various dist-xyz commands to depend on that instead of distdir.  Example:

   $(distdir).tar: distdir
        commands to tar it

   dist-gzip: $(distdir).tar
        commands to gzip it

and so on.  Then there should be no race with parallel "make dist" as
the tar file will only be generated once.

 Probably a better idea than mine, e.g.

tmpname=`mktemp $(distdir)/dist.XXXXXX`
tardir=$(distdir) && $(am__tar) > $(tmpname).tar 2>$(distdir).err


tardir=$(distdir) && $(am__tar) > $(distdir)-$RANDOM.tar 2>$(distdir).err


Regards - Bogdan ('bogdro') D.                 (GNU/Linux & FreeDOS)
X86 assembly (DOS, GNU/Linux):    http://bogdro.evai.pl/index-en.php
Soft(EN): http://bogdro.evai.pl/soft  http://bogdro.evai.pl/soft4asm
www.Xiph.org  www.TorProject.org  www.LibreOffice.org  www.GnuPG.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]