Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12845

local_manifest.xml not deleted when clearing the local manifest configuration of a job

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • repo-plugin
    • None

      Reproduce problem:
      1. Make a job using repo scm plugin.
      2. Create a local manifest in the job
      3. Execute job and wait for finish
      4. Clear the local manifest for the job
      5. Execute job again

      Error:
      The local manifest is not removed. In the workspace/.repo/ there is a local_manifest.xml still present.

      Expected result:
      The local_manifest.xml should be deleted when the job is run with a empty local_manifest.xml box

      Workaround:
      Delete local_manifest.xml manually in the workspace after clearing the local manifest box in the job configuration.

          [JENKINS-12845] local_manifest.xml not deleted when clearing the local manifest configuration of a job

          Joe Hansche added a comment -

          It looks like this should already happen (delete the file if localManifest is empty):

                                  FilePath rdir = workspace.child(".repo");
                                  FilePath lm = rdir.child("local_manifest.xml");
                                  if (localManifest != null) {
                                          lm.write(localManifest, null);
                                  } else {
                                          lm.delete();
                                  }
          

          Joe Hansche added a comment - It looks like this should already happen (delete the file if localManifest is empty): FilePath rdir = workspace.child( ".repo" ); FilePath lm = rdir.child( "local_manifest.xml" ); if (localManifest != null ) { lm.write(localManifest, null ); } else { lm.delete(); }

            Unassigned Unassigned
            bjarkef Bjarke Freund-Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: