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 213724 Details for
Bug 354260
Parse update.url in p2.inf
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]
new version also patching publisher to write out 'url' attribute
org.eclipse.equinox.p2.url-patch.diff (text/plain), 6.64 KB, created by
R. Oldenburg
on 2012-04-07 02:38:58 EDT
(
hide
)
Description:
new version also patching publisher to write out 'url' attribute
Filename:
MIME Type:
Creator:
R. Oldenburg
Created:
2012-04-07 02:38:58 EDT
Size:
6.64 KB
patch
obsolete
>diff --git a/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java b/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java >index 2d7ae7d..95b5674 100644 >--- a/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java >+++ b/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java >@@ -199,10 +199,11 @@ > } else { > writeMatchExpression(singleUD); > } > attribute(UPDATE_DESCRIPTOR_SEVERITY, descriptor.getSeverity()); > attribute(DESCRIPTION_ATTRIBUTE, descriptor.getDescription()); >+ attribute(UPDATE_DESCRIPTOR_URL, descriptor.getLocation()); > end(UPDATE_DESCRIPTOR_ELEMENT); > } > > protected void writeApplicabilityScope(IRequirement[][] capabilities) { > start(APPLICABILITY_SCOPE); >diff --git a/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java b/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java >index fd7e3ac..08c01f9 100644 >--- a/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java >+++ b/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java >@@ -87,7 +87,8 @@ > public static final String TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE = "key"; //$NON-NLS-1$ > public static final String TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE = "import"; //$NON-NLS-1$ > > // Constants for attributes of an update descriptor > public static final String UPDATE_DESCRIPTOR_SEVERITY = "severity"; //$NON-NLS-1$ >+ public static final String UPDATE_DESCRIPTOR_URL= "url"; //$NON-NLS-1$ > > } >diff --git a/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java b/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java >index 7453ee6..399aae0 100644 >--- a/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java >+++ b/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java >@@ -26,10 +26,11 @@ > private static final String VERSION_SUBSTITUTION = "$version$"; //$NON-NLS-1$ > > private static final String UPDATE_DESCRIPTION = "update.description"; //$NON-NLS-1$ > private static final String UPDATE_SEVERITY = "update.severity"; //$NON-NLS-1$ > private static final String UPDATE_RANGE = "update.range"; //$NON-NLS-1$ >+ private static final String UPDATE_URL = "update.url"; //$NON-NLS-1$ > private static final String UPDATE_ID = "update.id"; //$NON-NLS-1$ > private static final String CLASSIFIER = "classifier"; //$NON-NLS-1$ > private static final String TOUCHPOINT_VERSION = "touchpoint.version"; //$NON-NLS-1$ > private static final String TOUCHPOINT_ID = "touchpoint.id"; //$NON-NLS-1$ > private static final String COPYRIGHT_LOCATION = "copyright.location"; //$NON-NLS-1$ >@@ -162,10 +163,11 @@ > private IUpdateDescriptor parseUpdateDescriptor(String prefix, String id) { > String name = id; > String description = null; > String range = "[0.0.0,$version$)"; //$NON-NLS-1$ > String severity = "0"; //$NON-NLS-1$ >+ URI unitUpdateLocation = null; > > while (current != null && current.startsWith(prefix)) { > String token = current; > if (token.equals(UPDATE_ID)) { > name = currentValue(); >@@ -173,19 +175,25 @@ > description = currentValue(); > } else if (token.equals(UPDATE_RANGE)) { > range = currentValue(); > } else if (token.equals(UPDATE_SEVERITY)) { > severity = currentValue(); >+ } else if (token.equals(UPDATE_URL)) { >+ try { >+ unitUpdateLocation = new URI(currentValue()); >+ } catch (URISyntaxException e) { >+ throw new IllegalStateException("bad unit update URI at token: " + current + ", " + currentValue()); //$NON-NLS-1$ //$NON-NLS-2$ >+ } > } else { > // ignore > } > next(); > } > > range = substituteVersionAndQualifier(range); > VersionRange versionRange = new VersionRange(range); >- return MetadataFactory.createUpdateDescriptor(name, versionRange, Integer.valueOf(severity), description); >+ return MetadataFactory.createUpdateDescriptor(name, versionRange, Integer.valueOf(severity), description, unitUpdateLocation); > } > > private void parseProvides(String prefix, List<IProvidedCapability> provides) { > while (current != null && current.startsWith(prefix)) { > int dotIndex = current.indexOf('.', prefix.length()); >@@ -314,10 +322,11 @@ > > String unitUpdateId = null; > VersionRange unitUpdateRange = null; > int unitUpdateSeverity = 0; > String unitUpdateDescription = null; >+ URI unitUpdateLocation = null; > > List<IArtifactKey> unitArtifacts = new ArrayList<IArtifactKey>(); > Map<String, String> unitProperties = new HashMap<String, String>(); > List<IRequirement> unitHostRequirements = new ArrayList<IRequirement>(); > List<IProvidedCapability> unitProvides = new ArrayList<IProvidedCapability>(); >@@ -363,10 +372,17 @@ > unitUpdateSeverity = Integer.parseInt(currentValue()); > next(); > } else if (token.equals(UPDATE_DESCRIPTION)) { > unitUpdateDescription = currentValue(); > next(); >+ } else if (token.equals(UPDATE_URL)) { >+ try { >+ unitUpdateLocation = new URI(currentValue()); >+ } catch (URISyntaxException e) { >+ throw new IllegalStateException("bad unit update URI at token: " + current + ", " + currentValue()); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ next(); > } else if (token.startsWith(HOST_REQUIREMENTS_PREFIX)) > parseRequires(prefix + HOST_REQUIREMENTS_PREFIX, unitHostRequirements); > else if (token.startsWith(ARTIFACTS_PREFIX)) > parseArtifacts(prefix + ARTIFACTS_PREFIX, unitArtifacts); > else if (token.startsWith(LICENSES_PREFIX)) >@@ -402,11 +418,11 @@ > } > if (unitTouchpointId != null) > description.setTouchpointType(MetadataFactory.createTouchpointType(unitTouchpointId, unitTouchpointVersion)); > > if (unitUpdateId != null) >- description.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(unitUpdateId, unitUpdateRange, unitUpdateSeverity, unitUpdateDescription)); >+ description.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(unitUpdateId, unitUpdateRange, unitUpdateSeverity, unitUpdateDescription, unitUpdateLocation)); > > if (!unitLicenses.isEmpty()) > description.setLicenses(unitLicenses.toArray(new ILicense[unitLicenses.size()])); > > if (!unitArtifacts.isEmpty())
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 354260
:
201150
|
202231
| 213724