Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317490 - [Build] The 4.0 SDK should come with the e4-p2 repo preconfigured
Summary: [Build] The 4.0 SDK should come with the e4-p2 repo preconfigured
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 0.9   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 1.0 RC1   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 317498 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-21 13:46 EDT by Thomas Schindl CLA
Modified: 2010-06-28 08:44 EDT (History)
5 users (show)

See Also:


Attachments
patch (1.45 KB, patch)
2010-06-22 17:15 EDT, Andrew Niefer CLA
no flags Details | Diff
patch to point to new p2 repo (1.56 KB, patch)
2010-06-23 16:46 EDT, Kim Moir CLA
no flags Details | Diff
Patch for eclipsebuilder (1.04 KB, patch)
2010-06-24 07:46 EDT, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2010-06-21 13:46:32 EDT
The SDK should come with a preconfigured p2 repo to install additional e4-stuff like XWT, Model Tooling, ...
Comment 1 Oleg Besedin CLA 2010-06-21 14:31:37 EDT
*** Bug 317498 has been marked as a duplicate of this bug. ***
Comment 2 John Arthorne CLA 2010-06-22 11:18:05 EDT
It is already there. We just need to add a child repository for each build that we want to make available.
Comment 3 Paul Webster CLA 2010-06-22 12:00:11 EDT
Now I need help to generate said repos.

For e4 Andrew's given me some of the magic:

<p2.composite.repository>
<add location="file://"/>
...
</p2.composite.repository>

I can create a composite repo in /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/updates/2010 and scp that to /home/data/httpd/download.eclipse.org/e4/updates/2010

Kim, for 4.0 I need some help.  The builds we do don't seem to run your composite repo task, and are in temporary workspaces anyway.  I can create a hudson writable directory that the 4.0 build could create composite repos in.  But then they need to be copied over to /home/data/httpd/download.eclipse.org/eclipse/updates/4.0, which means either you need to do it or pwebster does.

What do you think?

PW
Comment 4 Andrew Niefer CLA 2010-06-22 13:11:44 EDT
(In reply to comment #3)
> Now I need help to generate said repos.
> 
> For e4 Andrew's given me some of the magic:
> 
> <p2.composite.repository>
> <add location="file://"/>
> ...
> </p2.composite.repository>
> 

We'll actually want to use relative URIs for the children, so we don't need a "file:" in the <add>

<p2.composite.repository location="file://" >
   <add location="${buildId}" />  <!--ie : location="I20100609" -->
</p2.composite.repository>
Comment 5 Kim Moir CLA 2010-06-22 13:23:42 EDT
It would be good to 
1) Copy the existing 4.0 repo to a build directory
2) Run the composite repository task to create the child in the build directory
3) Add the child to the real repo as either kmoir or pwebster

This will ensure that you aren't recreating bundles with the same id and version  assuming you use the comparator when mirroring. I can help you with this if you would like.
Comment 6 Andrew Niefer CLA 2010-06-22 17:15:41 EDT
Created attachment 172464 [details]
patch

Untested patch does:
1) create composite repo at ${updateSite}
2) mirror build result repo to ${updateSite}/${buildId} with comparator
3) add ${buildId} as child to the composite
Comment 7 Paul Webster CLA 2010-06-23 09:47:59 EDT
I updated Andrew's patch, and committed:
<p2.mirror source="file:${p2.repo}" log="${buildDirectory}/${buildLabel}/mirrorLog.txt" ignoreErrors="true" >
	<destination compressed="true" name="${p2.repo.name}" location="file:${updateSite}/${buildId}" append="true" format="file:${p2.repo}" />
	<comparator comparator="org.eclipse.equinox.p2.repository.tools.jar.comparator" comparatorLog="${buildDirectory}/${buildLabel}/comparatorlog.txt">
		<repository location="${repoBaseline}" />
	</comparator>
</p2.mirror>
<p2.composite.repository location="file:${updateSite}" >
	<add location="${buildId}" />
</p2.composite.repository>


I'll have a test build running soon.

PW
Comment 8 Paul Webster CLA 2010-06-23 11:09:59 EDT
(In reply to comment #5)
> This will ensure that you aren't recreating bundles with the same id and
> version  assuming you use the comparator when mirroring. I can help you with
> this if you would like.

Hi Kim, the target directory for 4.0 to create a composite repo is /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/updates/4.0

Could you modify the R4_HEAD build script so it mirrors the I build repo there?  Or point me in that direction, I'll have a go.

PW
Comment 9 Kim Moir CLA 2010-06-23 16:46:06 EDT
Created attachment 172551 [details]
patch to point to new p2 repo

Also, Paul created a updates/4.0 directory.  This file will be excluded from being updated when I sync to eclipse.org since Paul's scripts will update it directly.
Comment 10 Paul Webster CLA 2010-06-24 07:46:55 EDT
Created attachment 172591 [details]
Patch for eclipsebuilder

This will touch a file in my 4.0 SDK updates directory when the build is finished.  I'll have my rsync cron check for that file and perform a sync.

Kim, could you check that in?

PW
Comment 11 Kim Moir CLA 2010-06-24 10:40:49 EDT
Patch released and builder tagged.  Does the /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/updates/4.0/build_done.txt need to be deleted when the build starts so the file doesn't exist or will you check the timestamp?
Comment 12 Paul Webster CLA 2010-06-24 10:52:49 EDT
(In reply to comment #11)
> need to be deleted when the build starts so the file doesn't exist or will you
> check the timestamp?

It's deleted when I run a sync operation, so it's OK if it is left there by the build (I'll clean it up, or it will still be valid anyway :-)

PW
Comment 13 Paul Webster CLA 2010-06-24 20:06:39 EDT
My I20100624-1900 e4 build failed with:

Difference found for canonical: org.eclipse.update.feature,org.eclipse.e4.sdk.source.feature,0.9.1.v20100510-1330-18z5FC7sRZPWHhMDgnFXV0ZDdP6H between file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/updates/2010/I20100623-1100 and file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20100624-1900/I20100624-1900/repository/
The entry "Feature: org.eclipse.e4.ui.source.feature 0.9.1.v20100603-1900-789a7CFKc_03IdpKLVLJ1o26CA4" is not present in both features.
The entry "Feature: org.eclipse.e4.core.tools.source.feature 0.9.0.v20100622-1500-37Q-BgJ9E99cFR4FVC9" is not present in both features.

These are both auto-generated source features.  The core.tools feature added a plugin, but the ui.feature hasn't changed since June 03.

My feature versions changed, ex for core.tools: 0.9.0.v20100622-1500-37Q-BgJ9E99cFP4FVC9 to 0.9.0.v20100622-1500-37Q-BgJ9E99cFR4FVC9


This is the code we're currently using:

<p2.mirror source="file:${p2.repo}" log="${buildDirectory}/${buildLabel}/mirrorLog.txt" ignoreErrors="true" >
	<destination compressed="true" name="${p2.repo.name}" location="file:${updateSite}/${buildLabel}" append="true" format="file:${p2.repo}" />
	<comparator comparator="org.eclipse.equinox.p2.repository.tools.jar.comparator" comparatorLog="${buildDirectory}/${buildLabel}/comparatorlog.txt">
		<repository location="${repoBaseline}" />
	</comparator>
</p2.mirror>
<p2.composite.artifact.repository.add location="file://${updateSite}" child="${buildLabel}" />
<p2.composite.metadata.repository.add location="file://${updateSite}" child="${buildLabel}" />


PW
Comment 14 Paul Webster CLA 2010-06-25 08:39:37 EDT
(In reply to comment #13)
> My I20100624-1900 e4 build failed with:
> 

I tagged the upper features, and that appears to have allowed my build to proceed.

PW
Comment 15 Paul Webster CLA 2010-06-25 11:09:00 EDT
(In reply to comment #13)
> <p2.mirror source="file:${p2.repo}"
> log="${buildDirectory}/${buildLabel}/mirrorLog.txt" ignoreErrors="true" >

Andrew or Kim:  How can I get the comparator failure to not kill my build?  Or is that mirror corrupt by that point?

PW
Comment 16 Kim Moir CLA 2010-06-25 11:24:30 EDT
You can set 
ignoreErrors="true" when mirroring and specify a comparatorLog location that can be later parsed for errors.
Comment 17 Paul Webster CLA 2010-06-25 11:27:05 EDT
(In reply to comment #16)
> You can set 
> ignoreErrors="true" when mirroring and specify a comparatorLog location that
> can be later parsed for errors.

I have that, but Andrew said I might be using an old basebuilder version that's not properly ignoring errors.

PW
Comment 18 Andrew Niefer CLA 2010-06-25 11:28:59 EDT
There was bug 313615, you will need a newer basebuilder.

Whether or not the resulting repository would be good or not after ignoring errors depends on the specifics of the comparison.  The structural feature differences you found might be a problem.  Other times the differences are more "cosmetic".

Note that in all cases, the resulting mirror gets the copy from the baseline.
Comment 19 Paul Webster CLA 2010-06-28 08:44:55 EDT
The appears to be working.  Thanx for all of your help.

PW