Bug 10942: (follow-up) debconfing the update option
authorRobin Sheat <robin@catalyst.net.nz>
Wed, 12 Mar 2014 04:24:36 +0000 (17:24 +1300)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 24 Apr 2014 12:49:32 +0000 (12:49 +0000)
commitee4e4917eb3fad95680c63aee025a3e94ba898c0
treed6b0b92c703d7201b21b28a68c214059f7b931f3
parentacd8a10251da42d44c262cb63ee2b585352a860a
Bug 10942: (follow-up) debconfing the update option

This causes a question to be asked at installation time as to whether
translations should be updated or not. The answer is written to the
config file, and stored in debconf. Effort is taken to ensure that if
the admin changes the config file, the update will be picked up and
reflected in debconf (i.e. that the admin's decision is always the
correct one.)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixed two typos that made it fail and it worked like a charm.

Tested like this:

- Install the package
=> no errors, the file is created, defaults to 'yes'
- Install a language (koha-translate --install es-ES)
- Re-install the package (simulating an upgrade)
=> es-ES gets updated
- Set preference to 'no'
- Re-install
=> es-ES doesn't get updated, the warning is printed correctly
- Installed a second language (koha-translate --install pt-BR)
- did all the tests again
=> Success

Note: on master there are obvious template translation warnings.
A copy of the generated package can be grabbed from:
http://es.koha-community.org/koha-common_3.15+20140312172225.af7c0a23_all.deb

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
debian/koha-common.config
debian/koha-common.postinst
debian/koha-common.templates
debian/templates/koha-common.conf