Changes between Version 80 and Version 81 of Migration


Ignore:
Timestamp:
Dec 15, 2014, 4:21:29 AM (9 years ago)
Author:
jmroot (Joshua Root)
Comment:

revert

Legend:

Unmodified
Added
Removed
Modified
  • Migration

    v80 v81  
    2020   source.
    2121   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.
    22 1. [=#ports] **Reinstall ports.**
    23     {{{
    24     # If there is an argument, then don't preserve 'requested' flags.
    25     function reinstallPorts() {
    26       local -r dontPreserveRequestedFlags=$1
    27       set -e
    28       # This will fail if xcode-select needs to be run.
    29       clang --version
    30       # Save the list of installed ports.
     221. [=#ports] **Reinstall ports.** To reinstall your ports:
     23   a. Save the list of installed ports:
     24      {{{
    3125      port -qv installed > myports.txt
    32       # Preserve the requested flags (optional).
    33       if [[ ! $dontPreserveRequestedFlags ]] ; then
    34         port echo requested | cut -d ' ' -f 1 > requested.txt
    35       fi
    36       # Download the restore_ports script.
     26      }}}
     27   a. (optional) Save the list of requested ports:
     28      {{{
     29      port echo requested | cut -d ' ' -f 1 > requested.txt
     30      }}}
     31   a. Uninstall all installed ports:
     32      {{{
     33      sudo port -f uninstall installed
     34      }}}
     35   a. Clean any partially-completed builds:
     36      {{{
     37      sudo port clean all
     38      }}}
     39   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`.)
     40      {{{
    3741      curl -O https://svn.macports.org/repository/macports/contrib/restore_ports/restore_ports.tcl
    3842      chmod +x restore_ports.tcl
    39       sudo bash << EOF
    40         # Start with the latest data.
    41         port selfupdate
    42         # Uninstall all installed ports.
    43         port -f uninstall installed
    44         # Clean any partially-completed builds.
    45         port clean all
    46         # Change this if your installation is somewhere else.
    47         # (There should be a way to get the port command to report this.)
    48         MACPORTS_HOME=/opt/local
    49         # Execute the restore_ports script.
    50         ./restore_ports.tcl -p $MACPORTS_HOME myports.txt
    51         if [[ ! $dontPreserveRequestedFlags ]] ; then
    52           port unsetrequested installed
    53           < requested.txt xargs port setrequested
    54         fi
    55       EOF
    56     }
    57     }}}
     43      sudo ./restore_ports.tcl myports.txt
     44      }}}
     45   a. (optional) Restore requested status:
     46      If you saved the list of requested ports, you can now restore the requested flags for your newly installed ports to their former states.
     47      {{{
     48      sudo port unsetrequested installed
     49      < requested.txt xargs sudo port setrequested
     50      }}}
    5851
    5952=== Troubleshooting ===