[pacman-dev] [PATCH] makepkg: include all hash types in integlist
d at falconindy.com
Tue Sep 17 11:52:01 EDT 2013
On Tue, Sep 17, 2013 at 03:35:57PM +0000, Xyne wrote:
> On 2013-09-17 11:31 -0400
> Dave Reisner wrote:
> >On Tue, Sep 17, 2013 at 03:28:31PM +0000, Xyne wrote:
> >> Dave Reisner wrote:
> >> >This isn't the right fix. It should be:
> >> >
> >> > IFS=$'\n' read -rd '' -a integlist < <(get_integlist)
> >> >
> >> >> else
> >> >> integlist=("$@")
> >> >> fi
> >> Out of curiosity, what difference does it make? Is subshell invocation more
> >> expensive than file substitution?
> >It's a reliance on word expansion (and the side effects that potentially
> >come with it) versus just reading the data as is. Using read is about
> >being correct, not about cost.
> With IFS set to newline, there will be no unintentional word expansion in
> either case. The results are the same. I do not see how one approach is more
> correct than the other.
No, it isn't the same. The cases I'm referring to probably aren't
interesting for the purpose of reading checksum names, but glob
expansion happens when using direct assignment, and not when using read.
> Note that I have submitted a patch with your recommended fix (it's your code
> after all).
More information about the pacman-dev