mysql/community-mysql-file-conten...

46 lines
1.7 KiB
Diff

Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
breaks at least two packaging commandments, so we put them into $libdir
instead. That means we have to hack the file_contents regression test
to know about this.
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
diff -up mysql-5.6.19/mysql-test/t/file_contents.test.file-contents mysql-5.6.19/mysql-test/t/file_contents.test
--- mysql-5.6.19/mysql-test/t/file_contents.test.file-contents 2014-07-25 11:56:12.442153944 +0200
+++ mysql-5.6.19/mysql-test/t/file_contents.test 2014-07-25 12:00:11.578581702 +0200
@@ -11,7 +11,7 @@
--perl
print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
$dir_bin = $ENV{'MYSQL_BINDIR'};
-if ($dir_bin =~ m|/usr/|) {
+if ($dir_bin =~ m|.*/usr/$|) {
# RPM package
$dir_docs = $dir_bin;
$dir_docs =~ s|/lib|/share/doc|;
@@ -26,7 +26,7 @@ if ($dir_bin =~ m|/usr/|) {
$dir_docs = glob "$dir_bin/share/doc/mysql-community-server*";
}
}
-} elsif ($dir_bin =~ m|/usr$|) {
+} elsif ($dir_bin =~ m|.*/usr$|) {
# RPM build during development
$dir_docs = "$dir_bin/share/doc";
if(-d "$dir_docs/packages") {
@@ -39,6 +39,15 @@ if ($dir_bin =~ m|/usr/|) {
# If not it might be ULN so try that
$dir_docs = glob "$dir_bin/share/doc/mysql-community-server*";
}
+
+ # All the above is entirely wacko, because these files are not docs;
+ # they should be kept in libdir instead. mtr does not provide a nice
+ # way to find libdir though, so we have to kluge it like this:
+ if (-d "$dir_bin/lib64/mysql") {
+ $dir_docs = "$dir_bin/lib64/mysql";
+ } else {
+ $dir_docs = "$dir_bin/lib/mysql";
+ }
}
} else {
# tar.gz package, Windows, or developer work (in BZR)