Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-25-2015, 05:50 PM   #1
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
BetterRed is offline   Reply With Quote
Old 04-25-2015, 06:18 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is online now   Reply With Quote
Advert
Old 04-25-2015, 07:00 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
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.
@DiapDealer - Why couldn't the PI removal framework invoke an 'uninstall_cleanup' method within the PI (assuming it exists). That would put the onus on the PI to know about its dross files rather than the framework itself. Obviously the PI developers would have to add the uninstall_cleanup method to relevant PI's - at their convenience.

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
BetterRed is offline   Reply With Quote
Old 04-25-2015, 07:41 PM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
@DiapDealer - Why couldn't the PI removal framework invoke an 'uninstall_cleanup' method within the PI (assuming it exists).
It could, but it doesn't (because the method doesn't currently exist).

Quote:
Originally Posted by BetterRed View Post
That would put the onus on the PI to know about its dross files rather than the framework itself. Obviously the PI developers would have to add the uninstall_cleanup method to relevant PI's - at their convenience.
Yep. Certainly doable ... but that would still leave the user that wasn't aware those files were hanging around in the first place (and every user for that matter) at the mercy of 1) the PI dev who didn't take the time, or 2) the PI dev who didn't do it correctly/completely (or just forgot to update the uninstall_cleanup routine to accommodate later modifications to the plugin).

Quote:
Originally Posted by BetterRed View Post
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.
That's not the way calibre plugins work right now. Python itself certainly isn't a limiting factor in making the plugin framework work like that (though I won't pretend to speculate how "hard" it would be to implement). I just don't see a lot of incentive for someone to spend time creating what—at best—would essentially be a "check here to maybe/sorta cleanup some extra files this plugin may have created ... or not" box.

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).
DiapDealer is online now   Reply With Quote
Old 04-25-2015, 08:33 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
I just don't see a lot of incentive for someone to spend time creating what—at best—would essentially be a "check here to maybe/sorta cleanup some extra files this plugin may have created ... or not" box.
I don't want to belabour the point - but in my imaginary pseudo C implementation, the question to the user would be raised by the PI not by the framework.

The framework would have

Code:
removePlugin(pluginSelected)
{
    ...
    if (pluginSelected.removalCleanup != null)
        pluginSelected.removalCleanup();
    ...
}
The plugin would have

Code:
removalCleanup()
{
    ...
    if (askQuestion("Remove the dross?") == true)
    {
          remove myJsonFile();
          remove myHelpFile();
          ...
    } 
    ...
}
But clearly it's not going to happen, so as my great grandfather would say... san fairy ann

BR
BetterRed is offline   Reply With Quote
Advert
Reply


Forum Jump

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


All times are GMT -4. The time now is 06:37 PM.


MobileRead.com is a privately owned, operated and funded community.