Skip to content

Commit

Permalink
Bug 569060 - All ids of target file must be different
Browse files Browse the repository at this point in the history
Change-Id: Ie098d4f5d86e9bcde6e5be9e656eefa9ac8d1b3c
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
  • Loading branch information
laeubi committed Nov 24, 2020
1 parent e8dc398 commit 34b3060
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
* Contributors:
* SAP SE - initial API and implementation
* Christoph Läubrich - [Bug 538144] Support other target locations (Directory, Features, Installations)
* - [Bug 533747] - Target file is read and parsed over and over again
* - [Bug 568729] - Support new "Maven" Target location
* - [Bug 533747] Target file is read and parsed over and over again
* - [Bug 568729] Support new "Maven" Target location
* - [Bug 569060] All ids of target file must be different
*******************************************************************************/
package org.eclipse.tycho.p2.target;

Expand Down Expand Up @@ -140,15 +141,9 @@ TargetDefinitionContent resolveContentWithExceptions(TargetDefinition definition
List<URITargetDefinitionContent> locations = new ArrayList<>();
for (Repository repository : installableUnitLocation.getRepositories()) {
URI location = repository.getLocation();
String key;
String id = repository.getId();
if (id != null && !id.isBlank()) {
key = id;
} else {
key = location.normalize().toASCIIString();
}
String key = location.normalize().toASCIIString();
locations.add(uriRepositories.computeIfAbsent(key,
s -> new URITargetDefinitionContent(provisioningAgent, location, id)));
s -> new URITargetDefinitionContent(provisioningAgent, location, repository.getId())));
}
IQueryable<IInstallableUnit> locationUnits = QueryUtil.compoundQueryable(locations);
installableUnitResolver.addLocation((InstallableUnitLocation) locationDefinition, locationUnits);
Expand Down

0 comments on commit 34b3060

Please sign in to comment.