Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123310 - Mysql header and librarie files are installes into the wrong paths (dev-db/mysql, mysql.eclass)
Summary: Mysql header and librarie files are installes into the wrong paths (dev-db/my...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-18 11:58 UTC by Felix J. Oppermann
Modified: 2006-03-18 04:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.txt,2.51 KB, text/plain)
2006-02-19 09:43 UTC, Felix J. Oppermann
Details
sed --version (sed.txt,469 bytes, text/plain)
2006-02-19 09:44 UTC, Felix J. Oppermann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix J. Oppermann 2006-02-18 11:58:12 UTC
All mysql ebuilds using mysql.eclass install their header and shared  librarie files into the wrong paths. 


The headers are installed in '/usr/include/mysql-VERSION/mysql' and the libraries in '/usr/lib/mysql-VERSION/mysql' where 'VERSION is the major/minor-version of the installed mysql. I guess this is not intended and the right directories are /usr/include/mysql-VERSION and /usr/lib/mysql-VERSION


Build 2006-02-18 on Linux 2.6.14

The ebuild with which I first encountered the bug was mysql-5.0.18-r30 but mysql-4.1.18-r30 showed the same behavior.


The bug is caused by the sed skript in line 372 of mysql.eclass:	

find . -name 'Makefile' \
	-exec sed --in-place \
	-e 's|^pkglibdir\s*=\s*$(libdir)/mysql|pkglibdir = $(libdir)|' \
	-e 's|^pkgincludedir\s*=\s*$(includedir)/mysql|pkgincludedir = $(includedir)|' \
	{} \;

At least some implementations of sed seem not to support '\s' so that the lines in the makefile are not replaced and the files get installed in the wrong path.
I used GNU sed Version 4.0.7.
Comment 1 Francesco R. (RETIRED) gentoo-dev 2006-02-19 07:37:41 UTC
gnu sed version 4 should be really ok, please post the output of "emerge --info && sed --version"
Comment 2 Francesco R. (RETIRED) gentoo-dev 2006-02-19 07:58:28 UTC
also the output of "equery f dev-db/mysql" could be interesting.

may be you had a broken file system, i.e. the previous mysql de-installed badly, this is a know (and hopefully now resolved) bug.
Comment 3 Felix J. Oppermann 2006-02-19 09:43:41 UTC
Created attachment 80197 [details]
emerge --info
Comment 4 Felix J. Oppermann 2006-02-19 09:44:17 UTC
Created attachment 80198 [details]
sed --version
Comment 5 Felix J. Oppermann 2006-02-19 09:51:48 UTC
I included the output of emerge --info and sed --version as attachments.

I could fix the problem on my system by replacing the '\s*' with normal space characters in the sed skript on line 372 following of mysql.eclass. The downside is that it won't recognise the line any more if it contains multiple spaces. ' \+' might do the trick, but i didn't test that myself, yet.
Comment 6 Felix J. Oppermann 2006-02-23 05:55:14 UTC
(In reply to comment #2)
> also the output of "equery f dev-db/mysql" could be interesting.
> 
> may be you had a broken file system, i.e. the previous mysql de-installed
> badly, this is a know (and hopefully now resolved) bug.
> 
I allready fixed the bug on my system, so this output shouldn't be too interesting. Before the fix, the files in the wrong subdirectory belonged to the package like one should expect.
Comment 7 Francesco R. (RETIRED) gentoo-dev 2006-03-18 04:03:13 UTC
mysql slotted has been retired, closing as fixed