transfer /opt/local to another machine

j. van den hoff veedeehjay at
Sun Apr 12 03:54:55 PDT 2015

I just have upgraded two x86_64 machines from 10.9. to 10.10.3 and  
upgraded one of them according to the migration guide (i.e.  
uninstalled/reinstalled all ~ 800 macports packages). this took an  
astonishing long time (over night, basically) partly due to a multi-hour  
recompilation of the `atlas' library. and that was on the faster machine  
with an SSD...

so I don't want to do the same on the other one. therefore I would like to  
inquire whether it is acceptable to do the following (there was an old  
mail in the archive by ryan schmidt recommending this sort of procedure, I  
believe). both machines have current Xcode tools installed:

# on first machine do:
# --------------------
# 1. tidy up
sudo port uninstall inactive
sudo port clean --all all

# now generate tarfile
sudo port -vf deactivate installed
sudo tar vcf myports.tar /opt/local
sudo port -v activate installed

# move the tarfile to the second machine and there do:
# ----------------------------------------------------
sudo port -vf deactivate installed   #is this redundant or required to  
cleanup outside /opt/local?
sudo rm -rf /opt/local
sudo tar xf myports.tar
sudo port -v activate installed

my understanding is that the system bsdtar will not run into file size  
problems even beyound 8GB and permissions should be correctly restored by  
the above on the second machine. but I wonder whether I will not miss  
assorted pieces installed by macports outside of /opt/local? any advice  
would be appreciated.

one marginal observation I made: after `port deactivate installed' when  
executing `port installed active' I receive the message "None of the  
specified ports are installed." which probably should read "None of the  
specified ports are active." or "No ports are active.".

Using Opera's revolutionary email client:

More information about the macports-users mailing list