[64663] trunk/base/src

jmr at macports.org jmr at macports.org
Fri Mar 12 23:37:37 PST 2010


Revision: 64663
          http://trac.macports.org/changeset/64663
Author:   jmr at macports.org
Date:     2010-03-12 23:37:37 -0800 (Fri, 12 Mar 2010)
Log Message:
-----------
preserve requested property in upgrade

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl
    trunk/base/src/port/port.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2010-03-13 07:34:40 UTC (rev 64662)
+++ trunk/base/src/macports1.0/macports.tcl	2010-03-13 07:37:37 UTC (rev 64663)
@@ -1609,15 +1609,10 @@
     }
 
     set clean 0
-    if {[string equal $target "install"]} {
-        # mark port as explicitly requested
-        $workername eval set user_options(ports_requested) 1
-
+    if {[string equal $target "install"] && [string equal ${macports::registry.installtype} "image"]} {
         # If we're doing image installs, then we should activate after install
         # xxx: This isn't pretty
-        if { [string equal ${macports::registry.installtype} "image"] } {
-            set target activate
-        }
+        set target activate
     }
     if {[string equal ${macports::portautoclean} "yes"] && ([string equal $target "install"] || [string equal $target "activate"])} {
         # If we're doing an install, check if we should clean after
@@ -2708,6 +2703,7 @@
     if {$oldnegatedvariant == 0} {
         set oldnegatedvariant {}
     }
+    set requestedflag [registry::property_retrieve $regref requested]
 
     # Before we do
     # dependencies, we need to figure out the final variants,
@@ -2774,12 +2770,16 @@
         set newname $portname
     }
 
-    if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result]} {
+    array set interp_options [array get options]
+    set interp_options(ports_requested) $requestedflag
+
+    if {[catch {set workername [mportopen $porturl [array get interp_options] [array get variations]]} result]} {
         global errorInfo
         ui_debug "$errorInfo"
         ui_error "Unable to open port: $result"
         return 1
     }
+    array unset interp_options
 
     array unset portinfo
     array set portinfo [mportinfo $workername]

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2010-03-13 07:34:40 UTC (rev 64662)
+++ trunk/base/src/port/port.tcl	2010-03-13 07:37:37 UTC (rev 64663)
@@ -3024,9 +3024,8 @@
     if {[require_portlist portlist]} {
         return 1
     }
+    set target $action
     foreachport $portlist {
-        set target $action
-
         # If we have a url, use that, since it's most specific
         # otherwise try to map the portname to a url
         if {$porturl == ""} {
@@ -3082,6 +3081,10 @@
         if {[string length $portversion]} {
             set options(ports_version_glob) $portversion
         }
+        # if installing, mark the port as explicitly requested
+        if {$target == "install"} {
+            set options(ports_requested) 1
+        }
         if {[catch {set workername [mportopen $porturl [array get options] [array get requested_variations]]} result]} {
             global errorInfo
             ui_debug "$errorInfo"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100312/57655cc9/attachment-0001.html>


More information about the macports-changes mailing list