Is there anyone who has successfully migrated Macport to Sonoma?

Tao Zhang tzhang0616 at gmail.com
Sun Oct 8 22:25:09 UTC 2023


Hi,

   The following is the Migration procedure as listed in Macport website.

   1)  For 1. below , should I use Xcode15 or older version?

   2) Does the following procedure work? Is there anyone who has 
successfully migrated Macport to Sonoma?

  3) How long will this migration procedure take?

  4) I have upgraded to Sonoma OS. But why my present ports still work?

   Thanks

   Tao


===============

Migration procedure

 1. *Install the latest version of Xcode and the Xcode command-line
    tools*<https://trac.macports.org/wiki/Migration#xcode>

    ​Install the latest version of Xcode
    <https://guide.macports.org/#installing.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
    <https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt>.

 2. *Reinstall MacPorts base
    system*<https://trac.macports.org/wiki/Migration#base>

    To reinstall, simply install the base MacPorts system
    <https://www.macports.org/install.php> for your new platform. If
    there is no macOS Installer package available for your new OS
    version, you can install from source.

 3. *Update your macports.conf (if not
    default)*<https://trac.macports.org/wiki/Migration#config>

    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. *Reinstall your ports*<https://trac.macports.org/wiki/Migration#ports>
     1. Save the list of installed ports:

        port -qv installed > myports.txt

     2. Save the list of requested ports:

        port echo requested | cut -d ' ' -f 1 | uniq > requested.txt

     3. Uninstall all installed ports:

        sudo port -f uninstall installed

     4. Run a regular clear out of your installation:

        sudo port reclaim

     5. Download and execute the ​restore_ports script
        <https://raw.githubusercontent.com/macports/macports-contrib/master/restore_ports/restore_ports.tcl>.
        (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 --location --remote-namehttps://github.com/macports/macports-contrib/raw/master/restore_ports/restore_ports.tcl
        chmod +x restore_ports.tcl
        xattr -d com.apple.quarantine restore_ports.tcl
        sudo ./restore_ports.tcl myports.txt

        Note: ports that are not available on your new platform will be
        skipped, with only a warning message.
     6. 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
        xargs sudo port setrequested < requested.txt

        Warning: if a port in |requested.txt| was /not/ installed in the
        previous step, the iterative |setrequested| will terminate,
        leaving some ports still marked as not-requested. Edit
        |requested.txt| to remove any ports that were not installed and
        repeat this step. Double-check your desired ports are set as
        requested with |port echo requested|.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20231008/c840a8c3/attachment.htm>


More information about the macports-users mailing list