Opened 21 months ago
Last modified 21 months ago
#66981 assigned enhancement
mariadb-10.11 @10.11.1_0 binaries aren't in the normal path
Reported by: | adamfranco (Adam Franco) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | mariadb-10.11 |
Description
After installing https://build.macports.org/builders/ports-12_arm64-builder/builds/72726 I didn't find any of the expected mysql
commands available even with /opt/local/bin
in my $PATH
. It turns out that this port installs its binaries in /opt/local/lib/mariadb-10.11/bin
, but there is no note that this path must be added to the user's $PATH
. It seems like it would be even better if this step wasn't needed and the binaries were installed in /opt/local/bin
or were somehow linked there with a port select mariadb mariadb-10.11
sort of command, but there may be reasons for not doing so. The addition of a note about the path would be a minumum-impact improvement to help avoid confusion.
Here are the existing notes seen on install:
---> Activating mariadb-10.11 @10.11.1_0 ---> Cleaning mariadb-10.11 ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. ---> Some of the ports you installed have notes: mariadb-10.11 has the following notes: On activation if no /opt/local/etc/mariadb-10.11/my.cnf file exists one will be created which loads /opt/local/etc/mariadb-10.11/macports-default.cnf. If a /opt/local/etc/mariadb-10.11/my.cnf file exists MacPorts does not touch it and any changes you make to /opt/local/etc/mariadb-10.11/my.cnf will be preserved (e.g., during port upgrades, deactivations or activations). /opt/local/etc/mariadb-10.11/my.cnf is a good place to customize your mariadb-10.11 installation. Any changes made to /opt/local/etc/mariadb-10.11/macports-default.cnf will be lost during port upgrades, deactivations or activations so you are advised to not make changes here. Currently /opt/local/etc/mariadb-10.11/macports-default.cnf contains only one directive; to disable networking. With disabled networking it is possible to install and have running all the MacPorts mysql ports simultaneously.
Change History (2)
comment:1 Changed 21 months ago by jmroot (Joshua Root)
Owner: | set to michaelld |
---|---|
Status: | new → assigned |
It is intentional that mariadb-10.11 and all of the other MySQL-compatible software do not install their binaries into /opt/local/bin. If they did that, they would conflict with one another, which we don't want. Considerable effort was expended to ensure that these conflicts do not occur, by moving the files out of /opt/local/bin and other common directories.
mariadb-10.11 and all of the other MySQL-compatible ports do support the
sudo port select
mechanism; that is the method by which you are intended to obtain symlinks in /opt/local/bin to the programs you want to use. You can use it to see a list of available installed MySQL-compatible ports; for example on my system just now:To select it:
And then:
To deselect it later:
You are correct that the mariadb-10.11 port does not print a note informing the user of this capability, and ideally it should be enhanced to do so. Unfortunately right now it is the responsibility of each port that uses the
sudo port select
mechanism to implement that note manually. It would be better if the select portgroup handled it automatically but at present it does not.