Bug 25524: Remove --line-regexp option in log4perl_component()
authorDavid Cook <dcook@prosentient.com.au>
Mon, 18 May 2020 07:08:18 +0000 (07:08 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 20 May 2020 08:14:06 +0000 (09:14 +0100)
commitc6ed5b5da125347ef95ae439eaf21858410f7edf
tree025308fb07b0269a45d1b952b93c57acf912b00c
parentf8f890621e8ce99c36f4117eb018bbb3ec3da960
Bug 25524: Remove --line-regexp option in log4perl_component()

The current grep expression uses -x|--line-regexp, but that causes
the regexp to fail to match since we're not specifying a regexp
that can match a whole line. We can either provide a better regexp,
or remove that --line-regexp option.

This patch removes the --line-regexp (ie -x) option from the grep
in log4perl_component, so that it detects logger components correctly.

To Test:
0) Apply patch
1) Build Koha package
2) Look at /etc/koha/sites/kohadev/log4perl.conf in an existing
Koha instance (e.g. on koha-testing-docker), and note it has
components for z3950, api, and sip
3) Install package
4) Note that /etc/koha/sites/kohadev/log4perl.conf is the same as before
5) Remove the "log4perl.logger.sip and log4perl.appender.SIP lines from
/etc/koha/sites/kohadev/log4perl.conf
6) Reinstall package
7) Note that the missing lines have been appended to the file at
/etc/koha/sites/kohadev/log4perl.conf

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
debian/koha-common.postinst