Blame SOURCES/mysql-file-contents.patch

47f670
Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
47f670
breaks at least two packaging commandments, so we put them into $libdir
47f670
instead.  That means we have to hack the file_contents regression test
47f670
to know about this.
47f670
47f670
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
47f670
47f670
diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test
47f670
index 75f8c93..973291c 100644
47f670
--- a/mysql-test/t/file_contents.test
47f670
+++ b/mysql-test/t/file_contents.test
47f670
@@ -12,7 +12,7 @@
47f670
 --perl
47f670
 print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
47f670
 $dir_bin = $ENV{'MYSQL_BINDIR'};
47f670
-if ($dir_bin =~ m|^/usr/|) {
47f670
+if ($dir_bin =~ m|.*/usr/$|) {
47f670
   # RPM package
47f670
   $dir_docs = $dir_bin;
47f670
   $dir_docs =~ s|/lib|/share/doc|;
47f670
@@ -35,7 +35,7 @@ if ($dir_bin =~ m|^/usr/|) {
47f670
       }
47f670
     }
47f670
   }
47f670
-} elsif ($dir_bin =~ m|/usr$|) {
47f670
+} elsif ($dir_bin =~ m|.*/usr$|) {
47f670
   # RPM build during development
47f670
   $dir_docs = "$dir_bin/share/doc";
47f670
   if(-d "$dir_docs/packages") {
47f670
@@ -55,6 +55,15 @@ if ($dir_bin =~ m|^/usr/|) {
47f670
         $dir_docs = glob "$dir_bin/share/mysql-*/docs";
47f670
       }
47f670
     }
47f670
+
47f670
+    # All the above is entirely wacko, because these files are not docs;
47f670
+    # they should be kept in libdir instead.  mtr does not provide a nice
47f670
+    # way to find libdir though, so we have to kluge it like this:
47f670
+    if (-d "$dir_bin/lib64/mysql") {
47f670
+       $dir_docs = "$dir_bin/lib64/mysql";
47f670
+    } else {
47f670
+       $dir_docs = "$dir_bin/lib/mysql";
47f670
+    }
47f670
   }
47f670
 } else {
47f670
   # tar.gz package, Windows, or developer work (in git)