Skip to content
This repository
Browse code

Don't remove the header-dir, since it gets bundled into the PBI now

Speed up the cleanup as well, don't need to do a rm -rf on STAGEDIR,
let the parent process do the cleanup as apart of the chroot. Also
more often than not it will be a ZFS dataset which we can more quickly
just destroy.
  • Loading branch information...
commit b2a8744a74ec7397b0c36c18bc377c834641e888 1 parent 48f81fc
Kris Moore authored September 29, 2013

Showing 1 changed file with 3 additions and 10 deletions. Show diff stats Hide diff stats

  1. 13  src-sh/pbi-manager10/pbi-manager
13  src-sh/pbi-manager10/pbi-manager
@@ -3527,9 +3527,6 @@ do_pbi_create_backup() {
3527 3527
 	# Make the header archive
3528 3528
 	mk_header_file
3529 3529
 
3530  
-	# Remove the new headerdir
3531  
-	rm -rf "$PBI_HEADERDIR"
3532  
-	
3533 3530
 	# Now finish up and make the resulting PBI file
3534 3531
 	mk_output_pbi
3535 3532
 
@@ -3580,7 +3577,6 @@ do_pbi_create() {
3580 3577
 	mk_header_dir
3581 3578
  	save_pbi_details_to_header
3582 3579
 	mk_header_file
3583  
-	rm_header_dir
3584 3580
 
3585 3581
 	mk_output_pbi
3586 3582
 
@@ -4058,12 +4054,6 @@ mk_header_dir() {
4058 4054
 	mkdir -p ${PBI_HEADERDIR}
4059 4055
 }
4060 4056
 
4061  
-# Remove the tmp header-dir
4062  
-rm_header_dir() {
4063  
-	PBI_HEADERDIR="${PBI_PROGDIRPATH}/.headerdir"
4064  
-	if [ -e "${PBI_HEADERDIR}" ] ; then rm -rf "${PBI_HEADERDIR}" ; fi
4065  
-}
4066  
-
4067 4057
 # Create a dir for staging the final archive
4068 4058
 mk_stage_dir() {
4069 4059
 	if [ -n "$1" ] ; then
@@ -4120,6 +4110,9 @@ mk_stage_dir() {
4120 4110
 
4121 4111
 # Remove the stagedir
4122 4112
 rm_stage_dir() {
  4113
+	# If this is in the chroot we can exit and let the parent cleanup
  4114
+	if [ "$0" = "pbi_makeport_chroot" ] ; then return; fi
  4115
+
4123 4116
 	cd /
4124 4117
 	PBI_STAGEDIR="${PBI_PROGDIRPATH}/.stagedir"
4125 4118
 	if [ -e "${PBI_STAGEDIR}" ] ; then 

0 notes on commit b2a8744

Please sign in to comment.
Something went wrong with that request. Please try again.