[MacPorts] Migration modified
Joshua Root
jmr at macports.org
Fri Jan 29 06:07:38 PST 2010
On 2010-1-29 23:24 , MacPorts wrote:
> 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
> +}}}
Doesn't this have the same problems as the previously featured automatic
method, `sudo port upgrade --force installed`?
BTW, I wrote a (not yet very well tested) script that restores a set of
installed ports given `port installed` output:
<http://trac.macports.org/browser/users/jmr/restore_ports/>
- Josh
More information about the macports-dev
mailing list