[34844] trunk/base/src/package1.0/portmdmg.tcl

afb at macports.org afb at macports.org
Sat Mar 8 12:57:45 PST 2008


Revision: 34844
          http://trac.macosforge.org/projects/macports/changeset/34844
Author:   afb at macports.org
Date:     2008-03-08 12:57:44 -0800 (Sat, 08 Mar 2008)

Log Message:
-----------
block size guess comes up short, use -srcfolder option instead (#13968)

Modified Paths:
--------------
    trunk/base/src/package1.0/portmdmg.tcl

Modified: trunk/base/src/package1.0/portmdmg.tcl
===================================================================
--- trunk/base/src/package1.0/portmdmg.tcl	2008-03-08 20:46:44 UTC (rev 34843)
+++ trunk/base/src/package1.0/portmdmg.tcl	2008-03-08 20:57:44 UTC (rev 34844)
@@ -73,7 +73,7 @@
 	# there is a minimum of 8292 512 blocks in a dmg
         set blocks 8292
     } else {
-	# this should later be replaced with hdiutil create -srcfolder
+	# this is now replaced with hdiutil create -srcfolder
         set blocks [expr ($size/512) + ((($size/512)*3)/100)]
     }
     
@@ -86,6 +86,7 @@
         set subdev 2
     }
     
+  if {false} {
     if {[system "hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
     }
@@ -96,6 +97,11 @@
     regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
     system "ditto -rsrcFork ${mpkgpath} '${mount_point}/${portname}-${portversion}.mpkg'"
     system "hdiutil detach ${devicename} -quiet"
+  } else {
+    if {[system "hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${mpkgpath} ${tmp_image}"] != ""} {
+        return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
+    }
+  }
     if {[system "hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
         return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
     }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080308/d5b1d4b2/attachment.html 


More information about the macports-changes mailing list