Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   Fwd: PATCH: fixed set -e hack in makepkg (http://www.linux-archive.org/archlinux-pacman-development/549641-fwd-patch-fixed-set-e-hack-makepkg.html)

DJ Mills 07-08-2011 02:13 AM

Fwd: PATCH: fixed set -e hack in makepkg
 
Instead of using || echo, which IMO is a silly hack, the only proper
way to check the
exit status of a command substitution is:

if ! var=$(command); then
* commands
fi

This patch changes that in makepkg, and gets rid of a pre-optimization
that served
no purpose in in_array().

Thanks.

Dan McGee 07-08-2011 02:47 AM

Fwd: PATCH: fixed set -e hack in makepkg
 
On Thu, Jul 7, 2011 at 9:13 PM, DJ Mills <danielmills1@gmail.com> wrote:
> Instead of using || echo, which IMO is a silly hack, the only proper
> way to check the
> exit status of a command substitution is:
>
> if ! var=$(command); then
> * commands
> fi

Why isn't this in the commit message?

Please read HACKING
(http://www.archlinux.org/pacman/submitting-patches.html), send
patches inline, and include a signoff. Thanks!


> This patch changes that in makepkg, and gets rid of a pre-optimization
> that served
> no purpose in in_array().
>
> Thanks.
>
>
>
>


All times are GMT. The time now is 10:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.