Changes between Version 73 and Version 74 of Migration


Ignore:
Timestamp:
Oct 20, 2014, 3:16:46 AM (10 years ago)
Author:
larryv (Lawrence Velázquez)
Comment:

use numbered list to emphasize linearity of the migration procedure

Legend:

Unmodified
Added
Removed
Modified
  • Migration

    v73 v74  
    44If you are only upgrading Xcode (e.g. 4.1 to 4.2 on Lion) but not the major OS version or CPU architecture, you do not need to reinstall ports as described below.
    55
    6 === Reinstall Xcode ===
     6=== Migration procedure ===
    77
    8 After performing either of these types of system upgrades, you will need to update the development tools. If you are upgrading from a prior version of OS X, [https://guide.macports.org/#installing.xcode install the latest version of Xcode] for your new OS.
     81. **Reinstall Xcode.** After performing either of these types of system upgrades, you will need to update the development tools. If you are upgrading from a prior version of OS X, [https://guide.macports.org/#installing.xcode install the latest version of Xcode] for your new OS.
     91. **Reinstall MacPorts.** After updating the development tools, [https://www.macports.org/install.php install the base MacPorts system] for your new platform, either from the appropriate pkg or dmg file if already available or [https://www.macports.org/guide/#installing.macports.source from source].
     10   a. **Update macports.conf.** If your macports.conf contains uncommented settings for universal_archs or build_arch, you will likely want to update them, since unlike earlier OS versions, the compiler on Snow Leopard and later will build for x86_64 by default on systems that support it. The default values will be fine for almost all users, so unless you know you need something different, just comment out these two lines. Several other settings in macports.conf have changed their defaults over the years. Take a moment to compare each line of your macports.conf with the corresponding line in macports.conf.default in the same directory. Unless you know a reason why a line your settings file should be different from the defaults, adopt the line from the defaults file.
     111. [=#ports] **Reinstall ports.** To reinstall your ports:
     12   a. Save the list of installed ports:
     13      {{{
     14      port -qv installed > myports.txt
     15      }}}
     16   a. (optional) Save the list of requested ports:
     17      {{{
     18      port echo requested | cut -d ' ' -f 1 > requested.txt
     19      }}}
     20   a. Uninstall all installed ports:
     21      {{{
     22      sudo port -f uninstall installed
     23      }}}
     24   a. Clean any partially-completed builds:
     25      {{{
     26      sudo port clean all
     27      }}}
     28   a. Download and execute the restore_ports script. (If you installed MacPorts from source and used a custom prefix, then you'll need to use the -p option when you run restore_ports.tcl; see `./restore_ports.tcl -h`.)
     29      {{{
     30      curl -O https://svn.macports.org/repository/macports/contrib/restore_ports/restore_ports.tcl
     31      chmod +x restore_ports.tcl
     32      sudo ./restore_ports.tcl myports.txt
     33      }}}
     34   a. (optional) Restore requested status:
     35      If you saved the list of requested ports, you can now restore the requested flags for your newly installed ports to their former states.
     36      {{{
     37      sudo port unsetrequested installed
     38      < requested.txt xargs sudo port setrequested
     39      }}}
    940
    10 === '''IMPORTANT - Do Not Skip this step:''' Reinstall MacPorts ===
    11 
    12 After updating the development tools, [https://www.macports.org/install.php install the base MacPorts system] for your new platform, either from the appropriate pkg or dmg file if already available or [https://www.macports.org/guide/#installing.macports.source from source].
    13 
    14 ==== Update macports.conf ====
    15 
    16 If your macports.conf contains uncommented settings for universal_archs or build_arch, you will likely want to update them, since unlike earlier OS versions, the compiler on Snow Leopard and later will build for x86_64 by default on systems that support it. The default values will be fine for almost all users, so unless you know you need something different, just comment out these two lines.
    17 
    18 Several other settings in macports.conf have changed their defaults over the years. Take a moment to compare each line of your macports.conf with the corresponding line in macports.conf.default in the same directory. Unless you know a reason why a line your settings file should be different from the defaults, adopt the line from the defaults file.
    19 
    20 === Reinstall ports === #ports
    21 
    22 To reinstall your ports:
    23 
    24  1. Save the list of installed ports:
    25 {{{
    26 port -qv installed > myports.txt
    27 }}}
    28  2. (optional) Save the list of requested ports:
    29 {{{
    30 port echo requested | cut -d ' ' -f 1 > requested.txt
    31 }}}
    32  3. Uninstall all installed ports:
    33 {{{
    34 sudo port -f uninstall installed
    35 }}}
    36  4. Clean any partially-completed builds:
    37 {{{
    38 sudo port clean all
    39 }}}
    40  5. Download and execute the restore_ports script. (If you installed MacPorts from source and used a custom prefix, then you'll need to use the -p option when you run restore_ports.tcl; see `./restore_ports.tcl -h`.)
    41 {{{
    42 curl -O https://svn.macports.org/repository/macports/contrib/restore_ports/restore_ports.tcl
    43 chmod +x restore_ports.tcl
    44 sudo ./restore_ports.tcl myports.txt
    45 }}}
    46  6. (optional) Restore requested status:
    47  If you saved the list of requested ports, you can now restore the requested flags for your newly installed ports to their former states.
    48 {{{
    49 sudo port unsetrequested installed
    50 < requested.txt xargs sudo port setrequested
    51 }}}
    52 
    53 ==== Troubleshooting ====
     41=== Troubleshooting ===
    5442
    5543Though it is now quite well-tested, the restore_ports script may fail in some cases. One known issue is that the script will fail if there are conflicting ports in the list. It's possible to have conflicting ports installed provided at most one of the conflicting set is active. If the script fails for this reason, you can delete one of the conflicting ports from myports.txt and then simply run the script again. You may need to do this multiple times if there are multiple conflicting ports listed.