Bug 5160 - Debian plugins path needs updating after Slim/Plugin/* reorg
: Debian plugins path needs updating after Slim/Plugin/* reorg
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 7.0
: Other Debian Linux
: P2 major (vote)
: ---
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-10 23:50 UTC by Jared Rhine
Modified: 2007-07-16 21:08 UTC (History)
0 users

See Also:
Category: ---


Attachments
Updates Debian plugin path in OSDetect.pm (370 bytes, patch)
2007-07-10 23:53 UTC, Jared Rhine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Rhine 2007-07-10 23:50:49 UTC
String lookup are broken for plugins distributed with the Debian slimserver 7.0a1 package.

The plugin path detection logic in OSDetect.pm is out of sync with the Debian package itself.  The result is that string lookup (English or localized) for distributed plugins fails, making the web UI ugly and not usable for (distributed) plugins.  To fix the problem, OSDetect.pm needs to be patched to match the Debian install (note: this reporter believes the Debian file layout is correct and should not be changed.)

OSDetect has a "dirsFor" function which returns a list of directories for the specified application area specified.  So for dirsFor('Plugins'), there is a Debian-specific section called by line 177:

        } elsif (isDebian()) { 

which returns the following for the 'Plugins' type:

                } elsif ($dir eq 'Plugins') {
                        push @dirs, "/usr/share/perl5";

However, the plugins are not found directory within the "/usr/share/perl5" directory.  Instead, plugins are located (on Debian specifically) at "/usr/share/perl5/Slim/Plugin" (see platforms/debian/rules in svn).  So the above should read:

                } elsif ($dir eq 'Plugins') {
                        push @dirs, "/usr/share/perl5/Slim/Plugin";

The attached patch makes this 12-character change.

Note, the RedHat section of the OSDetect.pm file apparently already has the equivalent of the above change.

See:

  http://forums.slimdevices.com/showthread.php?p=213569

for more information and original problem report.

To replicate:
- Install Debian Etch (version is completely irrelevant, though)
- Install slimdevices distributed Debian package: http://debian.slimdevices.com/pool/main/s/slimserver/slimserver_7.0a1_all.deb
- Start slimserver with debugging output
- View the web UI.  See PLUGIN_* strings on homepage. See blank entries in server settings pulldown.  See failed lookups in the slimserver logs like: "Slim::Utils::Strings::string (350) Error: missing string PLUGIN_HEALTH_NETTEST"
Comment 1 Jared Rhine 2007-07-10 23:53:04 UTC
Created attachment 2065 [details]
Updates Debian plugin path in OSDetect.pm

Attaching patch to fix Debian plugin path problem
Comment 2 Adrian Smith 2007-07-14 02:04:09 UTC
Added in change 12394.  Please check and close
Comment 3 Jared Rhine 2007-07-16 21:08:31 UTC
Change to OSDetect.pm confirmed.  Wiped slimserver deb package, reinstalled, and confirmed that web UI is able to fetch all strings properly.

Marking resolved.

Thanks!