Bug 235683 - Mirroring application does not preseve target repository format
Summary: Mirroring application does not preseve target repository format
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Andrew Cattle CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-06-04 15:27 EDT by Pascal Rapicault CLA
Modified: 2008-11-05 16:08 EST (History)
4 users (show)

See Also:


Attachments
Adds tests to ensure compressed properties are honoured (6.41 KB, patch)
2008-10-27 13:29 EDT, Andrew Cattle CLA
dj.houghton: iplog+
Details | Diff
Required test data for test cases (7.04 KB, application/zip)
2008-10-27 13:30 EDT, Andrew Cattle CLA
dj.houghton: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2008-06-04 15:27:32 EDT
The metadata repository does not preserve the format of the target repository. For example if my target repo is in jar form, the repo resulting of the mirroring application will be non-jar'ed.
Comment 1 Pascal Rapicault CLA 2008-06-04 15:45:54 EDT
I think that the bug applies to both mirroring app.
I believe that the same issue is being dealt with by the metadata generator. 
Ben could you please investigate?
Comment 2 Jeff McAffer CLA 2008-06-04 23:08:03 EDT
It is not clear that the act of mirroring includes the format of the repo index itself.  For example, I might be mirroring into a completely different repo impl for which JAR'd is not relevant.  Similarly for the source repo.  In the event that the destination repo does not exist the app creates a Simple*Repo for you.  It may be relevant to spec whether you want an autocreated destination formated as a JAR in a way similar to the MetadataGeneratorApplication.
Comment 3 Pascal Rapicault CLA 2008-06-05 09:28:42 EDT
I agree with what you say, but this is not the problem I'm talking about. Apparently my message was not clear. 
The problem is the following:
 - I have a repo that I will use as a target. It is a compressed simple artifact repo (e.g. d:/foo/content.jar)
 - I have a source repo for which the format is irrelevant

After the mirroring the source into the target, the target repo is no longer in compressed form.
Comment 4 Jeff McAffer CLA 2008-06-05 14:33:02 EDT
Ah, I was thrown of by "the repo resulting..." and thinking this was a new repo.

In any even, isn't this this a flaw in the repo infrastructure somewhere?  If I create a repo and set its compression (any property/characteristic really) and then shut down.  They startup again, load the repo and write to it, the repos infrastructure itself should be taking care of this no?  Why would an application have to worry about or even be exposed to the internal format details of a repo?  I vaguely recall a bug about this but cannot find it.
Comment 5 John Arthorne CLA 2008-08-26 13:32:22 EDT
I assume this won't happen for 3.4.1. Moving back to inbox because Ben is no longer active.
Comment 6 Andrew Cattle CLA 2008-10-16 09:23:54 EDT
Could this have been fixed in Bug 248441?
Comment 7 Pascal Rapicault CLA 2008-10-17 00:17:15 EDT
Andrew, please check if this works and adds a test case for this if we don't have one. Thx.
Comment 8 Andrew Cattle CLA 2008-10-20 15:39:12 EDT
I just tried to mirror some of my test data into a backup of the 3.4 repo that has a content.jar and I can't replicate it.

I'm not sure how I'd automate this test since I'd have the verify the content.jar still exists but that a content.xml does not.
Comment 9 Pascal Rapicault CLA 2008-10-20 22:17:23 EDT
Start with a repo in a given format, mirror into it another repo in another format and check that the file name of the resulting repo has not changed.
Comment 10 Andrew Cattle CLA 2008-10-27 13:29:20 EDT
Created attachment 116205 [details]
Adds tests to ensure compressed properties are honoured
Comment 11 Andrew Cattle CLA 2008-10-27 13:30:34 EDT
Created attachment 116206 [details]
Required test data for test cases

Unzip into the testData/mirror folder.
Comment 12 Pascal Rapicault CLA 2008-10-29 12:20:01 EDT
Changing the target milestone as we are not contributing to M3. However please make sure these bugs are addressed early in M4 or tomorrow Testing Thursday for the test related ones.
Comment 13 Pascal Rapicault CLA 2008-10-29 12:42:49 EDT
Thx, test case slightly modified and released.