Blame SOURCES/mysql-file-contents.patch

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