mysql5 vs mysql devel

Ryan Schmidt ryandesign at
Sat Jan 2 07:00:29 PST 2010

On Dec 24, 2009, at 10:40, Bradley Giesbrecht wrote:

>> What you describe is how most ports work in MySQL, but we handle database ports (like MySQL (mysql4, mysql5), PostgreSQL (postgresql82, postgresql83, postgresql84, etc.) BerkeleyDB (db44, db45, db46, db47, etc.) differently because they come with associated user data (the user's databases) which typically need to be upgraded in some way as well, and usually once you've upgraded, you can't downgrade. A new version of the database program may also come with new features (and new bugs) and the user may have good reason for wanting to remain with an older version for awhile. This is why we give the user separate ports, to give them the choice to upgrade when they're ready for it.
>> Actually, it's not just databases we handle that way; languages (I'm thinking of PHP -- php4, php52, php5 -- and GCC -- gcc40, gcc41, gcc42, gcc43, etc.) can have the same issue.
> What if we suffixed $major (current practice) to all these packages that need multiple versions available

I'm learning that just the major version isn't enough. We don't just have db4 -- we have db44, db46 and db47. We don't just have postgresql8 -- we have postgresql80, postgresql81, postgresql82, postgresql83 and postgresql84. We do just have mysql5 (for 5.1) but there is already a request [1] to bring back a port for 5.0 and we have mysql5-devel for 5.5. So I'm thinking mysql5 should be renamed mysql51, a mysql50 port should be created, and mysql5-devel should be renamed to mysql55. Unfortunately this makes for a lot of work adding variants in all the ports that depend on mysql5. I would also have to redesign the directory structure so that these ports could coexist and be installed simultaneously.

If I do it right this would also finally fix the conflict between mysql4 and mysql5(*) [2] and if I make similar changes to php5 and php52 they could coexist as well [3].




> and when we do we add a port called, for example, mysql-default that has variants +3, +4, +5 etc and it installs simlinks for all the files and dirs to locations $prefix/lib ./bin ./share ./etc .....
> Wouldn't these simlinks make a lot of ports that depend on these packages build with little or no modification?

You've basically described the "select" mechanism we already employ in these situations. For example, you can install, say, python26, and install python_select, and then use "python_select python26" to create symlinks to python26's parts with non-versioned names.

We could add (and I have previously thought about adding) a "select" mechanism for both the PHP and MySQL ports to allow you to indicate which one you want. But this is not a substitute for ports specifying the correct path to the version of PHP or MySQL they want to use. When mysql5 was updated from 5.0 to 5.1, the library version number changed, which meant every dependent had to be rebuilt. If we had used separate variants for separate MySQL versions this problem would not have occurred.

More information about the macports-users mailing list