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

jmr at macports.org jmr at macports.org
Wed Jul 7 07:26:35 PDT 2010


Revision: 69470
          http://trac.macports.org/changeset/69470
Author:   jmr at macports.org
Date:     2010-07-07 07:26:35 -0700 (Wed, 07 Jul 2010)
Log Message:
-----------
don't try to clean archives or logs with insufficient privileges, clean distfile dirs in the alt prefix correctly

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-07 13:15:57 UTC (rev 69469)
+++ trunk/base/src/port1.0/portclean.tcl	2010-07-07 14:26:35 UTC (rev 69470)
@@ -69,8 +69,9 @@
         ui_info "$UI_PREFIX [format [msgcat::mc "Removing distfiles for %s"] [option name]]"
         clean_dist
     }
-    if {[info exists ports_clean_all] && $ports_clean_all == "yes" || \
-        [info exists ports_clean_archive] && $ports_clean_archive == "yes"} {
+    if {([info exists ports_clean_all] && $ports_clean_all == "yes" || \
+        [info exists ports_clean_archive] && $ports_clean_archive == "yes")
+        && !$usealtworkpath} {
         ui_info "$UI_PREFIX [format [msgcat::mc "Removing archives for %s"] [option name]]"
         clean_archive
     }
@@ -80,7 +81,8 @@
          ui_info "$UI_PREFIX [format [msgcat::mc "Removing build directory for %s"] [option name]]"
          clean_work
     }
-    if {([info exists ports_clean_logs] && $ports_clean_logs == "yes") || ($keeplogs == "no")} {
+    if {(([info exists ports_clean_logs] && $ports_clean_logs == "yes") || ($keeplogs == "no"))
+        && !$usealtworkpath} {
         clean_logs
     }
 
@@ -172,7 +174,11 @@
     # loop through directories
     set count 0
     foreach dir $dirlist {
-        set distdir [file join ${portdbpath} distfiles $dir]
+        if {$usealtworkpath} {
+            set distdir [file join ${altprefix}${portdbpath} distfiles $dir]
+        } else {
+            set distdir [file join ${portdbpath} distfiles $dir]
+        }
         if {[file isdirectory $distdir]} {
             ui_debug "Removing directory: ${distdir}"
             if {[catch {delete $distdir} result]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100707/ff7c910a/attachment.html>


More information about the macports-changes mailing list