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 167414 Details for
Bug 311929
Very slow, seems to be repeating operations when trying to install new software
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 to ProvisioningContext
patch311929.txt (text/plain), 3.67 KB, created by
Susan McCourt
on 2010-05-06 19:33:28 EDT
(
hide
)
Description:
patch to ProvisioningContext
Filename:
MIME Type:
Creator:
Susan McCourt
Created:
2010-05-06 19:33:28 EDT
Size:
3.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.engine >Index: src/org/eclipse/equinox/p2/engine/ProvisioningContext.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java,v >retrieving revision 1.15 >diff -u -r1.15 ProvisioningContext.java >--- src/org/eclipse/equinox/p2/engine/ProvisioningContext.java 6 May 2010 18:59:56 -0000 1.15 >+++ src/org/eclipse/equinox/p2/engine/ProvisioningContext.java 6 May 2010 22:33:20 -0000 >@@ -37,7 +37,7 @@ > private final List<IInstallableUnit> extraIUs = Collections.synchronizedList(new ArrayList<IInstallableUnit>()); > private URI[] metadataRepositories; //metadata repositories to consult > private final Map<String, String> properties = new HashMap<String, String>(); >- private Map<String, IArtifactRepository> referencedArtifactRepositories = null; >+ private Map<String, URI> referencedArtifactRepositories = null; > > private static final String FILE_PROTOCOL = "file"; //$NON-NLS-1$ > >@@ -148,7 +148,7 @@ > Arrays.sort(repositories, LOCAL_FIRST_COMPARATOR); > > List<IArtifactRepository> repos = new ArrayList<IArtifactRepository>(); >- SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100); >+ SubMonitor sub = SubMonitor.convert(monitor, (repositories.length + 1) * 100); > for (int i = 0; i < repositories.length; i++) { > if (sub.isCanceled()) > throw new OperationCanceledException(); >@@ -157,10 +157,21 @@ > } catch (ProvisionException e) { > //skip unreadable repositories > } >+ // Remove this URI from the list of extra references if it is there. >+ if (referencedArtifactRepositories != null) >+ referencedArtifactRepositories.remove(repositories[i]); >+ } >+ // Are there any extra artifact repository references to consider? >+ if (referencedArtifactRepositories != null && referencedArtifactRepositories.size() > 0) { >+ SubMonitor innerSub = SubMonitor.convert(sub.newChild(100), referencedArtifactRepositories.size() * 100); >+ for (URI referencedURI : referencedArtifactRepositories.values()) { >+ try { >+ repos.add(repoManager.loadRepository(referencedURI, innerSub.newChild(100))); >+ } catch (ProvisionException e) { >+ // skip unreadable repositories >+ } >+ } > } >- if (referencedArtifactRepositories != null) >- for (IArtifactRepository repo : referencedArtifactRepositories.values()) >- repos.add(repo); > return repos; > } > >@@ -172,7 +183,7 @@ > SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100); > > // Clear out the list of remembered artifact repositories >- referencedArtifactRepositories = new HashMap<String, IArtifactRepository>(); >+ referencedArtifactRepositories = new HashMap<String, URI>(); > for (int i = 0; i < repositories.length; i++) { > if (sub.isCanceled()) > throw new OperationCanceledException(); >@@ -212,13 +223,11 @@ > } else if (ref.getType() == IRepository.TYPE_ARTIFACT) { > // We want to remember all enabled artifact repository locations. > if (isEnabled(artifactManager, ref)) >- referencedArtifactRepositories.put(ref.getLocation().toString(), artifactManager.loadRepository(ref.getLocation(), repoSubMon.newChild(100))); >+ referencedArtifactRepositories.put(ref.getLocation().toString(), ref.getLocation()); > } > } catch (IllegalArgumentException e) { > // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=311338 > // ignore invalid location and keep going >- } catch (ProvisionException e) { >- // ignore this one but keep looking at other references > } > } > } else {
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 311929
: 167414 |
167578