Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-630

Renaming an artifact makes the build fail if its new name contains a directory component that matches its old name or vice versa

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • 1.3.0
    • 1.3.0
    • General
    • None
    • e655304fed77ad45cb083a4f62ba308d734025a3

      For instance:

      import qbs
      import qbs.TextFile
      
      Product {
          type: "custom"
          Transformer {
              Artifact {
                  fileTags: "custom"
                  fileName: "x"
              }
              prepare: {
                  var cmd = new JavaScriptCommand();
                  cmd.description = "creating file";
                  cmd.sourceCode = function() {
                      var f = new TextFile(output.filePath, TextFile.WriteOnly);
                      f.close();
                  }
                  return cmd;
              }
          }
      }
      

      Build this. Now change the file name from "x" to "x/y" and build again. qbs says:

      ERROR: Failed to create directory '/tmp/file-then-dir/Host-Qt5-stable-debug/project/x'
      

      This is because the file for the old artifact is still there. Perhaps this is due to us delaying the removal because of artifact rescuing? If so, then solving this would get tricky.

        For Gerrit Dashboard: QBS-630
        # Subject Branch Project Status CR V

            kandeler Christian Kandeler
            kandeler Christian Kandeler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes