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 161208 Details for
Bug 303330
[reconciler] No diagnosis of dropin problems
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
303330.txt (text/plain), 11.51 KB, created by
DJ Houghton
on 2010-03-05 18:31:19 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
DJ Houghton
Created:
2010-03-05 18:31:19 EST
Size:
11.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.core >Index: .options >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core/.options,v >retrieving revision 1.4.4.2 >diff -u -r1.4.4.2 .options >--- .options 4 Mar 2010 15:12:49 -0000 1.4.4.2 >+++ .options 5 Mar 2010 23:30:19 -0000 >@@ -17,7 +17,4 @@ > org.eclipse.equinox.p2.core/artifacts/mirrors=false > > #Detailde debugging information about the projector >-org.eclipse.equinox.p2.core/planner/projector=false >- >-#Detailed debugging information about the dropins reconciler >-org.eclipse.equinox.p2.core/reconciler=false >\ No newline at end of file >+org.eclipse.equinox.p2.core/planner/projector=false >\ No newline at end of file >Index: src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java,v >retrieving revision 1.3.4.2 >diff -u -r1.3.4.2 Tracing.java >--- src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java 4 Mar 2010 15:12:48 -0000 1.3.4.2 >+++ src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java 5 Mar 2010 23:30:19 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2010 IBM Corporation and others. >+ * Copyright (c) 2007 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -30,7 +30,6 @@ > public static boolean DEBUG_METADATA_PARSING = false; > public static boolean DEBUG_MIRRORS = false; > public static boolean DEBUG_PLANNER_PROJECTOR = false; >- public static boolean DEBUG_RECONCILER = false; > > static { > DebugOptions options = (DebugOptions) ServiceHelper.getService(Activator.context, DebugOptions.class.getName()); >@@ -43,7 +42,6 @@ > DEBUG_METADATA_PARSING = options.getBooleanOption(Activator.ID + "/metadata/parsing", false); //$NON-NLS-1$ > DEBUG_MIRRORS = options.getBooleanOption(Activator.ID + "/artifacts/mirrors", false); //$NON-NLS-1$ > DEBUG_PLANNER_PROJECTOR = options.getBooleanOption(Activator.ID + "/planner/projector", false); //$NON-NLS-1$ >- DEBUG_RECONCILER = options.getBooleanOption(Activator.ID + "/reconciler", false); //$NON-NLS-1$ > } > } > } >#P org.eclipse.equinox.p2.reconciler.dropins >Index: src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java,v >retrieving revision 1.14.2.2 >diff -u -r1.14.2.2 DropinsRepositoryListener.java >--- src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java 4 Mar 2010 15:12:49 -0000 1.14.2.2 >+++ src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java 5 Mar 2010 23:30:19 -0000 >@@ -14,9 +14,9 @@ > import java.net.MalformedURLException; > import java.net.URL; > import java.util.*; >-import org.eclipse.core.runtime.*; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; > import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; >-import org.eclipse.equinox.internal.p2.core.helpers.Tracing; > import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepository; > import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepository; > import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository; >@@ -24,10 +24,8 @@ > import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException; > import org.eclipse.equinox.internal.provisional.p2.core.repository.IRepository; > import org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener; >-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager; >-import org.eclipse.equinox.internal.provisional.p2.query.Collector; > import org.eclipse.osgi.util.NLS; > import org.osgi.framework.BundleContext; > import org.osgi.framework.ServiceReference; >@@ -42,7 +40,6 @@ > private static final String LINKS_PATH = "path"; //$NON-NLS-1$ > private static final String DROPIN_ARTIFACT_REPOSITORIES = "dropin.artifactRepositories"; //$NON-NLS-1$ > private static final String DROPIN_METADATA_REPOSITORIES = "dropin.metadataRepositories"; //$NON-NLS-1$ >- final private String PREFIX = "[reconciler][dropins] "; //$NON-NLS-1$ > private static final String PIPE = "|"; //$NON-NLS-1$ > private BundleContext context; > private List metadataRepositories = new ArrayList(); >@@ -58,12 +55,8 @@ > } > > public boolean added(File file) { >- if (super.added(file)) { >- if (Tracing.DEBUG_RECONCILER) { >- Tracing.debug(PREFIX + "Interesting feature or bundle added " + file); //$NON-NLS-1$ >- } >+ if (super.added(file)) > return true; >- } > > URL repositoryURL = createRepositoryURL(file); > if (repositoryURL != null) { >@@ -74,12 +67,8 @@ > } > > public boolean changed(File file) { >- if (super.changed(file)) { >- if (Tracing.DEBUG_RECONCILER) { >- Tracing.debug(PREFIX + "Interesting feature or bundle changed " + file); //$NON-NLS-1$ >- } >+ if (super.changed(file)) > return true; >- } > > URL repositoryURL = createRepositoryURL(file); > if (repositoryURL != null) { >@@ -186,7 +175,6 @@ > } catch (ProvisionException e) { > repository = Activator.loadMetadataRepository(repoURL, null); > } >- debugRepository(repository); > metadataRepositories.add(repository); > } catch (ProvisionException ex) { > LogHelper.log(ex); >@@ -313,13 +301,4 @@ > return result; > } > >- private void debugRepository(IMetadataRepository repository) { >- if (!Tracing.DEBUG_RECONCILER) >- return; >- Tracing.debug(PREFIX + "Repository created " + repository.getLocation()); //$NON-NLS-1$ >- Collector result = repository.query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor()); >- for (Iterator iter = result.iterator(); iter.hasNext();) >- Tracing.debug(PREFIX + "\t" + iter.next()); //$NON-NLS-1$ >- } >- > } >Index: src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java,v >retrieving revision 1.25.2.7 >diff -u -r1.25.2.7 ProfileSynchronizer.java >--- src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java 4 Mar 2010 15:12:49 -0000 1.25.2.7 >+++ src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java 5 Mar 2010 23:30:19 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. >+ * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. > * This program and the accompanying materials are made available under the > * terms of the Eclipse Public License v1.0 which accompanies this distribution, > * and is available at http://www.eclipse.org/legal/epl-v10.html >@@ -15,7 +15,8 @@ > import java.util.*; > import java.util.Map.Entry; > import org.eclipse.core.runtime.*; >-import org.eclipse.equinox.internal.p2.core.helpers.*; >+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; >+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper; > import org.eclipse.equinox.internal.p2.extensionlocation.Constants; > import org.eclipse.equinox.internal.provisional.configurator.Configurator; > import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository; >@@ -82,18 +83,14 @@ > ProvisioningContext context = getContext(); > ProfileChangeRequest request = createProfileChangeRequest(context); > >- if (request == null) { >- if (Tracing.DEBUG_RECONCILER) >- Tracing.debug("[reconciler][plan] Empty request"); >+ if (request == null) > return Status.OK_STATUS; >- } >- debug(request); > > SubMonitor sub = SubMonitor.convert(monitor, 100); > try { > //create the provisioning plan > ProvisioningPlan plan = createProvisioningPlan(request, context, sub.newChild(50)); >- debug(request, plan); >+ > status = plan.getStatus(); > if (status.getSeverity() == IStatus.ERROR || plan.getStatus().getSeverity() == IStatus.CANCEL || plan.getOperands().length == 0) > return status; >@@ -412,68 +409,4 @@ > } > return false; > } >- >- private void debug(ProfileChangeRequest request) { >- if (!Tracing.DEBUG_RECONCILER) { >- return; >- } >- final String PREFIX = "[reconciler][request] "; //$NON-NLS-1$ >- IInstallableUnit[] toAdd = request.getAddedInstallableUnits(); >- if (toAdd == null || toAdd.length == 0) { >- Tracing.debug(PREFIX + "No installable units to add."); //$NON-NLS-1$ >- } else { >- for (int i = 0; i < toAdd.length; i++) { >- Tracing.debug(PREFIX + "Adding IU: " + toAdd[i].getId() + ' ' + toAdd[i].getVersion()); //$NON-NLS-1$ >- } >- } >- IInstallableUnit[] toRemove = request.getRemovedInstallableUnits(); >- if (toRemove == null || toRemove.length == 0) { >- Tracing.debug(PREFIX + "No installable units to remove."); //$NON-NLS-1$ >- } else { >- for (int i = 0; i < toRemove.length; i++) { >- Tracing.debug(PREFIX + "Removing IU: " + toRemove[i].getId() + ' ' + toRemove[i].getVersion()); //$NON-NLS-1$ >- } >- } >- } >- >- private void debug(ProfileChangeRequest request, ProvisioningPlan plan) { >- if (!Tracing.DEBUG_RECONCILER) >- return; >- final String PREFIX = "[reconciler][plan] "; //$NON-NLS-1$ >- //get the request >- List toAdd = new ArrayList(); >- toAdd.addAll(Arrays.asList(request.getAddedInstallableUnits())); >- List toRemove = new ArrayList(); >- toRemove.addAll(Arrays.asList(request.getRemovedInstallableUnits())); >- >- //remove from the request everything what is in the plan >- Operand[] ops = plan.getOperands(); >- for (int i = 0; i < ops.length; i++) { >- if (ops[i] instanceof InstallableUnitOperand) { >- InstallableUnitOperand iuo = (InstallableUnitOperand) ops[i]; >- if (iuo.first() == null && iuo.second() != null) { >- toAdd.remove(iuo.second()); >- } >- if (iuo.first() != null && iuo.second() == null) { >- toRemove.remove(iuo.first()); >- } >- } >- } >- //if anything is left in the request, then something is wrong with the plan >- if (toAdd.size() == 0 && toRemove.size() == 0) { >- Tracing.debug(PREFIX + "Plan matches the request"); //$NON-NLS-1$ >- } >- if (toAdd.size() != 0) { >- Tracing.debug(PREFIX + "Some units will not be installed, because they are already installed or there are dependency issues:"); //$NON-NLS-1$ >- for (int i = 0; i < toAdd.size(); i++) { >- Tracing.debug(PREFIX + toAdd.get(i)); >- } >- } >- if (toRemove.size() != 0) { >- Tracing.debug(PREFIX + "Some units will not be uninstalled:"); //$NON-NLS-1$ >- for (int i = 0; i < toRemove.size(); i++) { >- Tracing.debug(PREFIX + toRemove.get(i)); >- } >- } >- } > }
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 303330
: 161208