Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-1254

Simplify narayana.sh by removing ability to have empty IPV6_OPTS

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 4.17.0, 5.0.0.M2
    • Component/s: None
    • Labels:
      None

      Description

      We currently use [ -z "${VAR+c}" ] notation to detect if a variable has been set, allowing for it being set to the empty string. Here's an example:

        # if IPV6_OPTS is not set get the jdbc drivers (we do not run the jdbc tests in IPv6 mode)
        [ -z "${IPV6_OPTS+x}" ] && ant -DisIdlj=$IDLJ "$QA_BUILD_ARGS" get.drivers dist ||
          ant -DisIdlj=$IDLJ "$QA_BUILD_ARGS" dist
      

      The problem with this approach is that it's rather cryptic to understand what's going on. This makes it hard to read and easy to create a bug. We've had two bugs so far, due to this syntax.

      By removing the ability to "export IPV6_OPTS=", we can simplify these portions of the script to look like:

      if [ "${IPV6_OPTS}" = "" ]; then
      	ant -DisIdlj=$IDLJ "$QA_BUILD_ARGS" get.drivers dist
      else
      	ant -DisIdlj=$IDLJ "$QA_BUILD_ARGS" dist
      fi
      

      Which is a lot easier to read and much less error-prone.

      Should we ever need to enable IPv6 without setting any IPv6 options, we could either re-instate the old code, or set a dummy option.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                paul.robinson Paul Robinson
                Reporter:
                paul.robinson Paul Robinson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: