[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] No available updates

Hi,

 

I am using P2 to update an installed product.  I can list available IUs in my update site and see that newer versions of my product features and plug-ins are available.  However, when I call the resolveModal method -- via the resolveUpdate method in the snippet below -- I am returned no available updates.

 

Here is console output of my query of the update site and a query of IUs running in my app’s profile.  I have listed a subset of IUs below in the interest of brevity.

 

Available IUs from the update site:

       IU id=Default version=1.0.0.2-1cJTHhl773573E5K5I7A

       IU id=ch.qos.logback.classic version=1.0.0

       IU id=ch.qos.logback.core version=1.0.0

       IU id=app version=1.0.1

       IU id=app.feature.feature.group version=1.0.1.201206191824

       IU id=app.feature.feature.jar version=1.0.1.201206191824

 

Currently installed IUs:

       IU id=a.jre.javase version=1.6.0

       IU id=ch.qos.logback.classic version=1.0.3

       IU id=ch.qos.logback.core version=1.0.3

       IU id=app version=1.0.0

       IU id=app.feature.feature.group version=1.0.0.201206261438-5--cJTNnw623hMcAuz096AeLVSV1

       IU id=app.feature.feature.jar version=1.0.0.201206261438-5--cJTNnw623hMcAuz096AeLVSV1

 

And below is the code snippet I am executing.  I always fall into the first if condition.

 

ProvisioningSession session = new ProvisioningSession(app);

Collection<IInstallableUnit> iusToUpdate = getAvailableUnits();

UpdateOperation operation = newUpdateOperation(session, iusToUpdate);

IStatus status = resolveUpdate(operation);

message = "Update resolution completed, status follows"; //$NON-NLS-1$

_log.debug(message);

Results results = statusToResults(status);

if (results.getSubstatus() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {

       return results;

}

if (results.getStatus() == Results.CANCEL) {

       throw new OperationCanceledException();

}

if (results.getStatus() == Results.ERROR) {

       return results;

}

 

And this is what I get back in my status object.

 

Status = 1, Substatus = 10000, Message = 'No updates were found.', Exception = null : ''

 

Any assistance or pointers are appreciated.

 

Cheers,

-Jason