[ 
https://issues.apache.org/jira/browse/HADOOP-12662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15067051#comment-15067051
 ] 

Colin Patrick McCabe commented on HADOOP-12662:
-----------------------------------------------

I think this change makes sense.  If bundling can't be done, and we requested 
it, the build should fail rather than silently creating something that isn't 
what we wanted (or even noisily... lets be honest, nobody is going to read the 
maven spew).

One thing that is kind of annoying is that if the {{tar | untar}} pipeline 
fails, we continue on our merry way.  For example, if the target directory runs 
out of disk space or the tar command is not executable, we'd silently create a 
partial build here.

Unfortunately, checking the error statuses of commands in a shell pipeline is 
very difficult to do in a portable way.

In bash, you could do something like this to capture the exit status of tar and 
untar:
{code}
( set -o pipefail; tar | untar ); STATUS=$?
{code}

Do these install scripts require bash?  If so, that would be a good way of 
making sure that we fail the build if tar or untar fails.

> The build should fail if a -Dbundle option fails
> ------------------------------------------------
>
>                 Key: HADOOP-12662
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12662
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Kai Zheng
>            Assignee: Kai Zheng
>         Attachments: HADOOP-12662-v1.patch, HADOOP-12662-v2.patch
>
>
> Per some discussion with [~cmccabe], it would be good to refine and make it 
> consistent the behaviors in bundling native libraries when building dist 
> package.
> For all native libraries to bundle, if the bundling option like 
> {{-Dbundle.snappy}} is specified, then the lib option like {{-Dsnappy.lib}} 
> will be checked and ensured to be there, but if not, it will then report 
> error and fail the building explicitly.
> {{BUILDING.txt}} would also be updated to explicitly state this behavior.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to