Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-264

Passing a prefix directory to configure that is unwritable removes the current directory.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 1.0.1
    • 1.0.0
    • Build System
    • None
    • 37a51d69ef010b8ecd49b2dad3fa0c897b9baf30

      If you pass a prefix directory to configure, and the directory exists but is not writable, the current directory is removed by configure.

      This is because of this type of logic:

      #process PREFIX
      if [ -d "$QT_MOBILITY_PREFIX" ]; then
      QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET`
      else
      mkdir -p "$QT_MOBILITY_PREFIX"
      QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET`
      rm -rf "$QT_MOBILITY_PREFIX"
      fi
      echo "QT_MOBILITY_PREFIX = $QT_MOBILITY_PREFIX" >> "$CONFIG_IN"

      #process include path
      if [ -z "$QT_MOBILITY_INCLUDE" ]; then
      QT_MOBILITY_INCLUDE="$QT_MOBILITY_PREFIX/include"
      elif [ -d "$QT_MOBILITY_INCLUDE" ]; then
      QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET`
      else
      mkdir -p "$QT_MOBILITY_INCLUDE"
      QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET`
      rm -rf "$QT_MOBILITY_INCLUDE"
      fi

      The second part (around QT_MOBILITY_INCLUDE) means that it tries to create a directory in a read only location (which fails, but isn't checked). Then the absPath function attempts to change to that directory, and returns the output of 'pwd'. Since the dir doesn't exist, it returns the current directory, and then that gets removed.

      The mkdir should be checked, at least.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            alex Alex (closed Nokia identity) (Inactive)
            mgoddard Michael Goddard (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes