make_sandbox_from_installed script fails due to duplicate lib/lib64 links

Bug #680987 reported by Terje Kristensen on 2010-11-24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL Sandbox

Bug Description

Hello Giuseppe,

We're using MySQL::Sandbox to create mysql instances for functional
test runs. It's working great, using 'make_sandbox_from_installed' to
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_from_installed.3.0.12 2010-07-30 16:18:32.000000000
+++ make_sandbox_from_installed.cosimo 2010-07-30 16:19:39.000000000
@@ -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.

Kenny Gryp (gryp) wrote :

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.

cosimo (cosimo-opera) wrote :

Any updates here?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers