Bug 17777 - koha-remove should deal with temporary uploads
Summary: koha-remove should deal with temporary uploads
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-14 15:51 UTC by Marcel de Rooy
Modified: 2017-02-14 11:39 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 17777: koha-remove should deal with temporary uploads (2.48 KB, patch)
2016-12-14 15:58 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17777: koha-remove should deal with temporary uploads (2.50 KB, patch)
2017-01-16 22:57 UTC, Karen
Details | Diff | Splinter Review
Bug 17777: koha-remove should deal with temporary uploads (2.57 KB, patch)
2017-01-17 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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