Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 94142 Details for
Bug 223756
problems building p2 platform zips
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
223756.txt (text/plain), 5.93 KB, created by
DJ Houghton
on 2008-03-30 12:54:36 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
DJ Houghton
Created:
2008-03-30 12:54:36 EDT
Size:
5.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.metadata.generator >Index: src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java,v >retrieving revision 1.38 >diff -u -r1.38 Generator.java >--- src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java 28 Mar 2008 00:05:31 -0000 1.38 >+++ src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java 30 Mar 2008 16:51:38 -0000 >@@ -923,7 +923,9 @@ > BundleDescription[] result = new BundleDescription[bundleLocations.length + (addSimpleConfigurator ? 1 : 0)]; > BundleDescriptionFactory factory = getBundleFactory(); > for (int i = 0; i < bundleLocations.length; i++) { >- result[i] = factory.getBundleDescription(bundleLocations[i]); >+ BundleDescription desc = factory.getBundleDescription(bundleLocations[i]); >+ if (desc != null) >+ result[i] = desc; > } > if (addSimpleConfigurator) { > //Add simple configurator to the list of bundles >Index: src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java,v >retrieving revision 1.6 >diff -u -r1.6 BundleDescriptionFactory.java >--- src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java 27 Mar 2008 17:41:44 -0000 1.6 >+++ src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java 30 Mar 2008 16:51:38 -0000 >@@ -16,9 +16,10 @@ > import java.util.zip.ZipEntry; > import java.util.zip.ZipFile; > import org.eclipse.core.runtime.*; >+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; > import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper; >+import org.eclipse.equinox.internal.p2.metadata.generator.Activator; > import org.eclipse.equinox.internal.p2.metadata.generator.Messages; >-import org.eclipse.equinox.internal.p2.metadata.repository.Activator; > import org.eclipse.osgi.service.pluginconversion.PluginConversionException; > import org.eclipse.osgi.service.pluginconversion.PluginConverter; > import org.eclipse.osgi.service.resolver.*; >@@ -60,7 +61,7 @@ > try { > converter = acquirePluginConverter(); > if (converter == null) { >- new RuntimeException("Unable to aquire PluginConverter service during generation for: " + bundleLocation).printStackTrace(); //$NON-NLS-1$ >+ LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to aquire PluginConverter service during generation for: " + bundleLocation)); > return null; > } > return converter.convertManifest(bundleLocation, false, null, true, null); >@@ -72,8 +73,7 @@ > return null; > if (logConversionException) { > IStatus status = new Status(IStatus.WARNING, Activator.ID, 0, NLS.bind(Messages.exception_errorConverting, bundleLocation.getAbsolutePath()), convertException); >- System.out.println(status); >- //TODO Need to find a way to get a logging service to log >+ LogHelper.log(status); > } > return null; > } >@@ -85,9 +85,9 @@ > descriptor.setUserObject(enhancedManifest); > return descriptor; > } catch (BundleException e) { >- // IStatus status = new Status(IStatus.WARNING, IPDEBuildConstants.PI_PDEBUILD, EXCEPTION_STATE_PROBLEM, NLS.bind(Messages.exception_stateAddition, enhancedManifest.get(Constants.BUNDLE_NAME)), e); >- // BundleHelper.getDefault().getLog().log(status); >- System.err.println(NLS.bind(Messages.exception_stateAddition, bundleLocation != null ? bundleLocation.getAbsoluteFile() : null)); >+ String message = NLS.bind(Messages.exception_stateAddition, bundleLocation == null ? null : bundleLocation.getAbsoluteFile()); >+ IStatus status = new Status(IStatus.WARNING, Activator.ID, message, e); >+ LogHelper.log(status); > return null; > } > } >@@ -105,11 +105,13 @@ > ManifestElement.parseBundleManifest(manifestStream, entries); > return getBundleDescription(entries, bundleLocation); > } catch (IOException e) { >- // TODO Auto-generated catch block >- e.printStackTrace(); >+ String message = "An error occurred while reading the bundle description."; >+ IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e); >+ LogHelper.log(status); > } catch (BundleException e) { >- // TODO Auto-generated catch block >- e.printStackTrace(); >+ String message = "An error occurred while reading the bundle description."; >+ IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e); >+ LogHelper.log(status); > } > return null; > } >@@ -128,7 +130,8 @@ > manifestStream = new BufferedInputStream(new FileInputStream(new File(bundleLocation, JarFile.MANIFEST_NAME))); > } > } catch (IOException e) { >- //ignore >+ //ignore but log >+ LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "An error occurred while loading the bundle manifest.", e)); > } > > Dictionary manifest = null; >@@ -138,9 +141,11 @@ > // TODO temporary hack. We are reading a Map but everyone wants a Dictionary so convert. > // real answer is to have people expect a Map but that is a wider change. > manifest = new Hashtable(manifestMap); >- } catch (IOException ioe) { >+ } catch (IOException e) { >+ LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "An error occurred while loading the bundle manifest.", e)); > return null; > } catch (BundleException e) { >+ LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "An error occurred while loading the bundle manifest.", e)); > return null; > } finally { > try {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 223756
: 94142