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

Allen Wittenauer commented on HADOOP-12662:
-------------------------------------------

* If this is being switched to bash, then it should be using double brackets 
([[) instead of single brackets ([) for tests.  It will also make constructions 
like this:

{code}
+                        if [ X"${bundle.snappy.in.bin}" = X"true" ] ; then
{code}

significantly less painful since the X is no longer needed.

* This is not now bash works.

{code}
+                        set -o pipefail; $$TAR * | (cd $${TARGET_BIN_DIR}/; 
$$UNTAR)
...
+                            set -o pipefail; $$TAR *snappy* | (cd 
$${TARGET_BIN_DIR}/; $$UNTAR)
...
+                        set -o pipefail; $$TAR * | (cd $${TARGET_BIN_DIR}/; 
$$UNTAR)
{code}

Once you set a bash option, it's set for the rest of the execution.  So doing 
this in the middle is a debugging nightmare since the code will need to be 
traced to determine when pipefail was set.  So you either need to not set it at 
all, set it at the beginning, or immediately unset it after you don't need it 
anymore.



> 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, 
> HADOOP-12662-v3.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