bug-automake
[Top][All Lists]
Advanced

[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: Fri, 30 Dec 2022 14:15:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

Hello again.

This time a patch that splits 'tar ... | gzip/bzip2/whatever' into 2 commands.

Yes, this introduces a requirement for a "temporary" .tar file (and i-node allocation, and filesystem free space/performance, and ...), but gives gains (I hope they're gains):

1) when 'tar' exits with an error, 'make' handles it and stops the packaging instead of letting the second packer in the chain possibly create an incomplete package,

2) when 'tar' fails but does NOT exit with an error, I check the standard error output for any messages. If present, I assume an error and let 'make' handle it like in case 1).

GNU tar behaves nicely: when a problem is encountered, it stops with an error exit code. The unfortunate default on my system, BSD tar, doesn't. In case of a problem, just a warning is emitted, the exit code is success even though files are missing from the resulting .tar file. And there is no way to turn those warnings into errors. No idea who thought of that. Hence manual checking stderr.

Feel free to modify the test if needed. I assumed all dist types are available, but that may not always be the case - maybe some conditionals are needed.

Regards,
Bogdan Drozdowski

--
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

Attachment: automake-tar-err-fails-mail.diff
Description: Text Data


reply via email to

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