Skip to content
Permalink
Browse files

macports: Use needs_migration, chng migration msg

Re-use migration::needs_migration instead of re-implementing the check
in macports.tcl. Additionally, change the migration message to recommend
running 'sudo port migrate'.
  • Loading branch information
neverpanic committed Jan 7, 2018
1 parent ff2840f commit 244eae95940dc3a05ee22a64d53bac20499cdbea
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/macports1.0/macports.tcl
@@ -692,9 +692,9 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
macosx_version

# Check that the current platform is the one we were configured for, otherwise need to do migration
if {($os_platform ne $macports::autoconf::os_platform) || ($os_major != $macports::autoconf::os_major)} {
if {[migrate::needs_migration]} {
ui_error "Current platform \"$os_platform $os_major\" does not match expected platform \"$macports::autoconf::os_platform $macports::autoconf::os_major\""
ui_error "If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration"
ui_error "Please run 'sudo port migrate' or follow the migration instructions: https://trac.macports.org/wiki/Migration"
return -code error "OS platform mismatch"
}

0 comments on commit 244eae9

Please sign in to comment.
You can’t perform that action at this time.