Community
Participate
Working Groups
The following must apply to provoke the problem. 1. The source repository has ArtifactDescriptors with format=packed and an 'artifact.reference' property. This is the case when mirroring from an update site that has a site.xml but lacks P2 meta-data. 2. The artifact to mirror is not an osgi.bundle (a feature typically). 3. A RawMirrorRequest is used for the copy. The RawMirrorRequest will use the 'artifact.reference' property to determine the source for the copy. This path ends with '.jar.pack.gz'. The destination is computed using the mapper. Since there is no rule for packed features, the destination path will end with '.jar'. The result is that the content of the .jar.pack.gz file is copied to a .jar file without processing. The resulting file looks like a jar but is really a packed file.
Created attachment 133442 [details] SimpleArtifactRepository - Packed Features Rule The patch adds a mapping rule for packed features to new and to existing (if the rule doesn't already exist) SimpleArtifactRepositories.
Created attachment 133445 [details] SimpleArtifactRepository - Packed Features Rule Slight problem with a test in the previous patch, this should correct it
After discussion we have decided to not do something as dramatic as what was done in the patch (The patch was inserting a new rule when loading the repo). This could result in unknown issues and could also break ppl with other rules who have repos out there, when the only ppl that are impacted by this problem right now are those with update site with features when they are mirroring files. Consequently the only thing we are changing here is adding a rule to handle pack.gz files for features when a new artifact repository is created.
I left open because we need to have a regression test for this.
*** Bug 269199 has been marked as a duplicate of this bug. ***
Created attachment 134013 [details] Additional test
I have released the test attached.