Bug 4787 - OSDetect::dirsFor('Plugins') not correct with 7.0a1 unstable debian package
: OSDetect::dirsFor('Plugins') not correct with 7.0a1 unstable debian package
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 7.0
: PC Debian Linux
: P2 normal (vote)
: ---
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-25 17:15 UTC by David Lutz
Modified: 2008-12-18 11:12 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Ugly little hack (478 bytes, patch)
2007-02-25 17:18 UTC, David Lutz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Lutz 2007-02-25 17:15:57 UTC
On my debian sid (unstable) server I recently switched from using the SVN tree directly to using the slim provided nightly debian package and lost all plugins in the process.  When the web interface refused to come up recently because of references to the Transportor digital input plugin I finally took the time to track the problem down.  It seems that the PluginManager::init() calls OSDetect::dirsFor('Plugins') and gets returned a list of two items, /usr/sbin/Slim/Plugin  and /usr/share/slimserver/Plugins.  Unfortunately all the included plugins are located at /usr/share/perl5/Slim/Plugin, so no plugins are loaded  The first path is created off the $Bin directory which for the debian package is /usr/sbin (at least that is where the main slimserver script is located).  I have an ugly little hack I will attach that gets around the problem on my system, but I am not sure if fully addresses the root problem.
Comment 1 David Lutz 2007-02-25 17:18:55 UTC
Created attachment 1820 [details]
Ugly little hack

This isn't pretty, but it gets Plugins working again on my system.
Comment 2 KDF 2007-02-27 17:16:02 UTC
Plugins are being reworked as per bug 4112. 7.0 is not designed, nor will it be accepting old plugins without the plugins being written to conform to the new API.

7.0 is considered highly experimental, recommended only for those who are actively involved in testing/patching.
Comment 3 David Lutz 2007-02-28 09:57:13 UTC
Updating the summary to better indicate the problem, which is a mismatch between the debian package and the OSDetect::dirsFor() function and not an issue with Plugins themselves.

Perhaps this bug report should be moved to a different Component, but I am not sure which Component would be more appropriate.
Comment 4 KDF 2007-02-28 10:39:55 UTC
ah, that's different.  Debian munges the locations for internal files. As ugly as it is, the Slim tree gets installed under /usr/share/perl5, so it would appear the "ugly little hack" is exactly what will have to be done.  However, the bigger problem will be fedora, which seems to simply install Slim/* to somewhere on the system that matches the %perl_sitelib.

Comment 5 KDF 2007-02-28 11:26:50 UTC
looks like the best global fix in both the Debian and RHELorFC (possibly even all cases) is something like:

+ 		if ($dir eq 'Plugins') {
+                       use Config;
+ 			push @dirs, catdir($Config{installsitelib},"Slim/Plugin");
+ 		}

As I don't have a debian install, would you be kind enough to try this and let me know if that works out for you?
thanks.
Comment 6 David Lutz 2007-02-28 13:42:50 UTC
On my debian(sid) system:
$Config{installsitelib} = /usr/local/share/perl/5.8.8

It looks like either of these would work instead:
$Config{installvendorlib} = /usr/share/perl5
$Config{vendorlib} = /usr/share/perl5

The debian/rules files hardcodes the /usr/share/perl5 path, while slimserver.spec uses the %perl_sitelib so there may not be an easy global solution as long as the packaging is done differently on each platform.
Comment 7 KDF 2007-02-28 18:17:35 UTC
This should be fixed for 7.0 at change 11543

I'm leaving open as we may wish to take another look at the debian change specifically.  if the path changes, we'll have to edit this in the Debian rules as well as OSDetect::dirsFor.  However, both could be adjusted to use the installvendorlib config variable so that this can be automatically matching the varying system configurations that might come up.

Comment 8 David Lutz 2007-03-02 08:21:44 UTC
I just checked change 11563 and this is working now.

Thanks.
Comment 9 Spies Steven 2007-03-02 11:13:06 UTC
KDF, I am going to assign this one to you for now if that is OK.
We have implemented a new scheme that all new bugs are now assigned to qa@slimdevices.com until we get a chance to look at them. Once we look at them we either assign them to ourselves or someone else. The goal is to keep bugs assigned to qa@slimdevices as small as possible. Thanks!
Comment 10 Chris Owens 2007-03-05 13:30:37 UTC
Hi Steven, if there's a change number listed, you can just go ahead and mark the bug as 'fixed'.
Comment 11 Chris Owens 2008-03-07 09:05:07 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.