[51534] users/ryandesign/minivmac-devel

ryandesign at macports.org ryandesign at macports.org
Wed May 27 09:05:31 PDT 2009


Revision: 51534
          http://trac.macports.org/changeset/51534
Author:   ryandesign at macports.org
Date:     2009-05-27 09:05:31 -0700 (Wed, 27 May 2009)
Log Message:
-----------
minivmac-devel: No longer use Expect script to mount disk images since we no longer need to be able to auto-accept a disk image's license agreement.

Modified Paths:
--------------
    users/ryandesign/minivmac-devel/Portfile

Removed Paths:
-------------
    users/ryandesign/minivmac-devel/files/attach.exp

Modified: users/ryandesign/minivmac-devel/Portfile
===================================================================
--- users/ryandesign/minivmac-devel/Portfile	2009-05-27 16:04:58 UTC (rev 51533)
+++ users/ryandesign/minivmac-devel/Portfile	2009-05-27 16:05:31 UTC (rev 51534)
@@ -90,7 +90,7 @@
 }
 
 post-extract {
-    xinstall -W ${filespath} attach.exp runbuild.sh ${workpath}
+    xinstall -W ${filespath} runbuild.sh ${workpath}
     
     # The disk image mounter likes images to have the .img extension.
     file rename ${workpath}/${my_src}/${my_src}.dsk ${workpath}/src.img
@@ -194,9 +194,14 @@
 proc my_attach_disk_image {disk_image allow_writing} {
     global name workpath
     set mountpoint [exec mktemp -d -q -t ${name}]
-    # Use this expect script instead of using hdiutil directly, because the
-    # system disk image has a license agreement we must agree to.
-    system "${workpath}/attach.exp '${disk_image}' '${mountpoint}' '${allow_writing}'"
+    if {${allow_writing}} {
+        set flag "-readwrite"
+    } else {
+        set flag "-readonly"
+    }
+    set my_cmd "hdiutil attach ${disk_image} -mountpoint ${mountpoint} -private -nobrowse -noautoopen -noautofsck -noverify ${flag}"
+    ui_debug ${my_cmd}
+    system ${my_cmd}
     return ${mountpoint}
 }
 

Deleted: users/ryandesign/minivmac-devel/files/attach.exp
===================================================================
--- users/ryandesign/minivmac-devel/files/attach.exp	2009-05-27 16:04:58 UTC (rev 51533)
+++ users/ryandesign/minivmac-devel/files/attach.exp	2009-05-27 16:05:31 UTC (rev 51534)
@@ -1,23 +0,0 @@
-#!/usr/bin/env expect --
-
-if {[lindex $argv 2]} {
-	set flag "-readwrite"
-} else {
-	set flag "-readonly"
-}
-
-spawn hdiutil attach "[lindex $argv 0]" -mountpoint "[lindex $argv 1]" -private -nobrowse -noautoopen -noautofsck -noverify $flag
-
-expect {
-	"Software License" {
-		exp_send "q"
-		exp_continue
-	}
-	"Agree Y/N?" {
-		exp_send "y\r"
-		exp_continue
-	}
-	"/dev/" {
-		interact
-	}
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090527/f59fea12/attachment-0001.html>


More information about the macports-changes mailing list