Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] Reproducible version qualifier without Git-based timestamp



On 2013-09-02 3:35 AM, Mickael Istria wrote:
Hi Igor,

On 08/30/2013 07:27 PM, Igor Fedorenko wrote:
In short, comparing two bundles ignoring version qualifier is a very
hard problem. You can read longer discussion that went through several
alternatives, including one you suggest, in bugzilla
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367581

Thanks for this interesting link. I've gone through the discussion, and
I have additional questions for which one you might already have
answers. For some background, our use-case will probably not use
timestamps based on last Git commit. We use Eclipse-SourceReferences to
track "Where does this bundle come from" (cf Paul comment #10), and we
find it comfortable to use manually managed or build-time based
timestamps (and overall to reduce the criticity of choosing the right
qualifier).
So given those differences between our use-case and Platform build, I
still feel that the compare-ignoring-qualifier approach would fit pretty
well. So here are my additional questions with my current understanding
on these issues.

= What's the difficulty in comparing bundles with different qualifiers?
The MANIFEST.MF requires a "deep" comparison (we can't check only the
file signature) which would read the version and compare the 3 first
segments only. Also it would require to skip the comparison of the
signature for MANIFEST.MF file I guess. But all other files could be
compared just by their signature.
This seems possible to implement in a comparator. Am I missing another
difficulty?


Qualifier can be embedded in various resources, including class files.
Comparison logic will have to be able detect and ignore such differences.

= What about p2 metadata?
This question is more specific to the
tycho-packaging-plugin/tycho-p2-plugin. Does the replacement of
just-built bundle by the baseline version also comsume p2 metadata from
baseline? If yes, I guess those p2 metadata would need to be compared as
well, in case the newer build has same content, but different metadata.

I am not sure. I think logically P2 metadata is always derived from an
artifact, so it should be sufficient to compare the artifacts.


= About the bigger picture
Let's say I go for such an implementation, is the integration in Tycho
just a matter of implementing an extension for the tycho-p2-plugin? Is
it easy to plug a different comparator in Tycho?

Artifact comparison logic is not pluggable but should it be fairly
straightforward to make an extension point. Make sure the current
behaviour remains to be the default.

--
Regards,
Igor


Back to the top