--- src/port/port	2007-05-02 21:59:01.000000000 -0400
+++ /opt/mpq/bin/port.hack	2007-05-02 22:03:06.000000000 -0400
@@ -2161,6 +2161,8 @@ array set action_array {
 	pkg			action_target
 	rpmpackage	action_target
 
+        dry             action_target
+
 	quit		action_exit
 	exit		action_exit
 }
diff -rup src/darwinports1.0/darwinports.tcl /opt/mpq/share/darwinports/Tcl/darwinports1.0/darwinports.tcl
--- src/darwinports1.0/darwinports.tcl	2007-04-17 00:03:57.000000000 -0400
+++ /opt/mpq/share/darwinports/Tcl/darwinports1.0/darwinports.tcl	2007-05-02 22:38:50.000000000 -0400
@@ -957,7 +957,7 @@ proc _dportexec {target dport} {
 	if {![catch {$workername eval eval_variants variations $target} result] && $result == 0 &&
 		![catch {$workername eval eval_targets $target} result] && $result == 0} {
 		# If auto-clean mode, clean-up after dependency install
-		if {[string equal ${darwinports::portautoclean} "yes"]} {
+		if {$target != "dry" && [string equal ${darwinports::portautoclean} "yes"]} {
 			# Make sure we are back in the port path before clean
 			# otherwise if the current directory had been changed to
 			# inside the port,  the next port may fail when trying to
@@ -977,6 +977,10 @@ proc _dportexec {target dport} {
 # dportexec
 # Execute the specified target of the given dport.
 
+proc false {args} {
+  return 0
+}
+
 proc dportexec {dport target} {
     global darwinports::registry.installtype
 
@@ -997,7 +1001,7 @@ proc dportexec {dport target} {
 	if {$target == "configure" || $target == "build"
 		|| $target == "test"
 		|| $target == "destroot" || $target == "install"
-		|| $target == "archive"
+		|| $target == "archive" || $target == "dry"
 		|| $target == "pkg" || $target == "mpkg"
 		|| $target == "rpmpackage" || $target == "dpkg" } {
 
@@ -1014,12 +1018,14 @@ proc dportexec {dport target} {
 		# install them
 		# xxx: as with below, this is ugly.  and deps need to be fixed to
 		# understand Port Images before this can get prettier
-		if { [string equal ${darwinports::registry.installtype} "image"] } {
+                if { $target == "dry" } {  # if this is a dry run, then run all dependencies dry
+		    set result [dlist_eval $dlist false [list _dportexec "dry"]]
+		} elseif { [string equal ${darwinports::registry.installtype} "image"] } {
 			set result [dlist_eval $dlist _dportinstalled [list _dportexec "activate"]]
 		} else {
 			set result [dlist_eval $dlist _dportinstalled [list _dportexec "install"]]
 		}
-		
+
 		if {$result != {}} {
 			set errstring "The following dependencies failed to build:"
 			foreach ditem $result {
@@ -1282,6 +1288,7 @@ proc dportdepends {dport {target ""} {re
 		mpkg		-
 		rpmpackage	-
 		dpkg		-
+		dry			{ set deptypes "depends_lib depends_build depends_run" }
 		""			{ set deptypes "depends_lib depends_build depends_run" }
 	}
 	
diff -rup src/port1.0/port.tcl /opt/mpq/share/darwinports/Tcl/port1.0/port.tcl
--- src/port1.0/port.tcl	2007-03-27 01:05:05.000000000 -0400
+++ /opt/mpq/share/darwinports/Tcl/port1.0/port.tcl	2007-05-02 22:06:16.000000000 -0400
@@ -51,3 +51,4 @@ package require porttrace 1.0
 package require portdistcheck 1.0
 package require portlivecheck 1.0
 package require portmirror 1.0
+package require portdry 1.0

