[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Regression in Publisher?

It is quite possible that this never worked in the publisher. We are still using the metadata generator in our builds so we might not have noticed it yet. Since the generator and publisher each have their own separate test suites it's not surprising there was no test failure. I suggest entering a bug report.

Thomas Hallgren <thomas@xxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

02/23/2009 03:49 PM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>

P2 developer discussions <p2-dev@xxxxxxxxxxx>
[p2-dev] Regression in Publisher?

I'm having problems with the BundleAction in the Publisher not
recognizing the existence of ".pack.gz" files. I ran the debugger and
ended up in the following code in BundlesAction.generateBundleIUs()  at
line 721:

 // Publish according to the shape on disk
 File bundleLocation = new File(bd.getLocation());
 if (bundleLocation.isDirectory())
     publishArtifact(ad, new File(bd.getLocation()), new
File(bd.getLocation()).listFiles(), info);
     publishArtifact(ad, new File(bd.getLocation()), info);

The bundleLocation in my case is always the bundle jar so I end up in
the second publishArtifact(). The code that adds the corresponding
.pack.gz file however, is only present in the publishArtifact() that is
called when bundleLocation is a directory. This never happens.

Looking at the deprecated Generated.generateBundleIUs(), I see similar
code as the one above, but there it's followed by this (line 409):

 if (info.reuseExistingPack200Files() && !info.publishArtifacts()) {
     File packFile = new
Path(bd.getLocation()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$
     if (packFile.exists()) {
         IArtifactDescriptor ad200 =
MetadataGeneratorHelper.createPack200ArtifactDescriptor(key, packFile,
         publishArtifact(ad200, new File[] {packFile}, destination, true);

Am I missing something obvious here? It seems odd that no regression
test has trigged on this.

Thomas Hallgren
p2-dev mailing list