Don't trim whitespace when reading database entries
commitcbaff216b3eca57b4fd717da53f43a6713722e95
authorDan McGee <dan@archlinux.org>
Fri, 29 Jul 2011 23:49:38 +0000 (29 18:49 -0500)
committerDan McGee <dan@archlinux.org>
Tue, 2 Aug 2011 12:20:34 +0000 (2 08:20 -0400)
tree1ef21cb061959410a827c3123ca0e7a28f7610a6
parent573260556db49c62f5cf751f53812b7e06c1decb
Don't trim whitespace when reading database entries

We don't write with extra or unknown whitespace, so there is little
reason for us to trim it when reading either. This also fixes the
hopefully never encountered "paths that start or end with spaces" issue,
for which two pactests have been added. The tests also contain other
evil characters that we have encountered before and handle just fine,
but it doesn't hurt to ensure we don't break such support in the future.

Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/be_local.c
lib/libalpm/be_package.c
lib/libalpm/be_sync.c
lib/libalpm/util.c
lib/libalpm/util.h
test/pacman/pmrule.py
test/pacman/tests/remove071.py [new file with mode: 0644]
test/pacman/tests/sync600.py [new file with mode: 0644]