Bug 6997

Summary: koha-remove leaves system in inconsistent state if there is an error
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: PackagingAssignee: Jared Camins-Esakov <jcamins>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: dpavlin, koha.sekjal, paul.poulain, robin
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 6929    
Attachments: Bug 6997: Koha-remove leaves system in inconsistent state
Bug 6997: Koha-remove leaves system in inconsistent state

Description Jared Camins-Esakov 2011-10-10 11:49:41 UTC
If you accidentally delete one of the site configuration files (for example, the Apache conf file) for an instance, then run koha-remove to finish the removal process, the script will die when it tries to rm the nonexistent file, leaving any steps after that in the removal process undone.
Comment 1 Jared Camins-Esakov 2011-10-10 12:10:27 UTC Comment hidden (obsolete)
Comment 2 Dobrica Pavlinusic 2011-11-24 21:34:40 UTC
Created attachment 6396 [details] [review]
Bug 6997: Koha-remove leaves system in inconsistent state

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Comment 3 Ian Walls 2011-12-02 12:59:31 UTC
Handles all the cases, as far as I can tell, wrapping in conditional checks.  Only affects packages in a very specific case, so little chance of regression anywhere in the system.  marking passed QA
Comment 4 Paul Poulain 2011-12-03 06:54:41 UTC
patch pushed, please test
(Note i haven't tested this patch myself, reading it seems OK though)