[MacPorts] Migration modified

MacPorts Wiki noreply at macports.org
Wed Aug 7 17:25:30 UTC 2024


Page "Migration" was changed by jmroot
Diff URL: <https://trac.macports.org/wiki/Migration?action=diff&version=129>
Revision 129
Comment: Update for MacPorts 2.10
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: Migration
=========================================================================
--- Migration (version: 128)
+++ Migration (version: 129)
@@ -5,29 +5,64 @@
 This migration procedure ensures a smooth transition after major system changes, such as:
 - major operating system upgrades (e.g., from macOS 10.15 Catalina to macOS 11 Big Sur).
 - architecture migrations (e.g., from Intel to Apple Silicon).
-- migrations from one computer to another
 
 If you don't want to migrate, you can always [https://guide.macports.org/chunked/installing.macports.uninstalling.html uninstall MacPorts] entirely before manually [https://www.macports.org/install.php reinstalling ports].
-
 
 Note: If you move from one Mac to another Mac using [https://en.wikipedia.org/wiki/Migration_Assistant_(Apple) Migration Assistant], you have to do it first.
 
 == Migration procedure ==
 
+Note that this procedure requires MacPorts 2.10.0 or later. If you have an older version of MacPorts installed, you will first need to install the current version (this will not affect your installed ports).
 
-1. [=#xcode **Install the latest version of Xcode and the Xcode command-line tools**]
+1. [=#xcode **Install the latest version of Xcode and/or the Xcode command-line tools**]
+
+   If you have Xcode installed, [https://guide.macports.org/#installing.xcode upgrade it to the latest version] that is compatible with your OS.
+   Open the Xcode application once after installation and follow any prompts.
+
+   Install the latest version of the command line tools for your OS. (Run `xcode-select --install`). On some macOS versions, you may need to run Software Update to update the CLTs if an older version is already installed. Some recent versions of macOS have a bug that prevents them from automatically updating the command line tools, so if the preceding command says they're already installed, they may not be up to date and you may need to update manually by following the instructions in ProblemHotlist#reinstall-clt.
+
+2. [=#config **Review macports.conf settings**]
+
+   If your {{{macports.conf}}} (typically at {{{ /opt/local/etc/macports/macports.conf}}}) contains uncommented settings for {{{universal_archs}}} or {{{build_arch}}}, you will likely want to update them, since newer OS versions may support different CPU architectures. Default values are fine for most 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 in your settings file should be different from the defaults, adopt the line from the defaults file.
+
+3. [=#portmigrate **Run port migrate**]
+   {{{
+sudo port migrate
+}}}
+   This will reinstall the MacPorts base system for your current system if needed, and reinstall ports that are not compatible with your current system. Any ports that are not able to be reinstalled will be reported at the end.
+
+4. [=#managesnap **(Optional) Managing migration snapshots**]
+
+   `port migrate` takes a snapshot of your installed ports before reinstalling them. If some of your ports failed to reinstall, you may want to try again later after they have been fixed—this can be done by running:
+   {{{
+sudo port restore --last
+}}}
+
+   When you no longer need the snapshot, you can delete it to save some disk space. Run `port snapshot --list` to see the snapshots that exist, and note the ID number in the first column of the output. Then run
+   {{{
+sudo port snapshot --delete <ID>
+}}}
+   replacing `<ID>` with the ID number of the snapshot you want to delete.
+
+== Old Migration procedure ==
+
+Note that the information below is for the older, more manual Migration procedure. You probably don't need it if you are using MacPorts 2.10.0 or later.
+
+1. [=#xcode-old **Install the latest version of Xcode and the Xcode command-line tools**]
 
    [https://guide.macports.org/#installing.xcode Install the latest version of Xcode] that is compatible with your OS.
    Open the Xcode application once after installation and follow any prompts.
 
    Install the same version of the command line tools. (Run `xcode-select --install`). Recent versions of macOS have a bug that prevents them from automatically updating the command line tools, so if the preceding command says they're already installed, they may not be up to date and you may need to update manually by following the instructions in ProblemHotlist#reinstall-clt.
-   
+
 2. [=#base **Reinstall MacPorts base system**]
 
    To reinstall, simply [https://www.macports.org/install.php install the base MacPorts system]
    for your new platform. If there is no macOS Installer package available for your new OS version, you can install from source.
 
-3. [=#config **Update your macports.conf (if not default)**]
+3. [=#config-old **Update your macports.conf (if not default)**]
 
    If your {{{macports.conf}}} (typically at {{{ /opt/local/etc/macports/macports.conf}}}) contains uncommented settings for {{{universal_archs}}} or {{{build_arch}}}, you will likely want to update them, since newer OS versions may support different CPU architectures. Default values are fine for most users, so unless you know you need something different, just comment out these two lines.
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/Migration>
MacPorts <https://www.macports.org/>
Ports system for macOS

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 admin at macports.org.


More information about the macports-changes mailing list