<pre style='margin:0'>
Kurt Hindenburg (kurthindenburg) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/b9fdb847990736cae8080dcd8f47b33a6fe1c6b3">https://github.com/macports/macports-base/commit/b9fdb847990736cae8080dcd8f47b33a6fe1c6b3</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new b9fdb84 reclaim: remove portdbpath/build directory (#175)
</span>b9fdb84 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit b9fdb847990736cae8080dcd8f47b33a6fe1c6b3
</span>Author: Kurt Hindenburg <kurt.hindenburg@gmail.com>
AuthorDate: Tue May 26 09:25:14 2020 -0400
<span style='display:block; white-space:pre;color:#404040;'> reclaim: remove portdbpath/build directory (#175)
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Ask the user if they want to delete the build location. This will also
</span><span style='display:block; white-space:pre;color:#404040;'> remove the default ccache location.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/60126
</span>---
src/macports1.0/reclaim.tcl | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/reclaim.tcl b/src/macports1.0/reclaim.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 0e0e55c..7bb8a34 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/reclaim.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/reclaim.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -76,6 +76,7 @@ namespace eval reclaim {
</span> uninstall_unrequested
uninstall_inactive
remove_distfiles
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ remove_builds
</span>
if {![macports::global_option_isset ports_dryrun]} {
set last_run_contents [read_last_run_file]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -104,6 +105,33 @@ namespace eval reclaim {
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc remove_builds {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Delete portdbpath/build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The root build folder location
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set root_build [file join ${macports::portdbpath} build]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$macports::ui_prefix Build location: ${root_build}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval [$macports::ui_options(questions_yesno) "" "" "" "y" 0 "Would you like to delete the entire build directory (including the default ccache location)?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${retval} == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try -pass_signal {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[macports::global_option_isset ports_dryrun]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Deleting... (dry run)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info [msgcat::mc "Skipping deletion of %s (dry run)" $root_build]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info [msgcat::mc "Deleting %s" $root_build]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force $root_build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> proc walk_files {dir files_in_use unused_name} {
# Recursively walk the given directory $dir and build a list of all files that are present on-disk but not listed in $files_in_use.
# The list of unused files will be stored in the variable given by $unused_name
</pre><pre style='margin:0'>
</pre>