| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Avoid duplicate file references in backend .pot file |
| Date: | 2026-11-08 08:28:47 |
| Message-ID: | f335df10-8392-4f66-984d-725df0fa366f@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 03.11.26 08:13, Chao Li wrote:
>> On Nov 2, 2026, at 18:35, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>>
>> The list of files for the backend's message catalog is collected with find, which also lists symlinks, namely the generated files that are linked from src/include/utils/ to src/backend/utils/ (such as guc_tables.inc.c) and the port/pg_sema.c and port/pg_shmem.c links created by configure. Since the link targets are found under their real names as well, xgettext processed those files twice, resulting in duplicate "#:" references like
>>
>> #: ../include/utils/guc_tables.inc.c:410 utils/guc_tables.inc.c:410
>>
>> This is an old problem, but the introduction of guc_tables.inc.c in PG19 has made it much more noticeable.
>>
>> I propose the attached patch to fix this by restricting find to regular files.
>> <0001-Avoid-duplicate-file-references-in-backend-.pot-file.patch>
>
> LGTM. I tested in this way:
committed
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Lakhin | 2026-11-08 10:00:00 | Re: Emptying oauth_validator_libraries doesn't stop OAuth logins |
| Previous Message | Andrey Borodin | 2026-11-08 07:49:50 | Re: Compression of bigger WAL records |