[Koha-bugs] [Bug 32791] Log4perl configuration files need a tool for updating on package upgrade

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 10 00:29:54 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32791

--- Comment #7 from David Cook <dcook at prosentient.com.au> ---
(In reply to Jonathan Druart from comment #6)
> Please perltidy the new file ;)

I still can't get perltidy to work correctly in ktd. It creates code that
violates https://wiki.koha-community.org/wiki/Coding_Guidelines

¯\_(ツ)_/¯

That said, I see some obvious whitespace issues now outside vim...

--

> Should not we sort the file to ease comparison?
> 
> Should we deal with extra values (not existing in koha community config) or
> could we simply overwrite the file?

I think that would be a much heavier touch. 

But... I figure in 99% of cases no one customizes their log4perl file, so maybe
it does make sense to just overwrite it.

I'm thinking about ways where we could generate a new log4perl file, compare it
with the existing instance log4perl file, and then let sysadmins decide in the
same way they do for conffiles provided by the Debian package.

This is an interesting read:
https://wiki.debian.org/ConfigPackages

It might be worth looking more into the "ucf" utility.

Looking at foomatic-filters.postinst, I see the following line:

ucf --three-way --debconf-ok $tempfile $FILTERCONF

It seems to generate the new config, put it in a temporary file, and then test
that against $FILTERCONF which is /etc/foomatic/filter.conf.

In our case, we'd need to do it for every instance in "koha-list", but it could
be doable. 

Using "ucf" could be better than trying to re-invent the wheel.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list