Search code examples
eclipsemaveneclipse-rcptychop2

How to make Eclipse RCP does not detect updates when only qualifier changed


I'm configuring the self-update mechanism for an Eclipse RCP application. All is working like a charm excepting one point, here is the implemented flow:

  1. Maven/Tycho generate the product and its p2 repository
  2. This repo is copied/declared into a -public- composite repository
  3. Update is detected and raised to user (of course in products installed from a previous build)

Fine ! But...

As the build rebuilds everything features which did not changed are published into the repository with a new qualifier, and marked to be updated :-(

Thing that I definitely want to avoid.

Reading this Wiki Page I thought to have found the solution by using the validate attribute of p2.composite.repository but it does not do the job. Here is my ant task:

   <target name="add">
     <p2.composite.repository validate="org.eclipse.equinox.p2.repository.tools.jar.comparator">
     <!--
          also tried with the other comparatorid
     <p2.composite.repository validate="org.eclipse.equinox.artifact.md5.comparator">
     -->
       <repository location="file:/local/www/productname/releases" 
                   name="Product Repository" compressed="false" append="true"/>
       <add>
         <repository location="http://localhost/productname/releases/1.0.0"/>
         <repository location="http://localhost/productname/releases/1.0.1"/>
       </add>
     </p2.composite.repository>
   </target>

All features from 1.0.1 are set to be updated even if just 2 of them contain changes and have their major.minor.service increased.

Thanks by advance for suggestions.


Solution

  • Reading this Wiki Page I thought to have found the solution by using the validate attribute of p2.composite.repository but it does not do the job.

    I don't think this problem should be solved at the composite-repository level. Instead, the leaf repository should not contain changed qualifiers if the features didn’t change.

    This is exactly what Tycho’s Reproducible Version Qualifiers are for. Provided your code resides in a Git repository, they synchronize the qualifier with the latest commit’s timestamp.