[80893] contrib/restore_ports/restore_ports.tcl
jmr at macports.org
jmr at macports.org
Wed Jul 20 10:24:32 PDT 2011
Revision: 80893
http://trac.macports.org/changeset/80893
Author: jmr at macports.org
Date: 2011-07-20 10:24:31 -0700 (Wed, 20 Jul 2011)
Log Message:
-----------
restore_ports: use ability to install ports without activating
Modified Paths:
--------------
contrib/restore_ports/restore_ports.tcl
Modified: contrib/restore_ports/restore_ports.tcl
===================================================================
--- contrib/restore_ports/restore_ports.tcl 2011-07-20 15:36:17 UTC (rev 80892)
+++ contrib/restore_ports/restore_ports.tcl 2011-07-20 17:24:31 UTC (rev 80893)
@@ -143,17 +143,18 @@
}
proc install_ports {operationList} {
- if {[rpm-vercomp [macports::version] 1.9.1] < 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]
set active [lindex $op 2]
-
- if {[catch {set res [mportlookup $name]} result]} {
+
+ if {!$active || [rpm-vercomp [macports::version] 1.9.1] < 0} {
+ set install_target install
+ } else {
+ set install_target activate
+ }
+
+ if {[catch {set res [mportlookup $name]} result]} {
global errorInfo
ui_debug "$errorInfo"
return -code error "lookup of portname $name failed: $result"
@@ -183,19 +184,11 @@
}
# XXX some ports may be reactivated to fulfil dependencies - check again at the end?
- if {!$active} {
- if {[llength [info commands "portimage::deactivate_composite"]] == 1} {
- if {[catch {portimage::deactivate $name "" "" 0 [list ports_nodepcheck 1]} result]} {
- global errorInfo
- ui_debug "$errorInfo"
- return -code error "port deactivate failed: $result"
- }
- } else {
- if {[catch {portimage::deactivate $name "" [list ports_nodepcheck 1]} result]} {
- global errorInfo
- ui_debug "$errorInfo"
- return -code error "port deactivate failed: $result"
- }
+ if {[rpm-vercomp [macports::version] 1.9.1] < 0 && !$active} {
+ if {[catch {portimage::deactivate $name "" [list ports_nodepcheck 1]} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ return -code error "port deactivate failed: $result"
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110720/c7262e75/attachment.html>
More information about the macports-changes
mailing list