iconvconfig: Fix behaviour with --prefix [BZ #28199]
commit43cea6d5652b6b9e61ac6ecc69419c909b504f47
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 13 Sep 2021 15:18:35 +0000 (13 20:48 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 13 Sep 2021 15:18:35 +0000 (13 20:48 +0530)
tree2c1b75d47a59bf6a789c6c83b0970b9fe439c136
parent526c3cf11ee9367344b6b15d669e4c3cb461a2be
iconvconfig: Fix behaviour with --prefix [BZ #28199]

The consolidation of configuration parsing broke behaviour with
--prefix, where the prefix bled into the modules cache.  Accept a
prefix which, when non-NULL, is prepended to the path when looking for
configuration files but only the original directory is added to the
modules cache.

This has no effect on the codegen of gconv_conf since it passes NULL.

Reported-by: Patrick McCarty <patrick.mccarty@intel.com>
Reported-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
iconv/gconv_conf.c
iconv/gconv_parseconfdir.h
iconv/iconvconfig.c