[107807] branches/gsoc13-tests/tests/test/library.tcl

marius at macports.org marius at macports.org
Fri Jul 5 17:12:56 PDT 2013


Revision: 107807
          https://trac.macports.org/changeset/107807
Author:   marius at macports.org
Date:     2013-07-05 17:12:56 -0700 (Fri, 05 Jul 2013)
Log Message:
-----------
Added desroot and config proc to library.

Modified Paths:
--------------
    branches/gsoc13-tests/tests/test/library.tcl

Modified: branches/gsoc13-tests/tests/test/library.tcl
===================================================================
--- branches/gsoc13-tests/tests/test/library.tcl	2013-07-06 00:10:53 UTC (rev 107806)
+++ branches/gsoc13-tests/tests/test/library.tcl	2013-07-06 00:12:56 UTC (rev 107807)
@@ -21,7 +21,7 @@
         exit 1
     }
 
-    set cpwd [eval file join {*}[lrange [file split $pwd] 0 end-2]]/
+    set cpwd [eval file join {*}[lrange [file split $pwd] 0 end-2]]
 
     set line [get_line $autoconf "prefix*"]
     set prefix [lrange [split $line " "] 1 1]
@@ -128,6 +128,35 @@
     set result [eval exec $env $bindir$cmd $args > output 2>@1]
 }
 
+# Run configure command.
+proc port_config {pwd} {
+    global path
+    global bindir
+    global portsrc
+
+    set env "env PORTSRC=${portsrc}"
+    set cmd "port"
+    set args "configure"
+
+    set result [eval exec $env $bindir$cmd $args 2>@1]
+}
+
+# Run desroot command.
+proc port_desroot {pwd} {
+    global path
+    global bindir
+    global portsrc
+    global work_dir
+    global output_file
+
+    set env "env PORTSRC=${portsrc}"
+    set cmd "port"
+    set args "destroot"
+
+    file copy -force $path/statefile $work_dir/.macports.statefile-unknown-version.state
+    set result [eval exec $env $bindir$cmd $args >$output_file 2>@1]
+}
+
 # Uninstalls portfile.
 proc port_uninstall {} {
     global bindir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130705/2eb8b48f/attachment.html>


More information about the macports-changes mailing list