[pacman-dev] Fwd: [PATCH] repo-add: fix eval and quote issues
Allan McRae
allan at archlinux.org
Mon Feb 9 19:01:30 EST 2009
Kevin Barry wrote:
> Sorry I'm coming into the conversation late (Just joined the
> listserv). I believe this is about where repo-add does the bsdtar then
> grep/sed then evals each line. If someone is about to make a change
> there, could the sed also be changed? Mac OS X's sed doesn't work with
> \s, so it should be replaced with this:
>
> for line in $(bsdtar -xOf "$pkgfile" .PKGINFO | \
> - grep -v "^#" | sed 's|\(\w*\)\s*=\s*\(.*\)|\1="\2"|'); do
> + grep -v "^#" | sed 's|\(\w*\)[ \t]*=[ \t]*\(.*\)|\1="\2"|'); do
> eval "$line"
>
> I have some other patches too that I'll be submitting after I get git
> setup, so if this is skipped now that's fine.
>
>
If you have a bunch of Mac OSX compatibility patches, then it would
probably be better to address those in the one place and leave this
patch doing its fix.
Allan
More information about the pacman-dev
mailing list