[99857] trunk/base/src

raimue at macports.org raimue at macports.org
Mon Nov 19 06:04:32 PST 2012


Revision: 99857
          https://trac.macports.org/changeset/99857
Author:   raimue at macports.org
Date:     2012-11-19 06:04:32 -0800 (Mon, 19 Nov 2012)
Log Message:
-----------
port/port.tcl, macports1.0/macports.tcl:
Do not display ticket report URL on upgrade if the reason for the failure was
that the port was not already installed or that the given port name was
invalid.

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	2012-11-19 13:59:03 UTC (rev 99856)
+++ trunk/base/src/macports1.0/macports.tcl	2012-11-19 14:04:32 UTC (rev 99857)
@@ -3404,12 +3404,16 @@
 }
 
 # upgrade API wrapper procedure
-# return codes: 0 = success, 1 = general failure, 2 = port name not found in index
+# return codes:
+#   0 = success
+#   1 = general failure
+#   2 = port name not found in index
+#   3 = port not installed
 proc macports::upgrade {portname dspec variationslist optionslist {depscachename ""}} {
     # only installed ports can be upgraded
     if {![registry::entry_exists_for_name $portname]} {
         ui_error "$portname is not installed"
-        return 1
+        return 3
     }
     if {![string match "" $depscachename]} {
         upvar $depscachename depscache

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2012-11-19 13:59:03 UTC (rev 99856)
+++ trunk/base/src/port/port.tcl	2012-11-19 14:04:32 UTC (rev 99857)
@@ -2593,16 +2593,17 @@
     foreachport $portlist {
         if {![info exists depscache(port:$portname)]} {
             set status [macports::upgrade $portname "port:$portname" [array get requested_variations] [array get options] depscache]
-            # status 2 means the port was not found in the index
-            if {$status != 0 && $status != 2 && ![macports::ui_isset ports_processall]} {
+            # status 2 means the port was not found in the index,
+            # status 3 means the port is not installed
+            if {$status != 0 && $status != 2 && $status != 3 && ![macports::ui_isset ports_processall]} {
                 break
             }
         }
     }
     
-    if {$status != 0} {
+    if {$status != 0 && $status != 2 && $status != 3} {
         print_tickets_url
-    } else {
+    } elseif {$status == 0} {
         array set options $opts
         if {![info exists options(ports_upgrade_no-rev-upgrade)] && ${macports::revupgrade_autorun} && ![macports::global_option_isset ports_dryrun]} {
             set status [action_revupgrade $action $portlist $opts]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121119/bb4eb8d8/attachment.html>


More information about the macports-changes mailing list