Subject: bug#10975: 'make dist-gz dist-xz' fails

From: Olaf Lenz <[email-masked]>
Date: Thu, 08 Mar 2012 10:22:32 +0100

Hi!

I'm using Automake 1.11.3 and Autoconf 2.68.

Creating two different distribution packages on the command line of make
fails:

> make dist-bzip2 dist-xz
[clip]
tardir=espresso-3.1.0-1-gf2e4716-dirty && ${TAR-tar} chof - "$tardir" |
BZIP2=${BZIP2--9} bzip2 -c >espresso-3.1.0-1-gf2e4716-dirty.tar.bz2
if test -d "espresso-3.1.0-1-gf2e4716-dirty"; then find
"espresso-3.1.0-1-gf2e4716-dirty" -type d ! -perm -200 -exec chmod u+w
{} ';' && rm -rf "espresso-3.1.0-1-gf2e4716-dirty" || { sleep 5 && rm
-rf "espresso-3.1.0-1-gf2e4716-dirty"; }; else :; fi
tardir=espresso-3.1.0-1-gf2e4716-dirty && ${TAR-tar} chof - "$tardir" |
XZ_OPT=${XZ_OPT--e} xz -c >espresso-3.1.0-1-gf2e4716-dirty.tar.xz
tar: espresso-3.1.0-1-gf2e4716-dirty: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
if test -d "espresso-3.1.0-1-gf2e4716-dirty"; then find
"espresso-3.1.0-1-gf2e4716-dirty" -type d ! -perm -200 -exec chmod u+w
{} ';' && rm -rf "espresso-3.1.0-1-gf2e4716-dirty" || { sleep 5 && rm
-rf "espresso-3.1.0-1-gf2e4716-dirty"; }; else :; fi

The problem seems to be a race condition.
"make dist-bzip2" populates the distribution dir, tars it and deletes it
after 5 seconds. During that time "make dist-xz" has started and noticed
that the distdir already exists. Unfortunately, it is deleted while
dist-xz is still packing.

Olaf

-- 
Dr. rer. nat. Olaf Lenz
Institut für Computerphysik, Pfaffenwaldring 27, D-70569 Stuttgart
Phone: +49-711-685-63607