|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Removing a Plugin and its dependencies
I recently had an issue that was caused by a misbehaving plugin. More specifically, a misbehaving plugin dependency. I noticed there is no way from the plugin manager to uninstall a plugin AND all of its (unneeded) dependencies so I started thinking about writing a plugin to do this. Looking at the PluginAPI I don't see any methods that tell me what dependencies a plugin has or if an installed plugin is a dependency of another installed plugin.
Did I miss something? If not I plan on making a feature request to Sage. (I really don't want to write an XML parser.) Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. Last edited by tmiranda; 12-01-2010 at 12:37 PM. |
#2
|
|||
|
|||
My 2 cents make the request to sagetv anyhow this should be a default feature when uninstalling a plugin.
|
#3
|
||||
|
||||
Quote:
I brought this up some time ago as well.. i can remember if it was a private email or forum posting, but I didn't see anything at time to get a recursive list of dependencies. It would be handy to simply select something like BMT and and then click completely uninstall and it would inform you of all the plugins that would have to be removed to completely remove bmt and it's dependencies. Unfortunately there is nothing in the PluginAPI about dependencies
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#4
|
|||
|
|||
After having to try and fix some plugins, the ability to remove a plugin and its dependancies should be available.
__________________
Sage Server: i5-2500K 8 GB DDR, 6000gb HDD, 4xHD-PVR < 4xBell 6141, Win7 x64 Client 1: HD-200, Panasonic 42PX75 Client 2: HD-300, Samsung LCD Client 3: HD-300, Samsung PN50C550 Client 4: MS Surface Pro |
#5
|
||||
|
||||
Quote:
The real trick is deciding whether it's OK to uninstall them. Suppose the user installs plugin A, which pulls in B as a dependency. Suppose also that B provides some useful feature of its own that the user then comes to rely on. In that case, automatically removing B when A is uninstalled would not necessarily be what the user wants. It's even possible that the user manually installed B first, and then A, and wants to keep B when A is removed. There's no way to distinguish these cases just by examining dependencies. So the only time it would really be safe to remove B is if B is a pure library plugin that exposes no user-level behavior at all (in which case it does no harm to leave B installed).
__________________
-- Greg |
#6
|
||||
|
||||
Quote:
I agree that you'd have to be careful, which I why I would propose that any plugin that would do this this... should actually present the user with the complete list of plugins that would be removed before the remove is actually done... ie, like most package managers under linux. Ideally the "uninstall" would have 2 buttons.. "uninstall" and "completely remove". The latter would prompt you with a dialog showing a complete list of plugins that need to be removed, giving you a chance to continue, or abort. Just for the record... i don't intend on writing this... but it is good to know, as Greg pointed out, that the APIs are there, in case someone else wants to do it.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#7
|
||||
|
||||
Greg, now I remember why GetPluginDependencies doesn't work... because it doesn't return a list of plugin ids, but rather a list of descriptions...
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#8
|
||||
|
||||
Quote:
__________________
-- Greg |
#9
|
||||
|
||||
Thanks for the pointers. I didn't realize I could use the String[] from GetPluginDependencies to find the Plugin Object, now I see how to do that.
I'm going to look into this a little more because I think it's a worthwhile plugin to have available. It's probably something that should really be done in the Sage Core. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#10
|
||||
|
||||
Quote:
I'm just starting on this and suspect it will not get done real soon because Slugger and I are getting ready to release SJQv4.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#11
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#12
|
||||
|
||||
It's still in the deisgn phase. Lots of things to think about: dependencies of dependencies, circular depencies, order of plugin removal, failure recovery, etc. I think it will be fun.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#13
|
||||
|
||||
I'm pretty sure circular dependencies are detected and flagged as errors by the plugin submission script. So there shouldn't be any circular dependencies in the repository or on normal end-user installations.
On the other hand it's probably possible to abuse SageTVPluginsDev.xml to create circular dependencies locally on your dev machine.
__________________
-- Greg |
#14
|
|||
|
|||
Quote:
|
#15
|
||||
|
||||
Quote:
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#16
|
||||
|
||||
So here it is: http://forums.sagetv.com/forums/showthread.php?t=53047
I had to brush off my recursive programming skills for this so if you find bugs please let me me know.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conditional dependencies in a manifest? | tmiranda | SageTV Studio | 0 | 09-04-2010 05:32 PM |
STVi Dependencies | jaminben | SageTV Studio | 5 | 07-23-2010 05:35 PM |
Plugin Dependencies: A blessing and a curse! | Slugger | SageTV Studio | 11 | 05-27-2010 12:46 PM |
When a plug-in states it has dependencies, are they installed automatically? | CanadianEh | SageTV v7 Customizations | 2 | 05-22-2010 09:42 AM |