[83471] trunk/base/src/port1.0/portfetch.tcl

jmr at macports.org jmr at macports.org
Fri Sep 2 03:39:34 PDT 2011


Revision: 83471
          http://trac.macports.org/changeset/83471
Author:   jmr at macports.org
Date:     2011-09-02 03:39:34 -0700 (Fri, 02 Sep 2011)
Log Message:
-----------
clear distfiles when changing fetch.type rather than changing the behaviour of the suffix proc

Modified Paths:
--------------
    trunk/base/src/port1.0/portfetch.tcl

Modified: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl	2011-09-02 09:13:58 UTC (rev 83470)
+++ trunk/base/src/port1.0/portfetch.tcl	2011-09-02 10:39:34 UTC (rev 83471)
@@ -165,6 +165,9 @@
 proc portfetch::set_fetch_type {option action args} {
     global os.platform os.major
     if {[string equal ${action} "set"]} {
+        if {$args != "standard"} {
+            distfiles
+        }
         switch $args {
             bzr {
                 depends_fetch-append bin:bzr:bzr
@@ -204,16 +207,8 @@
 
 # Given a distname, return the distname with extract.suffix appended
 proc portfetch::suffix {distname} {
-    global extract.suffix fetch.type
-    switch -- "${fetch.type}" {
-        bzr         -
-        cvs         -
-        svn         -
-        git         -
-        hg          { return "" }
-        standard    -
-        default     { return "${distname}${extract.suffix}" }
-    }
+    global extract.suffix
+    return "${distname}${extract.suffix}"
 }
 # XXX import suffix into the global namespace as it is currently used from
 # Portfiles, but should better go somewhere else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110902/07df0488/attachment.html>


More information about the macports-changes mailing list