[MacPorts] Migration modified

MacPorts noreply at macports.org
Fri Jan 29 04:24:02 PST 2010


Changed page "Migration" by stig at stigbakken.com from 193.91.206.170*
Page URL: <http://trac.macports.org/wiki/Migration>
Diff URL: <http://trac.macports.org/wiki/Migration?action=diff&version=19>
Revision 19

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: Migration
=========================================================================
--- Migration (version: 18)
+++ Migration (version: 19)
@@ -27,3 +27,22 @@
 sudo port install portname +variant1 +variant2 ...
 }}}
 Note 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`.
+
+=== Automatically reinstall ports === #autoinstall
+
+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.)
+{{{
+port installed |grep -v '^The following' | awk '{print $1}' > myports.txt
+}}}
+{{{
+echo "all: $(cat myports.txt|tr '\n' ' ')" > Makefile.portsupgrade
+}}}
+{{{
+for port in $(cat myports.txt); do
+  echo "$port: $(port deps $port|grep Dependencies:|sed -e 's/.*Dependencies: *//;s/,//g'|tr '\n' ' ')"
+  printf "\tport -f uninstall $port\n\tport install $port\n"
+done | tee -a Makefile.portsupgrade
+}}}
+{{{
+make -f Makefile.portsupgrade
+}}}

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on Migration. If it was not you, please
report to .


More information about the macports-changes mailing list