Bug 13276 - scanner.pl fails to start (to compile) because of order of bootstrapped modules
: scanner.pl fails to start (to compile) because of order of bootstrapped modules
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.4.0
: Other Linux (other)
: -- normal with 1 vote (vote)
: ---
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-06 13:22 UTC by Philippe Kehl
Modified: 2009-08-10 08:05 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Kehl 2009-08-06 13:22:59 UTC
Hello

In r28084, when I run "scanner.pl --help" I get:

Global symbol "%GetInfoType" requires explicit package name at /volume1/flip/Musik/SqueezeCenter-7.4-svn/Slim/Utils/MySQLHelper.pm line 590.
Compilation failed in require at (eval 117) line 2.
BEGIN failed--compilation aborted at (eval 117) line 2.
Log4perl: Seems like no initialization happened. Forgot to call init()?


When I apply this patch it works:

-----------------------------------------------------------------------
--- scanner.pl  (revision 28084)
+++ scanner.pl  (working copy)
@@ -45,7 +45,7 @@
        use Slim::bootstrap;
        use Slim::Utils::OSDetect;

-       Slim::bootstrap->loadModules([qw(version Time::HiRes DBD::mysql DBI HTML::Parser XML::Parser::Expat YAML::Syck)], []);
+       Slim::bootstrap->loadModules([qw(version Time::HiRes DBI DBD::mysql HTML::Parser XML::Parser::Expat YAML::Syck)], []);

        require File::Basename;
        require File::Copy;
-----------------------------------------------------------------------

Very strange. Bootstrapping DBI before DBD::mysql makes it work. Particularly, because svn blame tells me that the line is pretty old (April 2008, r18490).

However, @Slim::bootstrap::default_required_modules lists DBI before DBD::mysql. So maybe there's good reason for this order.

On tho other hand, this is on SSODS, which is probably not the reference..

If it doesn't break any of the default systems, please apply my patch.

Regards,
flip
Comment 1 Philippe Kehl 2009-08-09 15:19:08 UTC
It does work again in r28128 with the "wrong" order of arguments of Slim::bootstrap->loadModules().

I checked again r28084 and it still doesn't work there.

Very strange. Probably an SSODS problem.
Comment 2 SVN Bot 2009-08-10 08:05:08 UTC
 == Auto-comment from SVN commit #28131 to the slim repo by andy ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28131 ==

Fixed bug 13276, load DBI before DBD::mysql to fix bug on SSODS