Bug 12584

Summary: koha-conf.xml for package installations get out of sync
Product: Koha Reporter: Magnus Enger <magnus>
Component: PackagingAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook, jonathan.druart, martin.renvoize, mtompset, robin, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13396
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Magnus Enger 2014-07-16 13:19:55 UTC
koha-conf.xml files for instances created with the Debian packages are never updated/upgraded when the packages are updated. This results in lots of missing stuff in the config files over time. This seems to be the root of the problems I have reported in bug 12577. As an example an old instance has 21 lines i the <config> section, while a fresh instance has 30. 

Perhaps there could be a script that can
- read an existing koha-conf.xml (and back it up)
- generate a new file with the old values + placeholders or default values (or interactive questions?) for any missing values
Comment 1 Magnus Enger 2014-07-16 18:42:55 UTC
*** Bug 12577 has been marked as a duplicate of this bug. ***
Comment 2 Mark Tompsett 2014-07-16 21:59:16 UTC
The difficulty is knowing if things were added in a new version, pruned from the current version, or manually added to configure a particular feature.
Comment 3 Magnus Enger 2014-07-30 19:14:47 UTC
Here's a quick and dirty script to update instances one by one, based on template config files. It might work for you if your configs are more or less identical except for instance names and passwords, and not full of per-instance tweaks:
https://github.com/MagnusEnger/fix-koha-conf/
Please read the README (and the code) carefully before trying this!
Comment 4 Tomás Cohen Arazi 2014-12-11 09:10:22 UTC
(In reply to M. Tompsett from comment #2)
> The difficulty is knowing if things were added in a new version, pruned from
> the current version, or manually added to configure a particular feature.

That's an example of why we should use the about page. W need to tell users to check there for info on possible problems.
Comment 5 Martin Renvoize 2014-12-11 10:31:24 UTC
Is there not a debconf option we can use here.. I suppose because it's a per instance thing that may be challenging..
Comment 6 Martin Renvoize 2016-08-15 22:05:41 UTC
Had it result been that long I've been out of the loop.. Did we ever f in nd the right deacons option..  Wondering if lars can point us in the right direction if this isn't already fixed?
Comment 7 Tomás Cohen Arazi 2016-08-15 23:11:26 UTC
(In reply to Martin Renvoize from comment #6)
> Had it result been that long I've been out of the loop.. Did we ever f in nd
> the right deacons option..  Wondering if lars can point us in the right
> direction if this isn't already fixed?

I'm working on a rewrite of the instance handling code, that will move this to another file. We could discuss this on a dev meeting, or in Marseille. Better earlier.
Comment 9 David Cook 2022-12-06 03:07:11 UTC

*** This bug has been marked as a duplicate of bug 22857 ***