1 | Index: darwinports.tcl |
---|
2 | =================================================================== |
---|
3 | RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v |
---|
4 | retrieving revision 1.209 |
---|
5 | diff -u -r1.209 darwinports.tcl |
---|
6 | --- darwinports.tcl 19 Mar 2006 17:25:08 -0000 1.209 |
---|
7 | +++ darwinports.tcl 21 Mar 2006 15:36:17 -0000 |
---|
8 | @@ -1436,7 +1436,8 @@ |
---|
9 | |
---|
10 | # upgrade procedure |
---|
11 | proc darwinports::upgrade {portname dspec variationslist optionslist {depscachename ""}} { |
---|
12 | - global darwinports::registry.installtype |
---|
13 | + global darwinports::registry.installtype |
---|
14 | + global darwinports::portarchivemode |
---|
15 | array set options $optionslist |
---|
16 | array set variations $variationslist |
---|
17 | if {![string match "" $depscachename]} { |
---|
18 | @@ -1659,7 +1660,13 @@ |
---|
19 | } |
---|
20 | |
---|
21 | # install version_in_tree |
---|
22 | - if {[catch {set result [dportexec $workername destroot]} result] || $result != 0} { |
---|
23 | + if {0 == [string compare "yes" ${darwinports::portarchivemode}]} { |
---|
24 | + set upgrade_action "archive" |
---|
25 | + } else { |
---|
26 | + set upgrade_action "destroot" |
---|
27 | + } |
---|
28 | + |
---|
29 | + if {[catch {set result [dportexec $workername $upgrade_action]} result] || $result != 0} { |
---|
30 | global errorInfo |
---|
31 | ui_debug "$errorInfo" |
---|
32 | ui_error "Unable to upgrade port: $result" |
---|