Allow comments after repo section header in pacman.conf
commitd95c04945fc85bcc584026f7fded57dc8724ba6a
authorAllan McRae <allan@archlinux.org>
Thu, 22 Dec 2011 07:46:47 +0000 (22 17:46 +1000)
committerDan McGee <dan@archlinux.org>
Fri, 23 Dec 2011 20:36:25 +0000 (23 14:36 -0600)
tree0c7b56c7164d37465406a4f8cddd70717e28d2c6
parent67290441b80fa813a472767353095425c78805af
Allow comments after repo section header in pacman.conf

Pacman assumes that the final character of a line specifing a repo
in pacman.conf is a "]".  But it did not clean whitespace from the
line after removing any comments.  So lines like:

[allanbrokeit]  # could break system

caused pacman not to recognize the repo.  Adjust config parsing to
strip comments before trimming whitespace from the end of the string.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
src/pacman/conf.c