Bug 265851 - Repo2Runnable keeps handle on zip
Summary: Repo2Runnable keeps handle on zip
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks:
 
Reported: 2009-02-23 12:09 EST by Andrew Niefer CLA
Modified: 2009-04-23 21:49 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2009-02-23 12:09:23 EST
PDE.Build tests clean up after themselves, the test
org.eclipse.pde.build.tests/P2Tests.testBug265526_265524
is testing the Repo2Runnable support.  When this test finishes, the file
"junit-workspace\pde.build\265526\zipped\zipped repo.zip"
remains behind.

This file is deletable before invoking the Repo2Runnable task, but not after.

Somewhere in Repo2Runnable we are not closing a stream on this zip.  The 265526/zipped folder is being passed into Repo2Runnable as a source.
Comment 1 Matthew Piggott CLA 2009-04-23 09:42:04 EDT
The only way I've managed to replicate this is when specifying the repository using a fileset, if the repository is specified as a location using a URI this does not seem to occur.   Placing a breakpoint at the line the file is deleted and waiting for a few seconds before resuming allows the file to be properly deleted.

Clearing the list storing the FileSets immediately after the files are added to the repository list appears to fix the problem.  I'll add the fix to the patch in bug 265550.