[69444] trunk/base/src/port1.0/portclean.tcl

jmr at macports.org jmr at macports.org
Tue Jul 6 02:47:45 PDT 2010


Revision: 69444
          http://trac.macports.org/changeset/69444
Author:   jmr at macports.org
Date:     2010-07-06 02:47:44 -0700 (Tue, 06 Jul 2010)
Log Message:
-----------
less indent

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

Modified: trunk/base/src/port1.0/portclean.tcl
===================================================================
--- trunk/base/src/port1.0/portclean.tcl	2010-07-06 09:46:01 UTC (rev 69443)
+++ trunk/base/src/port1.0/portclean.tcl	2010-07-06 09:47:44 UTC (rev 69444)
@@ -92,7 +92,7 @@
 # This is crude, but works.
 #
 proc portclean::clean_dist {args} {
-    global ports_force name distpath dist_subdir distfiles usealtworkpath portdbpath altprefix
+    global ports_force name distpath dist_subdir distfiles patchfiles usealtworkpath portdbpath altprefix
 
     # remove known distfiles for sure (if they exist)
     set count 0
@@ -124,27 +124,28 @@
     }
 
     set count 0
-    if {[info exists patchfiles]} {
-        foreach file [option patchfiles] {
-            set patchfile [getdistname $file]
-            ui_debug "Looking for $patchfile"
-            set patchfile [file join $distpath $patchfile]
-            if {[file isfile $patchfile]} {
-                ui_debug "Removing file: $patchfile"
-                if {[catch {delete $patchfile} result]} {
-                    ui_debug "$::errorInfo"
-                    ui_error "$result"
-                }
-                incr count
+    if {![info exists patchfiles]} {
+        set patchfiles ""
+    }
+    foreach file $patchfiles {
+        set patchfile [getdistname $file]
+        ui_debug "Looking for $patchfile"
+        set patchfile [file join $distpath $patchfile]
+        if {[file isfile $patchfile]} {
+            ui_debug "Removing file: $patchfile"
+            if {[catch {delete $patchfile} result]} {
+                ui_debug "$::errorInfo"
+                ui_error "$result"
             }
-            if {!$usealtworkpath && [file isfile ${altprefix}${patchfile}]} {
-                ui_debug "Removing file: ${altprefix}${patchfile}"
-                if {[catch {delete ${altprefix}${patchfile}} result]} {
-                    ui_debug "$::errorInfo"
-                    ui_error "$result"
-                }
-                incr count
+            incr count
+        }
+        if {!$usealtworkpath && [file isfile ${altprefix}${patchfile}]} {
+            ui_debug "Removing file: ${altprefix}${patchfile}"
+            if {[catch {delete ${altprefix}${patchfile}} result]} {
+                ui_debug "$::errorInfo"
+                ui_error "$result"
             }
+            incr count
         }
     }
     if {$count > 0} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100706/43cf1b7b/attachment.html>


More information about the macports-changes mailing list