Date: Thu, 27 Sep 2007 09:26:14 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 126854 for review Message-ID: <200709270926.l8R9QE33087072@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126854 Change 126854 by jb@jb_freebsd1 on 2007/09/27 09:25:42 Not sure why this didn't integrate. Affected files ... .. //depot/projects/dtrace/src/tools/tools/nanobsd/nanobsd.sh#11 edit Differences ... ==== //depot/projects/dtrace/src/tools/tools/nanobsd/nanobsd.sh#11 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/tools/tools/nanobsd/nanobsd.sh,v 1.27 2007/06/12 11:35:29 phk Exp $ +# $FreeBSD: src/tools/tools/nanobsd/nanobsd.sh,v 1.28 2007/08/26 14:57:08 phk Exp $ # set -e @@ -83,6 +83,10 @@ # Number of code images on media (1 or 2) NANO_IMAGES=2 +# 0 -> Leave second image all zeroes so it compresses better. +# 1 -> Initialize second image with a copy of the first +NANO_INIT_IMG2=1 + # Size of code file system in 512 bytes sectors # If zero, size will be as large as possible. NANO_CODESIZE=0 @@ -402,7 +406,7 @@ ( cd ${MNT} && du -k ) > ${MAKEOBJDIRPREFIX}/_.du umount ${MNT} - if [ $NANO_IMAGES -gt 1 ] ; then + if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k mount /dev/${MD}s2a ${MNT} @@ -505,8 +509,11 @@ # Record how may we have now have=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l` - # Attempt to install more - chroot ${NANO_WORLDDIR} sh -c 'pkg_add -F Pkg/*' || true + # Attempt to install more packages + # ...but no more than 200 at a time due to pkg_add's internal + # limitations. + chroot ${NANO_WORLDDIR} sh -c \ + 'ls Pkg/*tbz | xargs -n 200 pkg_add -F' || true # See what that got us now=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l`
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709270926.l8R9QE33087072>