Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Verify mirror

Hi All,
 
At the end of last year I was discussing the possibility of validating a mirror against the original site with Andrew Cattle. I have raised an issue for this here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=262351.
 
I have included the email thread below, which contains some useful information. 
 
Such an enhancement would make the mirror apps much more reliable IMO.
 
Thanks,
 
Miles
 
Miles Daffin
Morgan Stanley | IDEAS PRACTICE AREAS
20 Cabot Square | Canary Wharf | Floor 01
London, E14 4QW
Phone: +44 20 7677-5119
Fax: +44 20 7056-4572
Miles.Daffin@xxxxxxxxxxxxxxxxx
 


From: Andrew Cattle [mailto:agcattle@xxxxxxxxxx]
Sent: 11 December 2008 18:01
To: Daffin, Miles (IT)
Subject: RE: Mirror Application Bug you may be interested in.


I can't say yes or no in any official capacity but from what I've seen the "size" attribute is more of a convenience than anything else. The 3.4 repo, for example, I know has an incorrect artifact size attribute. Plus if you're mirroring from a non p2 source (like an update site) you don't have the size attribute.

However, I recently did some work that in theory could be extended to do an indepth analysis of 2 repositories to assert they are infact the same. look into the "artifactComparators" extension point in the artifact.repositories project. You can see ti being used in that project's mirror application to compare an artifact from the source against a baseline or against the destination if they have a matching artifact. My contract is up next week so I won't have time to get anything working but maybe you could send an email to the p2 dev mailing list or create a bug requesting a feature enhancement. Take 2 repositories and verify all keys and descriptors match.

I wrote a very very simple class along the same lines a couple months ago but it only works if both source and destination are local and it makes the assumption that so long as files exist in the proper location then they are the same. So it's kind of pointless for your needs.




"Daffin, Miles \(IT\)" <Miles.Daffin@xxxxxxxxxxxxxxxxx>

12/11/2008 11:51 AM

To
Andrew Cattle/Ottawa/IBM@IBMCA
cc
Subject
RE: Mirror Application Bug you may be interested in.





Hi Andrew,
 
Thanks for thinking of me!
 
I have added a test-mirror macro to my mirror script (ant). This grabs the metadata from the original site and compares it to the mirrored versions (artifacts.xml//repository/artifacts/@size and content.xml/repository/units/@size). All it does right now is print a warning if a comparison fails (like junit assertEquals). Do you think it would be a good feature for the mirror apps?
 
Cheers,
 
Miles
 
Miles Daffin
Morgan Stanley | Technology

20 Cabot Square | Canary Wharf | Floor 01
London, E14 4QW
Phone: +44 20 7677-5119
Fax: +44 20 7056-4572

Miles.Daffin@xxxxxxxxxxxxxxxxx
 


From: Andrew Cattle [mailto:agcattle@xxxxxxxxxx]
Sent:
11 December 2008 16:44
To:
Daffin, Miles (IT)
Subject:
Mirror Application Bug you may be interested in.



Hi. I was looking through my email history and remembered the problems you were having with the mirror application and how you really didn't like the -ignoreErrors argument.


I suspect that this bug will may be of interest to you because I think this is why not all artifacts were being downloaded:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=257230


Have a nice day.



NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.


Back to the top