Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-2346

Do not use gradle delete() for sources and build directories

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: build
    • Labels:
      None

      Description

      I was asking myself why sometimes the hue build fails with

      /v/output/hue/hue-3.9.0/Makefile.vars:42: *** "Error: must have python development packages for 2.6 or 2.7. Could not find Python.h. Please install python2.6-devel or python2.7-devel".  Stop.
      

      This is happening because the python virtualenv created by the hue build contains a symbolic link to /usr/include/python2.7.

      gradles delete() on the output directory follows the symlink and removes everything under /usr/include/python2.7 .

      See https://issues.gradle.org/browse/GRADLE-2892 and https://discuss.gradle.org/t/delete-on-directory-with-symlinks-considered-harmful/14705

      Work around is to avoid delete() where symlinks can happen.

        Activity

        Show
        oflebbe Olaf Flebbe added a comment - For instance a failed build with this error: https://ci.bigtop.apache.org/job/Bigtop-1.1.0-ppc64le/BUILD_ENVIRONMENTS%3Dubuntu-15.04-ppc64le,label=ppc64le-slave/11/console
        Hide
        oflebbe Olaf Flebbe added a comment -

        The patch is to implement a safeDelete() method using rm -rf

        Show
        oflebbe Olaf Flebbe added a comment - The patch is to implement a safeDelete() method using rm -rf
        Hide
        oflebbe Olaf Flebbe added a comment -

        committed

        Show
        oflebbe Olaf Flebbe added a comment - committed
        Hide
        cos Konstantin Boudnik added a comment -

        Great catch!

        Show
        cos Konstantin Boudnik added a comment - Great catch!

          People

          • Assignee:
            oflebbe Olaf Flebbe
            Reporter:
            oflebbe Olaf Flebbe
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development