[70292] contrib/restore_ports/restore_ports.tcl

jmr at macports.org jmr at macports.org
Thu Aug 5 02:20:25 PDT 2010


Revision: 70292
          http://trac.macports.org/changeset/70292
Author:   jmr at macports.org
Date:     2010-08-05 02:20:24 -0700 (Thu, 05 Aug 2010)
Log Message:
-----------
restore_ports: use activate target when installing ports with recent macports versions

Modified Paths:
--------------
    contrib/restore_ports/restore_ports.tcl

Modified: contrib/restore_ports/restore_ports.tcl
===================================================================
--- contrib/restore_ports/restore_ports.tcl	2010-08-05 08:27:58 UTC (rev 70291)
+++ contrib/restore_ports/restore_ports.tcl	2010-08-05 09:20:24 UTC (rev 70292)
@@ -143,6 +143,11 @@
 }
 
 proc install_ports {operationList} {
+    if {[rpm-vercomp [macports::version] 1.8.2] <= 0} {
+        set install_target install
+    } else {
+        set install_target activate
+    }
     foreach op $operationList {
         set name [string trim [lindex $op 0]]
         set variations [lindex $op 1]
@@ -168,7 +173,7 @@
             puts "$errorInfo"
             return -code error "Unable to open port '$name': $result"
         }
-        if {[catch {set result [mportexec $workername install]} result]} {
+        if {[catch {set result [mportexec $workername $install_target]} result]} {
             global errorInfo
             mportclose $workername
             ui_msg "$errorInfo"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100805/44cf7e0b/attachment.html>


More information about the macports-changes mailing list