[MDEV-12264] scripts/mysql_config.sh: Don't guess basedir, use macro instead Created: 2017-03-15  Updated: 2017-03-22  Resolved: 2017-03-22

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.1.22
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Michal Schorm Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Fedora


Attachments: File mariadb-basedir.patch    

 Description   

Hi,
this little patch makes the script more accurate, I believe: (attachement)

Don't guess basedir in mysql_config; we place it under _libdir because of multilib conflicts, so use rather configured @prefix@ path directly.



 Comments   
Comment by Vladislav Vaintroub [ 2017-03-16 ]

I think it might not work for tar.gz distribution, which can be unpacked anywhere, not exactly to @prefix@ defined at compile-configure time.

Comment by Michal Schorm [ 2017-03-19 ]

I see the problem now, thanks.

I think, I'm ok with "won't fix".

Comment by Sergei Golubchik [ 2017-03-20 ]

mschorm, does current auto-detection work for you? Does it guess correctly in your multilib configuration?

If it doesn't, we could fix it.

Comment by Michal Schorm [ 2017-03-21 ]

I did a minor tests and it seems there is no problem with the way without macro.
I looked even at SCL packages, where it works well too.

I'm going to throw the patch away from Fedora, since it is only a cosmetic fix.

Comment by Michal Schorm [ 2017-03-21 ]

Before the deletion, I went through all of the associated commits.

Here's the bug on our side, that triggers creation of this patch.
https://bugzilla.redhat.com/show_bug.cgi?id=916189

However today, in Fedora 25, it gives the exact same output with and without the patch.

Comment by Michal Schorm [ 2017-03-21 ]

I confirm, it was fixed by change from

basedir=`echo $me | sed -e 's;/bin/mysql_config;;'`

to

# Script might have been renamed but assume mysql_<something>config<something>
basedir=`echo $me | sed -e 's;/bin/mysql_.*config.*;;'`

So I'm gonna remove the patch and you can close this issue.
Thanks.

Generated at Thu Feb 08 07:56:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.