Thread: Plugin Removal
View Single Post
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: 28,607
Karma: 204624552
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 offline   Reply With Quote