Bug 7924 - Fix handling of command line arguments in koha-remove
Summary: Fix handling of command line arguments in koha-remove
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.8
Hardware: PC Linux
: P1 - high critical (vote)
Assignee: Magnus Enger
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks: 6684
  Show dependency treegraph
 
Reported: 2012-04-09 00:32 UTC by Scott Turner
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
koha-remove change I used as a workaround (521 bytes, patch)
2012-04-09 00:32 UTC, Scott Turner
Details | Diff | Splinter Review
Bug 7924 - Fix handling of command line arguments in koha-remove (1.51 KB, patch)
2012-04-30 11:54 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 7924 - Fix handling of command line arguments in koha-remove (1.58 KB, patch)
2012-05-08 13:47 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Turner 2012-04-09 00:32:24 UTC Comment hidden (obsolete)
Comment 1 Katrin Fischer 2012-04-14 13:31:32 UTC
Adding Robin (package maintainer) in CC.
Comment 2 Robin Sheat 2012-04-15 02:40:06 UTC
That's strange that the set would corrupt that. Off the top of my head, I'm not sure what would be going on there.
Comment 3 Magnus Enger 2012-04-30 11:54:05 UTC Comment hidden (obsolete)
Comment 4 Jared Camins-Esakov 2012-05-08 13:47:41 UTC
Created attachment 9456 [details] [review]
Bug 7924 - Fix handling of command line arguments in koha-remove

koha-remove would fail with a message like this:
Removing Koha instance --
ERROR 1396 (HY000) at line 1: Operation DROP USER failed for 'koha_--'@'%'

After fixing this, the --keep-mysql option made the script exit without doing
anything.

To test:

Alt 1
- Build package with build-git-snapshot
- Install package

Alt 2
- Replicate the changes in the patch in an existing installation

Then:
- Add instance1 and instance2
- koha-remove instance1
-- Check that script completes and the databse is gone
- koha-remove --keep-mysql instance2
-- Check that the script completes but the database is not removed

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Comment 5 Jared Camins-Esakov 2012-05-09 16:54:35 UTC
This bug will be included in the Koha 3.6.5 release. Incorporated into stable prior to inclusion in master because the patch is required for the release process.
Comment 6 Chris Cormack 2012-05-09 19:58:34 UTC
Can we get this through qa please it is needed for the 3.8.1 releaae
Comment 7 Ian Walls 2012-05-10 16:15:23 UTC
Only affects packages, and the changes look simple enough:  add an eval, then move the exit line separate from the mysql command.

Marking Passed QA.
Comment 8 Chris Cormack 2012-05-14 20:40:25 UTC
This fix will be in 3.8.1