Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 307580 - [native] Add support for include/exclude patterns in unzip action
Summary: [native] Add support for include/exclude patterns in unzip action
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: Juno M7   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 57349
  Show dependency tree
 
Reported: 2010-03-30 16:39 EDT by Alin Dreghiciu CLA
Modified: 2012-04-27 22:23 EDT (History)
2 users (show)

See Also:


Attachments
Proposed patch & unit tests (16.71 KB, patch)
2010-03-30 19:40 EDT, Alin Dreghiciu CLA
no flags Details | Diff
Second proposed patch & unit tests (19.57 KB, patch)
2010-03-31 01:19 EDT, Alin Dreghiciu CLA
no flags Details | Diff
Zip used in tests (540 bytes, application/zip)
2010-04-04 23:18 EDT, Alin Dreghiciu CLA
no flags Details
Third proposed patch & unit tests (18.72 KB, patch)
2010-11-22 05:30 EST, Alin Dreghiciu CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alin Dreghiciu CLA 2010-03-30 16:39:53 EDT
Build Identifier: 

In my use cases I must be able to unzip only some directories from a zip archive and sometime unzip parts of a zip to different directories.

This would be possible to do if unzip action would support include/exclude patters to be specified. The patterns should be ANT style (http://ant.apache.org/manual/dirtasks.html) so we reuse a known format.

This include/exclude params should be optional and in case none present unzip action should behave as currently does.


Reproducible: Always
Comment 1 Alin Dreghiciu CLA 2010-03-30 19:40:06 EDT
Created attachment 163464 [details]
Proposed patch & unit tests

The patch makes possible to specify additional two optional include/exclude patterns, to be matched agains the paths in unzipped archive. The included unit tests show how this can be used.

The patch file also contains a zip. How it works well when the patch is applied. It worked for me.
Comment 2 Alin Dreghiciu CLA 2010-03-31 01:19:39 EDT
Created attachment 163476 [details]
Second proposed patch & unit tests

The new patch includes the solution as in previous patch and also solves bug #307601 as I consider them related (and easier to apply).
Comment 3 Alin Dreghiciu CLA 2010-04-04 23:18:43 EDT
Created attachment 163789 [details]
Zip used in tests

Attached also the zip used in tests.
Comment 4 Alin Dreghiciu CLA 2010-11-22 05:30:41 EST
Created attachment 183557 [details]
Third proposed patch & unit tests

Third patch that allows include/exclude patterns to have multiple entries separated by space.
Comment 5 Thomas Watson CLA 2011-06-08 11:31:04 EDT
Move all 3.8 bugs to Juno.
Comment 6 Pascal Rapicault CLA 2012-04-27 22:23:12 EDT
Patch released. Thx.