[pacman-dev] [PATCH] Make strip paths configurable

Thomas Bächler thomas at archlinux.org
Tue Jul 1 15:59:20 EDT 2008


Dan McGee schrieb:
>>> This breaks what was fixed here; you'll need to resubmit with that in
>>> mind:
>>>
>>> http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=27943a04d6dd135628c2313525ebffbcd76cc514
> 
> The bash {} expansion was causing some problems I believe, otherwise
> I'm not completely sure why I would have changed that. The referenced
> patch definitely made that change, I wish I would have documented
> better why...

I thought the problem was 'for i in $(find ....)' vs. 'find .... | while 
read line'. find will display one file per line. The 'for' loop will 
iterate over the words, not the lines, thus whitespace in filenames will 
break. The 'read' will always read a line and treat it as one word, 
ignoring whitespace.

The bash expansion on the find commandline will quote everything 
properly, so the find command will have all the paths.

Thus, I think the patch is correct.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20080701/4c4c7941/attachment.pgp>


More information about the pacman-dev mailing list