svn commit: r277393 - in projects/release-vmimage/release: scripts tools

Glen Barber gjb at FreeBSD.org
Mon Jan 19 18:17:22 UTC 2015


Author: gjb
Date: Mon Jan 19 18:17:21 2015
New Revision: 277393
URL: https://svnweb.freebsd.org/changeset/base/277393

Log:
  Remove the pkg-clean(8) call from vm_extra_pre_umount()
  since the function is often overridden.
  
  Add vm_extra_pkg_rmcache() to call pkg-clean(8) to avoid
  duplicated code.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/release-vmimage/release/scripts/mk-vmimage.sh
  projects/release-vmimage/release/tools/vmimage.subr

Modified: projects/release-vmimage/release/scripts/mk-vmimage.sh
==============================================================================
--- projects/release-vmimage/release/scripts/mk-vmimage.sh	Mon Jan 19 17:58:01 2015	(r277392)
+++ projects/release-vmimage/release/scripts/mk-vmimage.sh	Mon Jan 19 18:17:21 2015	(r277393)
@@ -100,6 +100,7 @@ main() {
 	vm_extra_install_ports
 	vm_extra_enable_services
 	vm_extra_pre_umount
+	vm_extra_pkg_rmcache
 	cleanup
 	vm_create_disk || return 0
 	vm_extra_create_disk

Modified: projects/release-vmimage/release/tools/vmimage.subr
==============================================================================
--- projects/release-vmimage/release/tools/vmimage.subr	Mon Jan 19 17:58:01 2015	(r277392)
+++ projects/release-vmimage/release/tools/vmimage.subr	Mon Jan 19 18:17:21 2015	(r277393)
@@ -146,6 +146,10 @@ vm_extra_pre_umount() {
 	# Prototype.  When overridden, installs additional ports within the
 	# virtual machine environment.
 
+	return 0
+}
+
+vm_extra_pkg_rmcache() {
 	if [ -e ${DESTDIR}/usr/local/sbin/pkg ]; then
 		chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \
 			/usr/local/sbin/pkg clean -y -a


More information about the svn-src-projects mailing list