Blame SOURCES/mysql-file-contents.patch

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