[MacPorts] Migration modified
MacPorts
noreply at macports.org
Sun Dec 14 20:21:31 PST 2014
Page "Migration" was changed by jmr at macports.org
Diff URL: <https://trac.macports.org/wiki/Migration?action=diff&version=81>
Revision 81
Comment: revert
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: Migration
=========================================================================
--- Migration (version: 80)
+++ Migration (version: 81)
@@ -19,42 +19,35 @@
for your new platform, either from the appropriate installer or from
source.
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.
-1. [=#ports] **Reinstall ports.**
- {{{
- # If there is an argument, then don't preserve 'requested' flags.
- function reinstallPorts() {
- local -r dontPreserveRequestedFlags=$1
- set -e
- # This will fail if xcode-select needs to be run.
- clang --version
- # Save the list of installed ports.
+1. [=#ports] **Reinstall ports.** To reinstall your ports:
+ a. Save the list of installed ports:
+ {{{
port -qv installed > myports.txt
- # Preserve the requested flags (optional).
- if [[ ! $dontPreserveRequestedFlags ]] ; then
- port echo requested | cut -d ' ' -f 1 > requested.txt
- fi
- # Download the restore_ports script.
+ }}}
+ a. (optional) Save the list of requested ports:
+ {{{
+ port echo requested | cut -d ' ' -f 1 > requested.txt
+ }}}
+ a. Uninstall all installed ports:
+ {{{
+ sudo port -f uninstall installed
+ }}}
+ a. Clean any partially-completed builds:
+ {{{
+ sudo port clean all
+ }}}
+ 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`.)
+ {{{
curl -O https://svn.macports.org/repository/macports/contrib/restore_ports/restore_ports.tcl
chmod +x restore_ports.tcl
- sudo bash << EOF
- # Start with the latest data.
- port selfupdate
- # Uninstall all installed ports.
- port -f uninstall installed
- # Clean any partially-completed builds.
- port clean all
- # Change this if your installation is somewhere else.
- # (There should be a way to get the port command to report this.)
- MACPORTS_HOME=/opt/local
- # Execute the restore_ports script.
- ./restore_ports.tcl -p $MACPORTS_HOME myports.txt
- if [[ ! $dontPreserveRequestedFlags ]] ; then
- port unsetrequested installed
- < requested.txt xargs port setrequested
- fi
- EOF
- }
- }}}
+ sudo ./restore_ports.tcl myports.txt
+ }}}
+ a. (optional) Restore requested status:
+ If you saved the list of requested ports, you can now restore the requested flags for your newly installed ports to their former states.
+ {{{
+ sudo port unsetrequested installed
+ < requested.txt xargs sudo port setrequested
+ }}}
=== Troubleshooting ===
-------8<------8<------8<------8<------8<------8<------8<------8<--------
--
Page URL: <https://trac.macports.org/wiki/Migration>
MacPorts <https://www.macports.org/>
Ports system for OS X
This is an automated message. Someone added your email address to be
notified of changes on 'Migration' page.
If it was not you, please report to .
More information about the macports-changes
mailing list