installing multiple copies of macports

Marko Käning MK-MacPorts at techno.ms
Sat Oct 23 01:48:22 PDT 2010


Hi Jon,

> /opt/local1/bin/port install mysql5-server
> /opt/local2/bin/port install apache2
Ah. ok, I see.

> Only network services will conflict when they both try to claim a port (or ports), however, this is typically configurable from within the MacPorts prefix for the installation, so for Apache, you could have the stock Apple apache run on port 80, and run your two MacPorts-installed Apaches on ports 81 and 82.
Yep, that's one point to consider.

> I do not know if MacPorts applications will use /var/run to store process information (this is the only foreseeable place IMO you could have a problem). Hopefully they would use ${prefix}/var/run, but you're always welcome to check the Portfiles / try to run both in parallel and find out if there is an issue.
Yes, that's a problem.
In principle one would need to modify PATH depending on which installation one preferably wants to use.

Now I have this:

   PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin

meaning that my current MacPorts is first.

But hopefully all this is not really an issue, since every application within /opt/local/bin should access its corresponding MacPorts counterparts with /opt/local/ as prefix, which would be the same if I ran a program from e.g. /opt/testing/bin/ since that would also only access executables under /opt/testing/.

I tried to check for open files (to perhaps see a file in /var/run for testing purposes):
---
markos-imac:~ marko$ lsof | grep local
bash      376 marko  txt      REG       14,2    202648 7987975 /opt/local/bin/grep
---
but obviously there is no MacPorts application in my installation which is running as some service at this instant. Only if I start another program like kmymoney I get this (where I limited it to /opt/local/var):
---
markos-imac:~ marko$ lsof | grep local/var
kmymoney2 387 marko  txt      REG       14,2     27832 2951757 /opt/local/var/cache/fontconfig/a1a78d9c18cd095d3829c724810e6ffb-x86-64.cache-3
kmymoney2 387 marko  txt      REG       14,2     26376 2951765 /opt/local/var/cache/fontconfig/bc06c1eea3e636f72101cafc3fb39508-x86-64.cache-3
kmymoney2 387 marko  txt      REG       14,2     26640 2951769 /opt/local/var/cache/fontconfig/ba022efc551c75e21c690774bbcf5304-x86-64.cache-3
kmymoney2 387 marko  txt      REG       14,2     86776 2951785 /opt/local/var/cache/fontconfig/79652363633577d7d713baab7f54ad8c-x86-64.cache-3
kmymoney2 387 marko  txt      REG       14,2     35136 8495790 /opt/local/var/cache/fontconfig/0e8e53f675de3a90695eebbcc3474f93-x86-64.cache-3
kmymoney2 387 marko  txt      REG       14,2    383848 2951749 /opt/local/var/cache/fontconfig/0f0db7876307790c19e1f91eb9095080-x86-64.cache-3
kmymoney2 387 marko  txt      REG       14,2    383152 2951753 /opt/local/var/cache/fontconfig/1487dd4aecf3164c4a11193169052443-x86-64.cache-3
kmymoney2 387 marko  txt      REG       14,2     34048 8495794 /opt/local/var/cache/fontconfig/72cb66cadeda83db5aa4ceaa9c43e26c-x86-64.cache-3
kded      562 marko  txt      REG       14,2    383848 2951749 /opt/local/var/cache/fontconfig/0f0db7876307790c19e1f91eb9095080-x86-64.cache-3
kded      562 marko  txt      REG       14,2    383152 2951753 /opt/local/var/cache/fontconfig/1487dd4aecf3164c4a11193169052443-x86-64.cache-3
kded      562 marko  txt      REG       14,2     27832 2951757 /opt/local/var/cache/fontconfig/a1a78d9c18cd095d3829c724810e6ffb-x86-64.cache-3
kded      562 marko  txt      REG       14,2     26376 2951765 /opt/local/var/cache/fontconfig/bc06c1eea3e636f72101cafc3fb39508-x86-64.cache-3
kded      562 marko  txt      REG       14,2     26640 2951769 /opt/local/var/cache/fontconfig/ba022efc551c75e21c690774bbcf5304-x86-64.cache-3
kded      562 marko  txt      REG       14,2     86776 2951785 /opt/local/var/cache/fontconfig/79652363633577d7d713baab7f54ad8c-x86-64.cache-3
kded      562 marko  txt      REG       14,2     35136 8495790 /opt/local/var/cache/fontconfig/0e8e53f675de3a90695eebbcc3474f93-x86-64.cache-3
kded      562 marko  txt      REG       14,2     34048 8495794 /opt/local/var/cache/fontconfig/72cb66cadeda83db5aa4ceaa9c43e26c-x86-64.cache-3
markos-imac:~ marko$ 
---

The full list shows mostly access to /opt/local/lib/, but of course also to /opt/local/bin/.

So, well, it all looks as if it should be no problem to have two installations WITHOUT NECESSITY TO SWITCH between them.

I just install a second MacPorts and if I want to test an application in it I only need to specify the full path.

Cool!

Thanks for your reassuring response, Jon!


More information about the macports-dev mailing list