04-25-2015, 05:50 PM | #1 |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Plugin Removal
When a plugin is removed, the zip is deleted but associated files are not.
I appreciate the reason why one might not want them deleted, but IMO the option to do so should be available. I just removed the Open With PI, because I now use the built in Open With feature exclusively. That left 'Open With Help.htm' and 'Open With.json' in the <configuration>\plugins folder. I knew that would happen... but I suspect a good many users wouldn't... so I removed them manually. I know it 'doesn't matter' and the disk space used is immaterial, but if at a later date someone had a problem with the built in Open With feature they could get confused. Besides, IMO its bad practice to leave dross lying around on computers, just as it is on mine sites. Windows programs often have an option in their 'Uninstall' to delete/retain the settings, including programs that don't store settings in the registry. So on that platform at least, the question 'Also remove configuration data?' would not be out of line with 'common' practice. BR |
04-25-2015, 06:18 PM | #2 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Calibre doesn't know all the pecifics about plugin configuration and/or support files. Only the plugin itself would know all the details necessary to remove itself entirely. I suppose it wouldn't be impossible to create a cleanup framework that calibre could run at plugin removal time, but it would still be entirely up to the plugin developer to provide a valid manifest for that cleanup routine. Sounds like a lot of work for something that couldn't really be enforced anyway.
Don't get me wrong, I'm not opposed to a cleanup option, I'm just not sure it could be accomplished short of calibre monitoring every run of every plugin to record any files that might get created by plugins. Last edited by DiapDealer; 04-25-2015 at 06:38 PM. |
Advert | |
|
04-25-2015, 07:00 PM | #3 | |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I'm blissfully ignorant of calibres PI framework - so "BetterRed, that's not the way calibre PI's work, or that's hard to do in python, etc" are acceptable answers. BR |
|
04-25-2015, 07:41 PM | #4 | |||
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
Quote:
If it's not authoritative and automatic (when choosing the 'Also remove configuration data?' option), I don't see the point of including it. And I don't see a way of making it entirely authoritative and automatic (without extensive plugin process monitoring/logging). |
|||
04-25-2015, 08:33 PM | #5 | |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The framework would have Code:
removePlugin(pluginSelected) { ... if (pluginSelected.removalCleanup != null) pluginSelected.removalCleanup(); ... } Code:
removalCleanup() { ... if (askQuestion("Remove the dross?") == true) { remove myJsonFile(); remove myHelpFile(); ... } ... } BR |
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Add a Nook DRM-Removal Plugin to calibre | gyuimnbhyu | Calibre | 1 | 06-28-2014 10:24 AM |
DRM removal plugin for Calibre | cococrou | Plugins | 63 | 11-01-2012 05:08 PM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
Removal of plugin not removing config store | meme | Plugins | 4 | 02-01-2011 04:45 PM |