Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » equinox repository prefs are not installed(Trying to pre-define available p2 sites does not seem to work)
equinox repository prefs are not installed [message #965119] Tue, 30 October 2012 22:16 Go to next message
Edward Pershwitz is currently offline Edward Pershwitz
Messages: 10
Registered: February 2012
Junior Member
I'm sure I'm doing something wrong... it's just figuring out what it is, is a bit tricky.. please help.

I have a self-updating RCP app built by a headless Buckminster build. I've added a repository in p2.inf, which is both in the product defining-feature and the application plugin META-INF (tried different combinations).

The PDE exports the product fine, creates
<install_dir>\p2\org.eclipse.equinox.p2.engine\profileRegistry\<my_profile>\.data\.settings\org.eclipse.equinox.p2.metadata.repository.prefs
and
<install_dir>\p2\org.eclipse.equinox.p2.engine\profileRegistry\<my_profile>\.data\.settings\org.eclipse.equinox.p2.artifact.repository.prefs

and the app comes up with a preconfigured repository just like I need it.

When I run a headless Buckminster build I can see my p2.inf in the product-defining feature jar and in my application jar in the p2 repository I publish to, but when I install the product metadata and artifact repository preferences are not generated (like above), and needless to say there is no preconfigured repository in available sites of the "Install new software" wizard.

I have already been through the stage of not fully qualifying addRepository action in my p2.inf (most prevalent example out there does not fully qualify the action and so that does not work) and so now the PDE is happy but the build (or the installer) is still not providing the required prefs.

How can I debug this? Thanks for your help!

Re: equinox repository prefs are not installed [message #965765 is a reply to message #965119] Wed, 31 October 2012 09:41 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2499
Registered: July 2009
Senior Member
FWIW, cloudsmith / geppetto @ github includes the geppetto update site
in the generated product. Don't know if it helps to look at that as an
example.

Regards
- henrik

On 2012-31-10 3:16, Edward Pershwitz wrote:
> I'm sure I'm doing something wrong... it's just figuring out what it is,
> is a bit tricky.. please help.
>
> I have a self-updating RCP app built by a headless Buckminster build.
> I've added a repository in p2.inf, which is both in the product
> defining-feature and the application plugin META-INF (tried different
> combinations).
>
> The PDE exports the product fine, creates
> <install_dir>\p2\org.eclipse.equinox.p2.engine\profileRegistry\<my_profile>\.data\.settings\org.eclipse.equinox.p2.metadata.repository.prefs
>
> and
> <install_dir>\p2\org.eclipse.equinox.p2.engine\profileRegistry\<my_profile>\.data\.settings\org.eclipse.equinox.p2.artifact.repository.prefs
>
>
> and the app comes up with a preconfigured repository just like I need it.
>
> When I run a headless Buckminster build I can see my p2.inf in the
> product-defining feature jar and in my application jar in the p2
> repository I publish to, but when I install the product metadata and
> artifact repository preferences are not generated (like above), and
> needless to say there is no preconfigured repository in available sites
> of the "Install new software" wizard.
>
> I have already been through the stage of not fully qualifying
> addRepository action in my p2.inf (most prevalent example out there does
> not fully qualify the action and so that does not work) and so now the
> PDE is happy but the build (or the installer) is still not providing the
> required prefs.
>
> How can I debug this? Thanks for your help!
>
>
Re: equinox repository prefs are not installed [message #965991 is a reply to message #965765] Wed, 31 October 2012 13:10 Go to previous messageGo to next message
Edward Pershwitz is currently offline Edward Pershwitz
Messages: 10
Registered: February 2012
Junior Member
Henrik,

Thanks for the reply. I looked at geppetto and I see a p2.inf in the product-defining feature whose instructions.configure property looks identical to mine (well, of course the repositories are different). Presumably, at least based on my two days of frantic googling, this is all that's necessary to have the preconfigured update site in the "Install new software" wizard. Could you perhaps point me to anything else that may have an effect on it?

Maybe if I understood the process of generation of o.e.e.p2.artifact.repository.prefs and o.e.e.p2.metadata.repository.prefs better I'd be able to track down the step that is failing.

So Buckminster creates the feature jar and sticks my p2.inf into it and it's job is done. Is this right? Or is there anything else that it does? (with respect to p2.inf, naturally)

If not, then Buckminster is off the hook and this is the installer because I can see my p2.inf in the product-defining feature jar. Then I can quit re-running the build ad nauseum and concentrate on the installer. Is there something that tells it to look at p2.inf? What are the steps it takes to generate o.e.e.p2.artifact.repository.prefs and o.e.e.p2.metadata.repository.prefs from instructions.configure property in p2.inf? Are there any intermediate artifacts it creates in the process that can be analyzed? Is there a way to have it log what it's doing?

Where else can I look?

Thanks again for the help!
Edward

Re: equinox repository prefs are not installed [message #967860 is a reply to message #965991] Thu, 01 November 2012 23:18 Go to previous messageGo to next message
Edward Pershwitz is currently offline Edward Pershwitz
Messages: 10
Registered: February 2012
Junior Member
Well, I now know that the installer is trying to execute the addRepository action (found out through an accidental syntax error and got an error log from the installer) - thank goodness for syntax errors Smile.

More digging revealed that <installDir>\p2\org.eclipse.equinox.p2.engine\.settings contains both org.eclipse.equinox.p2.artifact.repository.prefs and org.eclipse.equinox.p2.metadata.repository.prefs files that contain (in addition to the repository I specified in my installer properties file) my repository from p2.inf.

However, <installDir>\p2\org.eclipse.equinox.p2.engine\profileRegistry\<profile>\.data\.settings does not contain the prefs files and this is where I REALLY want them. I'm not sure I understand why it's even in the prefs files in the first .settings directory, shouldn't it have the repository I specified in the installer properties file? And the prefs files are not even generated for my profile under the profileRegistry.

The profile directory name under profileRegistry looks suspicious: it's the path to the install directory with ASCII codes for ":" and "\". So it looks like this: C%58;%47;Users%47;epershwi%47;Documents%47;CAFE.profile. The error message (when I had that syntax error) had the following line:
"!MESSAGE session context was:(profile=C:/Users/epershwi/Documents/CAFE, phase=org.eclipse.equinox.internal.p2.engine.phases.Configure,[..truncated]". Could this be a problem with the profile name generated and interpreted differently by the p2 engine?

I tried changing eclipse.p2.profileName installer property, which didn't have any effect that I could detect.

Am I missing a step somewhere defining a profile for the product and specifying it to the installer?

Any help is very much appreciated!

[Updated on: Thu, 01 November 2012 23:23]

Report message to a moderator

Re: equinox repository prefs are not installed [message #989809 is a reply to message #967860] Fri, 07 December 2012 18:54 Go to previous message
Edward Pershwitz is currently offline Edward Pershwitz
Messages: 10
Registered: February 2012
Junior Member
Just a quick update, I ended up using a programmatic approach that unlike p2.inf actually does work. For those banging their heads against the wall like I have here's the link that saved my sanity: http://coopology.com/2012/08/eclipse-rcp-setting-p2-repositories-update-sites-programmatically-for-when-p2-inf-fails/

Regards,
Edward
Previous Topic:The import org.eclipse.swt cannot be resolved
Next Topic:create a site.p2 from the target platform (again)
Goto Forum:
  


Current Time: Fri Aug 22 06:03:21 EDT 2014

Powered by FUDForum. Page generated in 0.01547 seconds