Changes between Version 20 and Version 21 of Migration


Ignore:
Timestamp:
Jan 29, 2010, 2:47:02 PM (14 years ago)
Author:
jmroot (Joshua Root)
Comment:

link to restore_ports for automatic reinstall, marked experimental

Legend:

Unmodified
Added
Removed
Modified
  • Migration

    v20 v21  
    2929Note that if you have specified variants which are not the default, you may need to install ports in an order other than the alphabetical order recorded in `myports.txt`.
    3030
    31 === Automatically reinstall ports === #autoinstall
     31=== Automatically reinstall ports (EXPERIMENTAL) === #automatic
    3232
    33 If you want to do the whole procedure automatically instead, including handling dependencies, you can run the following commands to build a Makefile for running the reinstalls in the right order.  (Not needed If you already ran the steps in the previous section.)
     33A script has been written to automate Step 4 above, though it is still experimental. If it fails, you will just have to do it manually.
     34
     35To use it, you will first need to run steps 1-3 as described above. Then:
     36 4. Run these commands to download and execute the restore_ports script. (If you installed MacPorts from source and put its Tcl package somewhere other than /Library/Tcl, then you'll need to use the -t option when you run restore_ports.tcl; see `./restore_ports.tcl -h`.
    3437{{{
    35 port installed |grep -v '^The following' | awk '{print $1}' > myports.txt
     38curl -O http://svn.macports.org/repository/macports/users/jmr/restore_ports/restore_ports.tcl
     39chmod +x restore_ports.tcl
     40sudo ./restore_ports.tcl myports.txt
    3641}}}
    37 {{{
    38 echo "all: $(cat myports.txt|tr '\n' ' ')" > Makefile.ports
    39 }}}
    40 {{{
    41 for port in $(cat myports.txt); do
    42   echo "$port: $(port deps $port|grep Dependencies:|sed -e 's/.*Dependencies: *//;s/,//g'|tr '\n' ' ')"
    43   printf "\tport -f uninstall $port\n\tport install $port\n"
    44 done | tee -a Makefile.ports
    45 }}}
    46 {{{
    47 make -f Makefile.ports
    48 }}}