GNU bug report logs - #10470
MSYS: race in directory access?

Previous Next

Package: automake;

Reported by: Peter Rosin <peda <at> lysator.liu.se>

Date: Mon, 9 Jan 2012 23:09:01 UTC

Severity: minor

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 10470 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Rosin <peda <at> lysator.liu.se>
Cc: 10470 <at> debbugs.gnu.org
Subject: Re: bug#10470: MSYS: race in directory access?
Date: Wed, 11 Jan 2012 18:31:06 +0100
[Message part 1 (text/plain, inline)]
Hi Peter, sorry for the delay.

>>>> We could enhance your original workaround like this:
>>>>
>>>>  am__remove_distdir = \
>>>>    { test ! -d "$(distdir)" \
>>>>      || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
>>>> -         && rm -fr "$(distdir)"; }; }
>>>> +         && if rm -fr "$(distdir)"; then :; else \
>>>> +## On MSYS (1.0.17) it is not possible to remove a directory that is
>>>> +## in use; so, if the first rm fails, we sleep some seconds and retry,
>>>> +## to give pending processes some time to exit and "release" the
>>>> +## directory before we removed.  See automake bug#10470.
>>>> +              sleep 5 && rm -fr "$(distdir)"; fi; }; }
>>>>  am__post_remove_distdir = $(am__remove_distdir)
>>>>  endif %?TOPDIR_P%
>>
>>> This works, best so far!  Committable, if you ask me.
>>>
> 
Could you try the attached test case to see if it can reliably expose the
problem on MSYS/MinGW?  If yes, I'll prepare a patch shortly.

Thanks,
  Stefano
[distcheck-pr10470.test (text/plain, attachment)]

This bug report was last modified 13 years and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.