From: Matthew Dillon Date: Wed, 22 Aug 2012 05:18:40 +0000 (-0700) Subject: fastbulk - Adjustments to fix various issues X-Git-Tag: v3.2.0~299 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/5b96694946dc972ff37811946fa8805a7b67764d fastbulk - Adjustments to fix various issues * We weren't properly installing the binary packages we were creating, resulting in parallel build races. Fixing this fixes most of the issues fastbulk was having. * Change the way pkgsrc is mounted... copy it to /build/fastbulk and add code to ensure that it is clean. * resident the bmake binary to speed things up a bit. --- diff --git a/test/fastbulk/Makefile b/test/fastbulk/Makefile index a4fe2d9..7d0cf3d 100644 --- a/test/fastbulk/Makefile +++ b/test/fastbulk/Makefile @@ -64,6 +64,7 @@ setup: cleanup mkdir -p ${BUILDBASE}/tmp/logs/bad mkdir -p ${BUILDBASE}/etc mkdir -p ${BUILDBASE}/usr.pkg + mkdir -p ${BUILDBASE}/usr.pkgsrc mkdir -p ${BUILDBASE}/usr.obj mkdir -p ${BUILDBASE}/var.db mkdir -p ${BUILDBASE}/var.db/pkg @@ -80,17 +81,24 @@ setup: cleanup mount_null ${BUILDBASE}/track ${BUILDROOT}/tmp/track mount_null ${BUILDBASE}/etc ${BUILDROOT}/etc mount_null ${BUILDBASE}/usr.pkg ${BUILDROOT}/usr/pkg + mount_null ${BUILDBASE}/usr.pkgsrc ${BUILDROOT}/usr/pkgsrc mount_null ${BUILDBASE}/usr.obj ${BUILDROOT}/usr/obj mount_null ${BUILDBASE}/var.db ${BUILDROOT}/var/db mount_null ${BUILDBASE}/var.db.pkg ${BUILDROOT}/var/db/pkg mount_null ${BUILDBASE}/var.db.pkg.refcount \ ${BUILDROOT}/var/db/pkg.refcount mount_null ${SYSROOT}/dev ${BUILDROOT}/dev - mount_null ${SYSPKGSRC} ${BUILDROOT}/usr/pkgsrc + cpdup -v -s0 -i0 -X ${.CURDIR}/pkgsrc.ign \ + ${SYSPKGSRC} ${BUILDROOT}/usr/pkgsrc + find ${BUILDROOT}/usr/pkgsrc -name work | xargs rm -rf + mkdir -p ${BUILDROOT}/usr/pkgsrc/packages + mkdir -p ${BUILDROOT}/usr/pkgsrc/distfiles mount_null ${BUILDBASE}/packages ${BUILDROOT}/usr/pkgsrc/packages mount_null ${BUILDBASE}/distfiles ${BUILDROOT}/usr/pkgsrc/distfiles + echo "finding and removing work directories" cleanup: + -resident -d ${BUILDROOT}/usr/pkg/bin/bmake -umount ${BUILDROOT}/usr/pkgsrc/distfiles > /dev/null 2>&1 -umount ${BUILDROOT}/usr/pkgsrc/packages > /dev/null 2>&1 -umount ${BUILDROOT}/usr/pkgsrc > /dev/null 2>&1 @@ -115,6 +123,7 @@ realclean: cleanup rm -rf ${BUILDBASE}/tmp rm -rf ${BUILDBASE}/track rm -rf ${BUILDBASE}/usr.pkg + rm -rf ${BUILDBASE}/usr.pkgsrc rm -rf ${BUILDBASE}/usr.obj rm -rf ${BUILDBASE}/var.db.pkg rm -rf ${BUILDBASE}/var.db.pkg.refcount @@ -124,6 +133,7 @@ realclean: cleanup bootstrap: rm -rf ${BUILDBASE}/usr.obj/work ${CHROOTENV} "cd /usr/pkgsrc/bootstrap; ./bootstrap --workdir=/usr/obj/work" + resident ${BUILDROOT}/usr/pkg/bin/bmake # Figure out what has changed and deinstall the related packages # diff --git a/test/fastbulk/dobuild b/test/fastbulk/dobuild index a1db2c0..9ee34f7 100755 --- a/test/fastbulk/dobuild +++ b/test/fastbulk/dobuild @@ -31,4 +31,5 @@ end # bmake deinstall DEINSTALLDEPENDS=ALL SKIP_LICENSE_CHECK=yes bmake repackage clean SKIP_LICENSE_CHECK=yes +bmake bin-install exit $status diff --git a/test/fastbulk/dochanges b/test/fastbulk/dochanges index c9e0b9d..a4df188 100755 --- a/test/fastbulk/dochanges +++ b/test/fastbulk/dochanges @@ -10,4 +10,5 @@ foreach pkgsrcdir ( `cat /tmp/track/changes.txt` ) bmake deinstall DEINSTALLDEPENDS=ALL bmake package-eat-cookie rm -f /usr/pkgsrc/packages/*/${pkgname}.tgz ) + popd end diff --git a/test/fastbulk/pkgsrc.ign b/test/fastbulk/pkgsrc.ign new file mode 100644 index 0000000..1fb56d9 --- /dev/null +++ b/test/fastbulk/pkgsrc.ign @@ -0,0 +1,4 @@ +distfiles +packages +.git +work