Bug 17777

Summary: koha-remove should deal with temporary uploads
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: ToolsAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: chris, karenliang.student, katrin.fischer, kyle, mirko, mtj
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14294
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17777: koha-remove should deal with temporary uploads
Bug 17777: koha-remove should deal with temporary uploads
Bug 17777: koha-remove should deal with temporary uploads

Description Marcel de Rooy 2016-12-14 15:51:15 UTC

    
Comment 1 Marcel de Rooy 2016-12-14 15:58:38 UTC
Created attachment 58181 [details] [review]
Bug 17777: koha-remove should deal with temporary uploads

If the temporary upload folder exists, it should be discarded when
removing an instance. If we do not, it may/will create problems when
recreating the same instance.

A function in koha-functions.sh is added to determine the temp directory
instead of hardcoding /tmp.

Test plan:
[1] Copy koha-functions.sh to /usr/share/koha/bin
[2] Run koha-create --create-db newinstancexx
[3] Run mkdir /tmp/koha_newinstancexx_upload (if /tmp is your temp!)
[4] Run debian/scripts/koha-remove newinstancexx
    Do not run the regular one, but verify that you use the updated one.
[5] Check that /tmp/koha_newinstancexx_upload is gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Karen 2017-01-16 22:57:25 UTC
Created attachment 59035 [details] [review]
Bug 17777: koha-remove should deal with temporary uploads

If the temporary upload folder exists, it should be discarded when
removing an instance. If we do not, it may/will create problems when
recreating the same instance.

A function in koha-functions.sh is added to determine the temp directory
instead of hardcoding /tmp.

Test plan:
[1] Copy koha-functions.sh to /usr/share/koha/bin
[2] Run koha-create --create-db newinstancexx
[3] Run mkdir /tmp/koha_newinstancexx_upload (if /tmp is your temp!)
[4] Run debian/scripts/koha-remove newinstancexx
    Do not run the regular one, but verify that you use the updated one.
[5] Check that /tmp/koha_newinstancexx_upload is gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Karen Jen <karenliang.student@wegc.school.nz>
Comment 3 Jonathan Druart 2017-01-17 09:37:00 UTC
Created attachment 59076 [details] [review]
Bug 17777: koha-remove should deal with temporary uploads

If the temporary upload folder exists, it should be discarded when
removing an instance. If we do not, it may/will create problems when
recreating the same instance.

A function in koha-functions.sh is added to determine the temp directory
instead of hardcoding /tmp.

Test plan:
[1] Copy koha-functions.sh to /usr/share/koha/bin
[2] Run koha-create --create-db newinstancexx
[3] Run mkdir /tmp/koha_newinstancexx_upload (if /tmp is your temp!)
[4] Run debian/scripts/koha-remove newinstancexx
    Do not run the regular one, but verify that you use the updated one.
[5] Check that /tmp/koha_newinstancexx_upload is gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Karen Jen <karenliang.student@wegc.school.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Marcel de Rooy 2017-01-17 09:48:45 UTC
Thanks Karen and Jonathan
Comment 5 Marcel de Rooy 2017-01-18 11:49:55 UTC
Karen: do not change the assignee please. Thanks.
Comment 6 Kyle M Hall 2017-01-19 11:23:40 UTC
Pushed to master for 17.05, thanks Marcel!
Comment 7 Chris Cormack 2017-01-19 18:48:44 UTC
(In reply to Marcel de Rooy from comment #5)
> Karen: do not change the assignee please. Thanks.

Ahh I told them too, because they weren't getting any mail otherwise. I wanted them to get the emails telling them they were pushed, there is a bug somewhere in bugzilla at the moment when you attach a patch you dont get added to the cc.

(Of course the patch author is what really matters I guess)
Comment 8 Katrin Fischer 2017-01-22 16:58:42 UTC
This patch has been pushed to 16.11.x and will be in 16.11.02.
Comment 9 Mason James 2017-01-27 03:06:48 UTC
Pushed to 16.05.x, for 16.05.08 release