[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] How to build an update site for a product?
- From: Brian de Alwis <briandealwis@xxxxxxxxx>
- Date: Fri, 15 Oct 2010 22:00:14 -0400
- Delivered-to: email@example.com
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=W53UCsTzAVUwvM4kI3QakJlHkt8xW9HS9bAeHYya2koo463QURduzVvSomQMYE4ldH Hz/9bjF73xdojmonCupM/asXiEu4YYJ5OizgjsQTnEDZrSm+xTf+dAX9yKDchXHIYpno R6SnL4+qyNv6mURi29APYmpmDoZOOiqOETGzY=
I hoped some p2 experts might be able to answer this still-unanswered part of Samuel's question:
On Thu, Sep 9, 2010 at 8:39 AM, Samuel Wu <samuelwu@xxxxxxxxxx> wrote:
> [...] what are you going to do if you find you need to ship a
> new osgi runtime or webserver? Although the product package works as a stub
> and its size is small, it still has the chance to be updated. My question
> is how you are going to ship that update to the product. It's more
> important in your case because your customer has to pick up the product as
> a stub and reinstall the real features after the product update.
I've been playing around with shipping a small headless product that does nothing but replaces itself with a different product. I have a similar concern as I too would like to ship Equinox updates along with my app.
In my case, I'm using the lower-level org.eclipse.equinox.p2.planner.IProfileChangeRequest-based operations rather than the org.eclipse.equinox.p2.operations.ProfileChangeOperation-based operations so that I can perform IU removals with IU additions/updates in one fell swoop. I've got this working well now. But during my testing I made a mistake in having the replacement product specify a different version of the system bundle (org.eclipse.osgi). Installing this product and thenapplying the change with org.eclipse.equinox.internal.provisional.configurator.Configurator#applyConfiguration() led to an IllegalStateException:
java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
How do I cause a restart? Is there a generally accepted mechanism in OSGi, or is calling org.osgi.service.packageadmin.PackageAdmin#refreshPackages(null) sufficient?