Bug 247214 - P2 mirroring cannot merge two repositories
Summary: P2 mirroring cannot merge two repositories
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.5 M3   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-09-13 05:42 EDT by Baptiste Mathus CLA
Modified: 2008-11-18 08:05 EST (History)
3 users (show)

See Also:


Attachments
Added code to look for "-append" arguement (4.01 KB, patch)
2008-09-18 10:22 EDT, Andrew Cattle CLA
no flags Details | Diff
Added code to look for "-append" argue,emt (patch version) (1.01 KB, patch)
2008-09-18 15:28 EDT, Andrew Cattle CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Mathus CLA 2008-09-13 05:42:09 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1. Mirror a first Eclipse repository locally:
eclipsec.exe -nosplash -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source http://subclipse.tigris.org/update_1.4.x -destination file:c:\artifactLocalRepository\myMergedRepo
2. Mirror a second repository to the same local directory:
eclipsec.exe -nosplash -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source http://m2eclipse.sonatype.org/update/ -destination file:c:\artifactLocalRepository\myMergedRepo
3. In the local repo, everything you mirrored from the first repo will be trashed. The local directory will only be the mirror of the second one.


More information:
Using -append or not won't change anything. 

If you can reproduce, Pascal Rapicault confirmed it would likely be a bug (see http://dev.eclipse.org/mhonarc/lists/p2-dev/msg00219.html).

Thanks for this great component anyway!
Cheers.
Comment 1 DJ Houghton CLA 2008-09-18 10:07:45 EDT
Andrew has been writing tests for the mirror application and has a test which will catch this, as well as a patch for the class in question.
Comment 2 Andrew Cattle CLA 2008-09-18 10:22:50 EDT
Created attachment 112898 [details]
Added code to look for "-append" arguement

modified "initializeFromArguments" to include an additional if statement to set append to true when "-append" is found.

Tested using org.eclipse.equinox.p2.tests.mirror.BasicMirrorApplicationTest.java
(currently not located in CVS)
Comment 3 DJ Houghton CLA 2008-09-18 15:17:19 EDT
Andrew, please create a CVS patch and attach it to this bug report instead of the full Java file. Let me know if you need help. Thanks.
Comment 4 Andrew Cattle CLA 2008-09-18 15:28:31 EDT
Created attachment 112954 [details]
Added code to look for "-append" argue,emt (patch version)

Sorry about the confusion
Comment 5 DJ Houghton CLA 2008-10-16 09:51:07 EDT
This was released a while ago.
Closing.
Comment 6 Baptiste Mathus CLA 2008-11-05 13:46:47 EST
Sorry for the question, but just to be sure : the "target milestone" indicates the first released version containing the fix? So, the fix is only available since 3.5 M3?

If so, any chance it gets backported to some 3.4.2 or something?

Cheers
Comment 7 Pascal Rapicault CLA 2008-11-05 16:11:38 EST
This has been released in 3.5 M3. Given that those tools are usually for a limited set of ppl (compared the the final users of p2) we have no plan to port that to 3.4.2.
Comment 8 John Arthorne CLA 2008-11-13 15:45:18 EST
Removing iplog+ from bug since it is already on the attachment.
Comment 9 Baptiste Mathus CLA 2008-11-18 07:55:54 EST
Thanks for your answer Pascal. Thanks for the clarification.

So, but I don't measure all the involvement: could we consider using p2-3.5-M3 mirrorApp to mirror & merge repositories to be used by an eclipse 3.4.x installation? 

Was there for example any change in the repository format that could cause problems?

Cheers.
Thanks a lot.
Comment 10 Pascal Rapicault CLA 2008-11-18 08:05:44 EST
You can safely use the 3.5 (try M3) mirroring tools to produce repositories to be used with 3.4.