[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-dev] Duplicate bundle versions with different checksums

Hi,

I just stumbled over an odd which I would like to understand better.

When creating a composite P2 repository (with Package Drone) out of
different P2 XML Fragments for Eclipse SCADA/openSCADA build artifacts
(same for other builds artifacts) I got a "MD5 hash is not as expected"
error when using P2 to access the repository.

Now this is simply caused by the fact that there are two full builds in
the same channel, providing OSGI bundles built by Maven Tycho, which
have the same bundle ID and the same version, but different content.

The duplicate bundles are not in the same build, but in two successive
builds! With no apparent change in the SCM (git).

Tycho is configured to provide build timestamps using the jgit plugin.

---
        <tycho-version>0.21.0</tycho-version>
        <tycho-extras-version>0.21.0</tycho-extras-version>
---
            <!-- build qualifier -->
            <plugin>
               
<groupId>org.eclipse.tycho</groupId><artifactId>tycho-packaging-plugin</artifactId><version>${tycho-version}</version>
                <dependencies>
                    <dependency>
                       
<groupId>org.eclipse.tycho.extras</groupId><artifactId>tycho-buildtimestamp-jgit</artifactId><version>${tycho-extras-version}</version>
                    </dependency>
                    <dependency>
                       
<groupId>org.eclipse.tycho.extras</groupId><artifactId>tycho-sourceref-jgit</artifactId><version>${tycho-extras-version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <timestampProvider>jgit</timestampProvider>
                    <jgit.ignore>
                        pom.xml
                        CHANGES.txt
                    </jgit.ignore>
                    <format>'v'yyyyMMdd-HHmm</format>
                    <sourceReferences>
                        <generate>true</generate>
                    </sourceReferences>
                </configuration>
            </plugin>
---

Now the actual change in the bundles is the line
"Eclipse-SourceReferences" which is:

    Eclipse-SourceReferences:
scm:git:git://git.openscada.org/org.openscada.atlantis.git;path="org.openscada.da.server.opc.edit";commitId=7bdba134ffa8e1b936a9f8689a6e4cb9451ef98c

and for the second

    Eclipse-SourceReferences:
scm:git:git://git.openscada.org/org.openscada.atlantis.git;path="org.openscada.da.server.opc.edit";commitId=83b5554178acfa8979ab6393cdb5fb1eeeb79017

resulting in the same version:

    Bundle-Version: 1.2.0.v20141105-0956

Now I would expect that a different MANIFEST.MF also produces a
different version?!

Thanks for helping

Jens