Bug 25967

Summary: Plugin upgrade should remove existing code before installing new code
Product: Koha Reporter: David Cook <dcook>
Component: Plugin architectureAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Cook 2020-07-09 13:42:00 UTC
At the moment, upgrading a plugin really means overwriting the existing plugin files with new files.

This is fine for files that are added or modified, but it won't remove files that have been deleted.

Of course, we don't necessarily know what files to delete when we're upgrading a plugin, because we don't track the files, and the files can be a bit messy.

For instance, "/var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions" is the root for both KitchenSink and CoverFlow.

This is probably an infeasible idea due to existing installs, but just pointing out the flaw in the plugin architecture.