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 164746 Details for
Bug 308934
[reconciler] Force removal of deleted bundles
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
308934.txt (text/plain), 3.23 KB, created by
DJ Houghton
on 2010-04-13 12:30:02 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
DJ Houghton
Created:
2010-04-13 12:30:02 EDT
Size:
3.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.reconciler.dropins >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.69 >diff -u -r1.69 ProfileSynchronizer.java >--- src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java 12 Apr 2010 20:57:18 -0000 1.69 >+++ src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java 13 Apr 2010 16:29:34 -0000 >@@ -418,24 +418,23 @@ > return null; > } > >- // if we had some bundles which moved locations then we need to create 2 change requests. >- // one will remove the bundle from the profile and then the other will add it back in >- // at the new location >+ // if we had some bundles which moved locations then we need to create a move change request >+ // and remove the moved bundles first. The caller of this method will take care of calling us again >+ // to re-add the bundles at their new location (and other bundles which need adding) > if (!toMove.isEmpty()) { >- ReconcilerProfileChangeRequest moveRequest = new ReconcilerProfileChangeRequest(profile, true); >- moveRequest.removeAll(toMove); >- // force removal of all moved IUs, which will also remove anything which depends on them >- // see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=306424#c6 >- Collection<IRequirement> extraReqs = new ArrayList<IRequirement>(); >- for (IInstallableUnit unit : toMove) { >- IRequirement negation = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, unit.getId(), // >- new VersionRange(unit.getVersion(), true, unit.getVersion(), true), null, 0, 0, false); >- extraReqs.add(negation); >- } >- moveRequest.addExtraRequirements(extraReqs); >- debug(request); >- return moveRequest; >+ request = new ReconcilerProfileChangeRequest(profile, true); >+ request.removeAll(toMove); >+ } >+ >+ // force removal of all moved and removed IUs, which will also remove anything which depends on them >+ // see: bug 306424#c6 and bug 308934. >+ Collection<IRequirement> extraReqs = new ArrayList<IRequirement>(); >+ for (IInstallableUnit unit : request.getRemovals()) { >+ IRequirement negation = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, unit.getId(), // >+ new VersionRange(unit.getVersion(), true, unit.getVersion(), true), null, 0, 0, false); >+ extraReqs.add(negation); > } >+ request.addExtraRequirements(extraReqs); > > context.setExtraInstallableUnits(toAdd); > request.addAll(toAdd); >@@ -518,6 +517,14 @@ > Tracing.debug(PREFIX + "Removing IU property: " + entry.getKey() + "->" + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$ > } > } >+ >+ Collection<IRequirement> extra = request.getExtraRequirements(); >+ if (extra == null || extra.isEmpty()) { >+ Tracing.debug(PREFIX + "No extra requirements."); //$NON-NLS-1$ >+ } else { >+ for (IRequirement requirement : extra) >+ Tracing.debug(PREFIX + "Extra requirement: " + requirement); //$NON-NLS-1$ >+ } > } > > /*
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 308934
:
164746
|
164771