<pre style='margin:0'>
Umesh Singla (umeshksingla) pushed a commit to branch gsoc17-migrate
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/f9628dff9b0e56c1cdd6b7518e4663558158db97">https://github.com/macports/macports-base/commit/f9628dff9b0e56c1cdd6b7518e4663558158db97</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/gsoc17-migrate by this push:
<span style='display:block; white-space:pre;color:#404040;'> new f9628df Add force and nosync options to selfupdate
</span>f9628df is described below
<span style='display:block; white-space:pre;color:#808000;'>commit f9628dff9b0e56c1cdd6b7518e4663558158db97
</span>Author: Umesh Singla <umeshksingla@macports.org>
AuthorDate: Sat Sep 9 03:04:35 2017 +0530
<span style='display:block; white-space:pre;color:#404040;'> Add force and nosync options to selfupdate
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> .. while migrate. Also, debug.
</span>---
src/macports1.0/migrate.tcl | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/migrate.tcl b/src/macports1.0/migrate.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index eda44ff..9eeab84 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/migrate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/migrate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -48,12 +48,12 @@ namespace eval migrate {
</span> array set options $opts
# create a snapshot
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Taking a snapshot of the current state.."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Taking a snapshot of the current state..."
</span> set snapshot [snapshot::main $opts]
set id [$snapshot id]
set note [$snapshot note]
set datetime [$snapshot created_at]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Done: snapshot '$id':'$note' created at $datetime"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Done: Snapshot '$id':'$note' created at $datetime"
</span>
if {[info exists macports::ui_options(questions_yesno)]} {
set msg "Migration will first uninstall all the installed ports, upgrade MacPorts and then reinstall them again."
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -65,27 +65,28 @@ namespace eval migrate {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Uninstalling all ports.."
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- uninstall_installed [registry::entry imaged]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Uninstalling all ports..."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uninstall_installed
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Upgrading MacPorts.."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Upgrading MacPorts..."
</span> upgrade_port_command
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Fetching ports to install.."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Fetching ports to install..."
</span> set snapshot_portlist [$snapshot ports]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Restoring the original state.."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Restoring the original state..."
</span> restore::restore_state $snapshot_portlist
# TODO: CLEAN PARTIAL BUILDS STEP HERE
return 0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- proc uninstall_installed {portlist} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set portlist [portlist_sort_dependencies_later [registry::entry imaged]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc uninstall_installed {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set options {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portlist [restore::portlist_sort_dependencies_later [registry::entry imaged]]
</span> foreach port $portlist {
ui_msg "Uninstalling: [$port name]"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[registry::run_target $port uninstall]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[registry::run_target $port uninstall $options]} {
</span> continue
} else {
ui_error "Error uninstalling [$port name]"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -94,8 +95,12 @@ namespace eval migrate {
</span> }
proc upgrade_port_command {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set optionslist {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set optionslist {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # forced selfupdate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set optionslist(ports_force) 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shouldn't sync ports tree
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set optionslist(ports_selfupdate_nosync) 1
</span> set updatestatusvar {}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [uplevel [list selfupdate::main $optionslist $updatestatusvar]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [uplevel [list selfupdate::main [array get optionslist] $updatestatusvar]]
</span> }
}
</pre><pre style='margin:0'>
</pre>