Fwd: [PATCH] This simple patch allows comments in the middle of a line.

Chris Down chris at chrisdown.name
Mon Jul 25 12:54:13 UTC 2022


Hi Fabiano,

Fabiano Furtado writes:
>From 4a87185f577d61f51c94e9b158d602460c795330 Mon Sep 17 00:00:00 2001
>From: Fabiano Furtado <fabianofurtado <at> gmail <dot> com>
>Date: Sun, 24 Jul 2022 16:44:31 -0300
>Subject: [PATCH] As described in
> https://archlinux.org/pacman/pacman.conf.5.html#_description, "Comments are

Fittingly, this URL shows why...

> only supported by beginning a line with the hash (#) symbol. Comments cannot
> begin in the middle of a line.". This patch allows comments in the middle of
> a line. Example: LogFile = /tmp/pacman.log#/var/log/pacman.log

...this should not be allowed, because octothorpes may be valid values in some 
fields.

In fact that's exactly why it was disallowed in commit 8a19c4a78251 ("ini: only 
recognize comments at beginning of line").

It might be ok to allow it only after whitespace, but since it's already caused 
problems I'd be inclined not to poke the bear again unless there's some 
compelling reason.

Thanks,

Chris


More information about the pacman-dev mailing list