Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357492

Summary: Provide artifact repository access without need to know IArtifactDescriptor
Product: [Eclipse Project] Equinox Reporter: Tobias Oberlies <t-oberlies>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.8.0 Juno   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Tobias Oberlies CLA 2011-09-13 09:56:42 EDT
The IArtifactRepository interface is quite low-level: With IArtifactDescriptor exposed, one needs to be aware of (and able to handle correctly) the different properties and processing steps associated to an IArtifactDescriptor. This missing isolation leads to bugs and code smells. Examples:
- bug 271707
- org.eclipse.equinox.p2.publisher.AbstractPublisherAction.createPack200ArtifactDescriptor -> why does the publisher need know how to extract pack200 artifacts

There should be an interface (or possibly two for read-only and read/write) which make the most common artifact repository operations possible without knowing IArtifactDescriptor:
- Retrieve a canonical artifact
- Add a canonical artifact
- Add an artifact in non-canonical form (to support pack200 files; optional method)

The default implementation of these interfaces would simply wrap an IArtifactRepository. There could be different implementations with different policies:
- MD5 sum computation on addition
- MD5 sum verification on retrieval
- Ranking between artifact forms, etc.
Currently all these policies are already implemented - somewhere. IMHO we really would as little references to IArtifactDescriptor as possible.
Comment 1 Lars Vogel CLA 2019-11-14 03:50:00 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.