[146709] trunk/base/src/macports1.0/reclaim.tcl
g5pw at macports.org
g5pw at macports.org
Tue Mar 15 09:40:48 PDT 2016
Revision: 146709
https://trac.macports.org/changeset/146709
Author: g5pw at macports.org
Date: 2016-03-15 09:40:48 -0700 (Tue, 15 Mar 2016)
Log Message:
-----------
base: offer the user to run reclaim for him
That's more helpful that just printing a ui_warn. If
macports::ui_options(questions_yesno) is not available or the user answers no,
don't do anything.
Modified Paths:
--------------
trunk/base/src/macports1.0/reclaim.tcl
Modified: trunk/base/src/macports1.0/reclaim.tcl
===================================================================
--- trunk/base/src/macports1.0/reclaim.tcl 2016-03-15 16:40:00 UTC (rev 146708)
+++ trunk/base/src/macports1.0/reclaim.tcl 2016-03-15 16:40:48 UTC (rev 146709)
@@ -347,7 +347,13 @@
}
if {$time ne ""} {
if {[clock seconds] - $time > 1209600} {
- ui_warn "You haven't run 'port reclaim' in two weeks. It's recommended you run this every two weeks to reclaim disk space."
+ if {[info exists macports::ui_options(questions_yesno)]} {
+ set retval [$macports::ui_options(questions_yesno) "You haven't run 'port reclaim' in two weeks. It's recommended you run this every two weeks to reclaim disk space." "ReclaimPrompt" "" {y} 0 "Would you like to run it now?"]
+ if {$retval == 0} {
+ # User said yes, run port reclaim
+ macports::reclaim_main
+ }
+ }
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160315/69cb1d02/attachment.html>
More information about the macports-changes
mailing list