Bugzilla – Bug 6980
PluginBuilder bundles extra stuff when packaging plugins
Last modified: 2010-05-10 07:14:44 UTC
When packaging a plugins with create-slimserver-plugin, I typically find many of the server code files bundled in with the plugin. An example manifest from the AutoDisplay plugin is listed below. The plugin should really only include lib/Plugins/AutoDisplay/{PlayerSettings,Plugin}.pm. Note that PlayerSettings.pm appears to be duplicated twice. Similar behavior happens with all the plugins I've played with, although the . It seems to pick up, at the very least, all the modules directly accessed. I'm running against the latest version of PluginBuilder from subversion, and pointing to a recent version of SqueezeCenter, also from svn (not the RPM installed version, although that does exist on the system, and is running). Typical command line: ./SlimDevices/SqueezeCenter/trunk/tools/PluginBuilder/bin/create-slimserver-plugin --slimserverdir ./SlimDevices/SqueezeCenter/trunk/server/ --plugindir AutoDisplay/ The excludes file seems to be the problem somehow. It's created in the temp dir, and if I leave it around, I see it includes all the files to exclude, but they seem to show up nonetheless. For example, lines cut from the excludes file: -X Slim::Buttons::BrowseUPnPMediaServer -X Slim::Buttons::Common -X Slim::Buttons::Home But you can clearly see Slim/Buttons/Common.pm showing up in the file below. Running on Fedora Core 7 Linux. pp version is: 0.976, as installed by yum. Categorization of this may not be quite right, but I'm not seeing anything much better. $ unzip -l lib/Plugins-AutoDisplay-Plugin.par Archive: lib/Plugins-AutoDisplay-Plugin.par Length Date Time Name -------- ---- ---- ---- 0 01-30-08 23:36 lib/ 0 01-30-08 23:36 script/ 857 01-30-08 23:36 MANIFEST 253 01-30-08 23:36 META.yml 2586 01-30-08 23:36 lib/AutoDisplay/PlayerSettings.pm 2594 01-30-08 23:36 lib/Plugins/AutoDisplay/PlayerSettings.pm 11709 01-30-08 23:36 lib/Plugins/AutoDisplay/Plugin.pm 44899 01-30-08 23:36 lib/Slim/Buttons/Common.pm 31909 01-30-08 23:36 lib/Slim/Player/Client.pm 24803 01-30-08 23:36 lib/Slim/Player/Player.pm 2336 01-30-08 23:36 lib/Slim/Plugin/Base.pm 5896 01-30-08 23:36 lib/Slim/Utils/DateTime.pm 14873 01-30-08 23:36 lib/Slim/Utils/Log.pm 25986 01-30-08 23:36 lib/Slim/Utils/Misc.pm 16388 01-30-08 23:36 lib/Slim/Utils/Prefs.pm 9248 01-30-08 23:36 lib/Slim/Utils/Strings.pm 12227 01-30-08 23:36 lib/Slim/Utils/Timers.pm 80910 01-30-08 23:36 lib/Slim/Web/HTTP.pm 4433 01-30-08 23:36 lib/Slim/Web/Settings.pm 1 01-30-08 23:36 lib/ppvAJIz.pl 278 01-30-08 23:36 script/main.pl 1 01-30-08 23:36 script/ppvAJIz.pl -------- ------- 292187 22 files
Michael: would this be yours?
Created attachment 2947 [details] Patch to solve inclusion of .yml and cmdwrapper files This is not exactly the same issue but it is related to plugin builder. I use the attached patch to get the PluginBuilder to package plugins that contains skins correctly. This includes the skinconfig.yml files correctly and also includes files without an extension such as cmdwrapper_XXX. I'm not 100% sure this actually does the right thing in all cases and I'm sure there is a better way to do it. However, I thought it might be a good idea to post it in case someone that knows perl better likes to check it and make any changes and then commit the change to svn.
Not a bug fix we'll see in the 7.0 series. Needs further work to include Controller applets.
Created attachment 3055 [details] Patch to include pl files Patch to PluginBuilder which makes it possible to include .pl utility scripts with a plugin zip. This is used for example by TrackStat for a separate perl script that is executed manually on another machine to import a TrackStat log file into iTunes.
This sounds like two different bugs. One (mine, kolding's), packaging too much stuff when it shouldn't, and one (Erland's) not packaging a bunch of stuff that it could really use. Should this be split?
I consider this the "make PluginBuild do what it is expected to do" bug. This covers exclusion of stuff we don't want as well as inclusion of files it's missing right now (Controller applets aren't included at all).
Punting non-critical bugs to 7.2
Punting non-critical bugs to 7.3
change 22507 (7.2 branch) - I've added a few lines to exclude the installation folders if the script isn't run from SVN. Please give it a try!
Gave this a spin a while back. Still gathered a bunch of extra stuff. Here's an example using PluginBuilder from the tip of the 7.2 tree (just pulled, 9/19/08): Archive: Plugins-AutoDisplay-Plugin.par creating: lib/ creating: script/ inflating: MANIFEST inflating: META.yml inflating: lib/AutoDisplay/PlayerSettings.pm inflating: lib/Plugins/AutoDisplay/PlayerSettings.pm inflating: lib/Plugins/AutoDisplay/Plugin.pm inflating: lib/Slim/Buttons/Common.pm inflating: lib/Slim/Control/Request.pm inflating: lib/Slim/Display/Display.pm inflating: lib/Slim/Display/NoDisplay.pm inflating: lib/Slim/Player/Client.pm inflating: lib/Slim/Player/Player.pm inflating: lib/Slim/Plugin/Base.pm inflating: lib/Slim/Utils/DateTime.pm inflating: lib/Slim/Utils/Log.pm inflating: lib/Slim/Utils/Misc.pm inflating: lib/Slim/Utils/Prefs.pm inflating: lib/Slim/Utils/Strings.pm inflating: lib/Slim/Utils/Timers.pm inflating: lib/Slim/Web/HTTP.pm inflating: lib/Slim/Web/Settings.pm inflating: lib/pp23WRb.pl inflating: script/main.pl inflating: script/pp23WRb.pl
> inflating: lib/Slim/Buttons/Common.pm > inflating: lib/Slim/Control/Request.pm Eric - where is SC installed on your system?
We no longer recommend using the plugin builder. Better just zip up the plugin folder.