Bug 6980 - PluginBuilder bundles extra stuff when packaging plugins
: PluginBuilder bundles extra stuff when packaging plugins
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 7.4.0
: PC Fedora
: -- minor (vote)
: Future
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-06 00:02 UTC by Eric Koldinger
Modified: 2010-05-10 07:14 UTC (History)
0 users

See Also:
Category: ---


Attachments
Patch to solve inclusion of .yml and cmdwrapper files (654 bytes, patch)
2008-02-21 08:20 UTC, Erland Isaksson
Details | Diff
Patch to include pl files (627 bytes, patch)
2008-03-10 09:33 UTC, Erland Isaksson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Koldinger 2008-02-06 00:02:05 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
Comment 1 Blackketter Dean 2008-02-06 07:27:52 UTC
Michael: would this be yours?

Comment 2 Erland Isaksson 2008-02-21 08:20:54 UTC
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.
Comment 3 Michael Herger 2008-03-07 17:27:53 UTC
Not a bug fix we'll see in the 7.0 series. Needs further work to include Controller applets.
Comment 4 Erland Isaksson 2008-03-10 09:33:33 UTC
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.
Comment 5 Eric Koldinger 2008-03-10 18:35:12 UTC
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?
Comment 6 Michael Herger 2008-03-11 00:19:03 UTC
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).
Comment 7 Michael Herger 2008-06-21 06:26:50 UTC
Punting non-critical bugs to 7.2
Comment 8 Michael Herger 2008-07-24 03:14:14 UTC
Punting non-critical bugs to 7.3
Comment 9 Michael Herger 2008-08-11 06:18:02 UTC
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!
Comment 10 Eric Koldinger 2008-09-19 16:44:36 UTC
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
Comment 11 Michael Herger 2009-01-14 05:44:33 UTC
>   inflating: lib/Slim/Buttons/Common.pm
>   inflating: lib/Slim/Control/Request.pm

Eric - where is SC installed on your system?
Comment 12 Michael Herger 2010-05-10 07:14:44 UTC
We no longer recommend using the plugin builder. Better just zip up the plugin folder.