meta ports (was: a whole of palaver about MySQL)

Ryan Schmidt ryandesign at macports.org
Mon Jun 25 19:59:04 PDT 2007


On Jun 25, 2007, at 20:12, paul beard wrote:

>> "gnome" doesn't install any software;
>
> so when I type "port install gnome" nothing happens? Not how I  
> remember it ;-)
>
> I think we're talking past each other or caught on some semantic  
> nuance.

Yes, I am trying to make a semantic point here. I'm saying that the  
"gnome" port itself does not install any software. The "gnome" port  
only depends on other ports which install software. "gnome" depends  
on "gnome-desktop-suite" which depends on 60 other ports, each of  
which installs one piece of software, such that, if you "sudo port  
install gnome", you get 60 (or more) ports installed.

I tried to point out that the "php5" port also does this. So "php5"  
is already the meta-port you request -- except that, as I've pointed  
out, php cannot know whether you want apache 1 or apache2, mysql4 or  
mysql5, or any of the other options that are available, which is why  
you must "sudo port install php5 +apache2 +mysql5" if that is what  
you want. The same applies to every port. Examine the available  
variants and select the ones that apply to you.

> My position is that it should be simpler to install inter-related  
> components, as a single bundled meta-port, if that's what the user  
> wants. For the life of me, I can't imagine installing MySQL without  
> wanting the startup components installed. But be that as it may, I  
> think there are ways to accommodate everyone.

Then let me explain a scenario in which that would be desirable.  
Consider a server farm of 10 machines, 9 of which are web servers  
with PHP support, and one of which is a MySQL database server to  
which the 9 web servers connect. The 1 MySQL server must "sudo port  
install mysql5 +server" in order to run the MySQL server process. The  
9 web servers need their PHP configured with MySQL support, so that  
they can connect to the MySQL server machine, but they do not  
themselves need MySQL servers running on them. So on those 9 web  
servers, it is sufficient to say "sudo port install php5 +apache2  
+mysql5" and let MacPorts find and install the apache2 and mysql5  
ports with their default variants.

In your case, where you want to run a MySQL server on the same  
machine on which you're installing php5, the default variants for  
mysql5 unfortunately do not make sense, so you need to install mysql5  
first with the variants you want (+server).

As I said in my last message, I agree with you, and have argued in  
previous threads, that mysql5 should be a server by default, since  
that is the most common case, I think, and I ask James Berry, who is  
my comaintainer on mysql5, for his input before proceeding.

> If I request that the ports system install the meta-port  
> "amp" (apache/mysql/php), that port depends on apache with the php  
> DSO, mysql server with the client libraries, and php with its hooks  
> to connect to MySQL. I don't think anyone can argue that not being  
> able to do this has caused a lot more traffic on this list than  
> necessary.

sudo port install php5 +apache2 +mysql5

does that -- except for getting mysql5 installed as a server. This is  
because:

a) you currently need to specify a variant to mysql5 to get it  
installed as a server; as I've said, I'd also like that to change;

b) a port cannot depend on a specific variant of another port; it can  
only depend on the existence of the other port. This is issue #126  
which was, regrettably, filed 5 years ago:

http://trac.macosforge.org/projects/macports/ticket/126

c) even if it were possible to depend on a specific variant, as I  
explained in the scenario above, it would not be proper for php5  
+mysql5 to depend on the +server variant of mysql5.

> This is probably a topic for the dev list: perhaps jberry@ can take  
> it over there and see what anyone thinks of it.

There's no request here that needs to be handled by -dev -- no  
improvement to base necessary. If your request is for a meta-port  
that installs php5 and mysql5 and apache2, then the php5 port already  
does that for you. If your request is that mysql5 should be a server  
by default, then I agree, and let's wait for James to have a chance  
to respond to that.






More information about the macports-users mailing list