[107498] branches/gsoc13-tests/tests/test/library.tcl
marius at macports.org
marius at macports.org
Mon Jul 1 10:22:41 PDT 2013
Revision: 107498
https://trac.macports.org/changeset/107498
Author: marius at macports.org
Date: 2013-07-01 10:22:41 -0700 (Mon, 01 Jul 2013)
Log Message:
-----------
Added port_install and port_uninstall 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-01 16:51:51 UTC (rev 107497)
+++ branches/gsoc13-tests/tests/test/library.tcl 2013-07-01 17:22:41 UTC (rev 107498)
@@ -113,6 +113,30 @@
return $result
}
+# Installs new portfile.
+proc port_install {} {
+ global bindir
+ global portsrc
+
+ set env "env PORTSRC=${portsrc}"
+ set cmd "port"
+ set args "install"
+
+ set result [eval exec $env $bindir$cmd $args > output 2>@1]
+}
+
+# Uninstalls portfile.
+proc port_uninstall {} {
+ global bindir
+ global portsrc
+
+ set env "env PORTSRC=${portsrc}"
+ set cmd "port"
+ set args "uninstall"
+
+ set result [eval exec $env $bindir$cmd $args > output 2>@1]
+}
+
# Returns the line containint a given string
# from a given file, or -1 if nothing is found.
proc get_line {filename lookup} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130701/5eda899f/attachment.html>
More information about the macports-changes
mailing list