svn commit: r248383 - in user/cperciva/portsnap-build: . s
Colin Percival
cperciva at FreeBSD.org
Sat Mar 16 21:02:44 UTC 2013
Author: cperciva
Date: Sat Mar 16 21:02:42 2013
New Revision: 248383
URL: http://svnweb.freebsd.org/changeset/base/248383
Log:
If umount(8) fails, sleep for a second and try again. Without this,
portsnap builds sometimes fail with "unmount failed: Device busy".
Modified:
user/cperciva/portsnap-build/build.sh
user/cperciva/portsnap-build/releasesnap.sh
user/cperciva/portsnap-build/s/describes-run.sh
user/cperciva/portsnap-build/s/treesnap-build.sh
Modified: user/cperciva/portsnap-build/build.sh
==============================================================================
--- user/cperciva/portsnap-build/build.sh Sat Mar 16 20:28:38 2013 (r248382)
+++ user/cperciva/portsnap-build/build.sh Sat Mar 16 21:02:42 2013 (r248383)
@@ -81,7 +81,9 @@ fi
rm ${SIGDIR}/*.ssl
# Unmount and delete the snapshot disk
-umount /dev/md${SNAPMD}
+while ! umount /dev/md${SNAPMD}; do
+ sleep 1
+done
mdconfig -d -u ${SNAPMD}
# Delete indexes
Modified: user/cperciva/portsnap-build/releasesnap.sh
==============================================================================
--- user/cperciva/portsnap-build/releasesnap.sh Sat Mar 16 20:28:38 2013 (r248382)
+++ user/cperciva/portsnap-build/releasesnap.sh Sat Mar 16 21:02:42 2013 (r248383)
@@ -59,7 +59,9 @@ echo "portsnap|`date "+%s"`|`sha256 -q $
tar -czf ${TARBALL} -C ${WORKDIR} tag tINDEX INDEX.gz files
# Unmount and delete the snapshot disk
-umount /dev/md${SNAPMD}
+while ! umount /dev/md${SNAPMD}; do
+ sleep 1
+done
mdconfig -d -u ${SNAPMD}
# Delete temporary directories
Modified: user/cperciva/portsnap-build/s/describes-run.sh
==============================================================================
--- user/cperciva/portsnap-build/s/describes-run.sh Sat Mar 16 20:28:38 2013 (r248382)
+++ user/cperciva/portsnap-build/s/describes-run.sh Sat Mar 16 21:02:42 2013 (r248383)
@@ -81,10 +81,18 @@ else
fi
# Clean up
-umount ${JAILDIR}/dev
-umount ${JAILDIR}/tmp
-umount ${JAILDIR}/usr/ports
-umount ${JAILDIR}
+while ! umount ${JAILDIR}/dev; do
+ sleep 1
+done
+while ! umount ${JAILDIR}/tmp; do
+ sleep 1
+done
+while ! umount ${JAILDIR}/usr/ports; do
+ sleep 1
+done
+while ! umount ${JAILDIR}; do
+ sleep 1
+done
mdconfig -d -u ${JAILMD}
mdconfig -d -u ${TMPMD}
devfs rule -s ${RULESET} delset
Modified: user/cperciva/portsnap-build/s/treesnap-build.sh
==============================================================================
--- user/cperciva/portsnap-build/s/treesnap-build.sh Sat Mar 16 20:28:38 2013 (r248382)
+++ user/cperciva/portsnap-build/s/treesnap-build.sh Sat Mar 16 21:02:42 2013 (r248383)
@@ -35,7 +35,9 @@ echo "`date`: Building snapshot tarballs
sh -e s/treesnap-mktars-all.sh ${PORTSDIR} ${SNAP} ${SNAP}/INDEX ${TMP}
# Unmount the ports tree
-umount /dev/md${PORTSMD}
+while ! umount /dev/md${PORTSMD}; do
+ sleep 1
+done
# Perform index describes
for N in ${DESCRIBES}; do
More information about the svn-src-user
mailing list