[123719] branches/gsoc14-cleanup/src/macports1.0/reclaim.tcl
ksammons at macports.org
ksammons at macports.org
Wed Aug 13 11:16:15 PDT 2014
Revision: 123719
https://trac.macports.org/changeset/123719
Author: ksammons at macports.org
Date: 2014-08-13 11:16:15 -0700 (Wed, 13 Aug 2014)
Log Message:
-----------
Merged from GitHub
Modified Paths:
--------------
branches/gsoc14-cleanup/src/macports1.0/reclaim.tcl
Modified: branches/gsoc14-cleanup/src/macports1.0/reclaim.tcl
===================================================================
--- branches/gsoc14-cleanup/src/macports1.0/reclaim.tcl 2014-08-13 18:10:01 UTC (rev 123718)
+++ branches/gsoc14-cleanup/src/macports1.0/reclaim.tcl 2014-08-13 18:16:15 UTC (rev 123719)
@@ -97,7 +97,6 @@
# If the directory is empty, and this isn't the root folder, delete it and recursively go up directories until a non-empty one is found.
if { $dir ne "/opt/local/var/macports/distfiles" && [readdir $dir] eq ""} {
-
set up_dir [file dirname $dir]
ui_msg "Found empty directory: $dir. Attempting to delete."
@@ -203,13 +202,12 @@
}
ui_debug "Calling walk_files on root directory."
-
# Walk through each directory, and delete any files found. Alert the user if no files were found.
if {[walk_files $root_dist yes $dist_path] eq "no"} {
ui_msg "No distfiles found in root directory."
}
- ui_debug "Calling walk_files on home directory."
+ ui_debug "Calling walk_files on home directory."
# FIXME: Only commented because I accidentally delete all my dotfiles (including the home_dist location). It does in fact work on normal machines.
#if {[walk_files $home_dist yes $dist_path] eq "no"} {
# ui_msg "No distfiles found in home directory."
@@ -258,7 +256,11 @@
# A multidimensional list where each app is a sublist, i.e., [{First Application Info} {Second Application Info} {...}]
# Indexes of each sublist are: 0 = name, 1 = version, 2 = revision, 3 = variants, 4 = activity, and 5 = epoch.
- return [registry::installed]
+ if { [catch {set installed [registry::installed]} result]} {
+ ui_error "no installed applications found."
+ }
+
+ return $installed
}
proc update_last_run {} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140813/32ebbaa0/attachment.html>
More information about the macports-changes
mailing list