make_sandbox_from_installed script fails due to duplicate lib/lib64 links
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Sandbox |
New
|
Undecided
|
Unassigned |
Bug Description
Hello Giuseppe,
We're using MySQL::Sandbox to create mysql instances for functional
test runs. It's working great, using 'make_sandbox_
set up a new mysql sandbox from the installed system mysql.
Apparently, the script fails in systems where /usr/lib64 is symlinked
to /usr/lib, causing it to try to create a $sandbox_root/lib link
twice, one for 'lib64' and one for 'lib'.
For now we're overwriting the script with a patched version,
but that's messy and less than awesome.
I'm not sure what the appropriate fix is, but these two strategies work:
1) Comment out the 'lib64' line from @binaries, line 64.
2) Apply the following diff:
--- make_sandbox_
+0200
+++ make_sandbox_
+0200
@@ -61,7 +61,7 @@
{files => 'my*', from => 'bin/', to => 'bin'},
{files => 'resolveip', from => 'bin/', to => 'bin'},
{files => 'mysql_install_db', from => 'scripts/', to => 'bin',
optional => 1},
- {files => 'mysql*', from => 'lib64/', to => 'lib',
optional => 1},
+ {files => 'mysql*', from => 'lib64/', to => 'lib64',
optional => 1},
{files => 'mysql*', from => 'lib/', to => 'lib',
optional => 1},
{files => 'mysql*', from => 'libexec/', to => 'bin',
optional =>1},
{files => 'mysql*', from => 'sbin/', to => 'bin',
optional =>1},
Please let me know if you can do something about this.
FYI: I created a very basic patch in #714517 that solves this.
instead of removing the entry, 'ln' is invoked with -f to remove the existing symbolic link. this too is a big ugly.