[70131] branches/release_1_9/base/src/port1.0/portclean.tcl

jmr at macports.org jmr at macports.org
Fri Jul 30 00:22:03 PDT 2010


Revision: 70131
          http://trac.macports.org/changeset/70131
Author:   jmr at macports.org
Date:     2010-07-30 00:21:59 -0700 (Fri, 30 Jul 2010)
Log Message:
-----------
merge r69470 from trunk:
 don't try to clean archives or logs with insufficient privileges, clean distfile dirs in the alt prefix correctly

Revision Links:
--------------
    http://trac.macports.org/changeset/69470

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

Modified: branches/release_1_9/base/src/port1.0/portclean.tcl
===================================================================
--- branches/release_1_9/base/src/port1.0/portclean.tcl	2010-07-30 07:15:08 UTC (rev 70130)
+++ branches/release_1_9/base/src/port1.0/portclean.tcl	2010-07-30 07:21:59 UTC (rev 70131)
@@ -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/20100730/0e6df3e8/attachment.html>


More information about the macports-changes mailing list