Changes between Version 77 and Version 78 of Migration


Ignore:
Timestamp:
Dec 14, 2014, 10:56:57 PM (9 years ago)
Author:
dave@…
Comment:

Reinstall ports - Gather all the shell commands as a single script with comments. Far easier to use.

Legend:

Unmodified
Added
Removed
Modified
  • Migration

    v77 v78  
    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.** To reinstall your ports:
    23    a. Save the list of installed ports:
     221. [=#ports] **Reinstall ports.**
    2423      {{{
     24      # Save the list of installed ports.
    2525      port -qv installed > myports.txt
    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       {{{
     26      # Preserve the requested flags (optional).
     27      PRESERVE_REQUESTED_FLAGS=true
     28      if [[ $PRESERVE_REQUESTED_FLAGS ]] ; then
     29        port echo requested | cut -d ' ' -f 1 > requested.txt
     30      fi
     31      # Uninstall all installed ports.
    3332      sudo port -f uninstall installed
    34       }}}
    35    a. Clean any partially-completed builds:
    36       {{{
     33      # Clean any partially-completed builds.
    3734      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       {{{
     35      # Download the restore_ports script.
    4136      curl -O https://svn.macports.org/repository/macports/contrib/restore_ports/restore_ports.tcl
    4237      chmod +x restore_ports.tcl
    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
     38      # Change this if your installation is somewhere else.
     39      MACPORTS_HOME=/opt/local
     40      # Execute the restore_ports script.
     41      sudo ./restore_ports.tcl -p $MACPORTS_HOME myports.txt
     42      if [[ $PRESERVE_REQUESTED_FLAGS ]] ; then
     43        sudo port unsetrequested installed
     44        < requested.txt xargs sudo port setrequested
     45      fi
    5046      }}}
    5147