deal with flakey hdiutil
hdiutil create -format UDBZ -size 640m -srcfolder tmp/build-dmg \ -volname git-annex -o tmp/git-annex.dmg hdiutil: create failed - Resource busy Sometimes it has failed this way for weeks until reboot. Sometimes a single retry makes it work. Despite many reports of this problem, I have never found for an explanation for it, other than <shrug> OSX.
This commit is contained in:
parent
96418dcd11
commit
b02bf9f0eb
1 changed files with 13 additions and 2 deletions
15
Makefile
15
Makefile
|
@ -241,8 +241,19 @@ osxapp:
|
||||||
cd $(OSXAPP_DEST) && find . -type f > Contents/MacOS/git-annex.MANIFEST
|
cd $(OSXAPP_DEST) && find . -type f > Contents/MacOS/git-annex.MANIFEST
|
||||||
cd $(OSXAPP_DEST) && find . -type l >> Contents/MacOS/git-annex.MANIFEST
|
cd $(OSXAPP_DEST) && find . -type l >> Contents/MacOS/git-annex.MANIFEST
|
||||||
rm -f tmp/git-annex.dmg
|
rm -f tmp/git-annex.dmg
|
||||||
hdiutil create -format UDBZ -size 640m -srcfolder tmp/build-dmg \
|
|
||||||
-volname git-annex -o tmp/git-annex.dmg
|
# hdiutil sometimes fails with "resource busy", so try a few times
|
||||||
|
ok=0; for x in 1 2 3 4 5; do \
|
||||||
|
if [ $$ok = 0 ]; then \
|
||||||
|
if hdiutil create -format UDBZ -size 640m -srcfolder tmp/build-dmg \
|
||||||
|
-volname git-annex -o tmp/git-annex.dmg; \
|
||||||
|
then \
|
||||||
|
ok=1; \
|
||||||
|
else \
|
||||||
|
sleep 60; \
|
||||||
|
fi \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
|
||||||
# Bypass cabal, and only run the main ghc --make command for a
|
# Bypass cabal, and only run the main ghc --make command for a
|
||||||
# faster development build.
|
# faster development build.
|
||||||
|
|
Loading…
Reference in a new issue