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