Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347150 - [revert] Improve handling of failing to revert
Summary: [revert] Improve handling of failing to revert
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 blocker with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 09:26 EDT by Miles Daffin CLA
Modified: 2019-10-22 06:42 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Daffin CLA 2011-05-25 09:26:41 EDT
Build Identifier: Issue detected in Eclipse 3.5.2 and 3.6.2

I consistently get this problem when trying to revert Eclipse installs. For example, the other day I installed the latest B3 Aggregator from a test repo. There were are some bugs in the new version which I could not live with so I tried to revert my Eclipse 3.6 config to the previous steady state. When I did this I got the following error(s):
 
----
An error occurred while collecting items to be installed
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: org.eclipse.update.feature,org.eclipse.b3.aggregator.editor.feature,0.1.0.r01470
No repository found containing: org.eclipse.update.feature,org.eclipse.b3.aggregator.engine.feature,0.1.0.r01470
----
 
I really do not get this error. All I did was update my install, in fact just the B3 Aggregator. So the artifacts for the previous version of the B3 Agg should still be on disk, in my installation. Everything that P2 needs in order to reconstitute my previous configuration should be there. So why does P2 need to go to external repos at all?  What seems to happen is that p2 tries to create a plan for replacing these artifacts and for some reason it doesn't find their meta-data. I think P2 should consult it's own local cache when doing this. Apparently it doesn't. Only if stuff is missing from the local cache should P2 go looking in the currently enabled external repos.


Reproducible: Sometimes

Steps to Reproduce:
1. Add a new repo for something you want and install it.
2. Update the newly install IU from the external repo when an update becomes available.
3. After you have updated try to revert your installation configuration to the previous state.
Comment 1 Ian Bull CLA 2012-05-09 11:23:48 EDT
Pascal, this is assigned to you. Any thoughts?

The fact that this is failing in the collect phase, indicates to me that it's missing the artifacts (or at least the artifact descriptors).
Comment 2 Eduardo Simioni CLA 2012-08-08 08:03:17 EDT
I have the same problem, could never revert an update.

Updated to Juno yesterday but for some reason I cannot add breakpoints to Aspect code anymore, therefore I tried to revert, no matter which previous installation I select I cannot revert, I get the no repository found for apparently every component that is different between the 2 installations.
Comment 3 Pascal Rapicault CLA 2012-08-08 08:32:20 EDT
Could you please provide steps to reproduce the problem?
Are you trying to revert from Juno to Indigo?
Comment 4 Eduardo Simioni CLA 2012-08-08 09:36:37 EDT
Yes, I'm trying to revert from Juno to Indigo, Windows 7 64bit, Eclipse JEE 64bit also.

I cannot tell for sure the steps to reproduce, but my scenario was:

- Installed Indigo (sometime ago)
- Added some plugins (AJDT, EclEmma, JRebel, SVN, Maven Integration for WTP)
- Updated them while using Indigo
- Updated to Juno
- Tried to revert

I believe the error is reproducible even without any plugin.
I downloaded a fresh and clean Indigo to try to do that, but when I check for updates it says that "No updates were found", oddly enough my old Indigo offered to update to Juno.
Comment 5 Eduardo Simioni CLA 2012-08-08 10:00:54 EDT
Forgot to mention that all plugins were installed from Eclipse Marketplace.
Comment 6 Pascal Rapicault CLA 2012-08-09 16:11:26 EDT
The cause of the failure to revert from juno back to indigo is because the indigo repository is not available since updating from indigo to juno removes the indigo repo. You can try adding the http://download.eclipse.org/releases/indigo back and this should help for some cases.

Going forward we may want to change p2 to:
- explain why the revert is failing.
- persist  the repositories that were enabled at the time of the install
Comment 7 Luke Usherwood CLA 2014-04-06 08:45:00 EDT
Would be really nice to have a 'continue anyway' option (with warning about knowing what you're doing / things might get messed up, if appropriate).

Or even better, an option for a selective revert.

Background: I'm trying to troubleshoot a significant performance degradation between 4.4M5 & 4.4M6, and would like to roll back, and then selectively apply updates to work out which feature to log a ticket against. (My initial report was immediately closed as "need more info".)

Unfortunately 2 features are unable to roll back:
 * Java JDK 8 Beta support (repository probably removed now it's official?)
 * eclemma (code coverage)

I _really_ don't care about these features; in fact I uninstalled them hoping that might work around the failure to revert. (Of course I suppose the revert would try to put them back anyway.)

(Oh well, for my particular procedure perhaps it'll be faster to keep a zipped copy of a fresh 4.4M5 installation to revert back to anyway.)
Comment 8 Markus Keller CLA 2015-01-16 08:21:49 EST
This is a blocker. Users must be able to either
- continue a Revert operation even if some features cannot be reverted
- or revert individual features
- or install an older version of a specific feature.

Eclipse SDK I20150113-0800 is broken, and I don't see a way to go back to I20150106-0800. The problem is that I also updated EGit from 3.7.0.201501080747 to 3.7.0.201501160908 in the same update operation, but now the http://download.eclipse.org/egit/updates-nightly/ update site doesn't contain the old EGit version any more.

I20150106-0800 works perfectly with the newer EGit version, but there's no UI to fix my install.

!ENTRY org.eclipse.equinox.p2.engine 4 4 2015-01-16 14:13:19.209
!MESSAGE An error occurred while collecting items to be installed
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2015-01-16 14:13:19.209
!MESSAGE session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2015-01-16 14:13:19.209
!MESSAGE No repository found containing: org.eclipse.update.feature,org.eclipse.egit,3.7.0.201501080747
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2015-01-16 14:13:19.209
!MESSAGE No repository found containing: org.eclipse.update.feature,org.eclipse.jgit,3.7.0.201501071923
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2015-01-16 14:13:19.209
!MESSAGE No repository found containing: org.eclipse.update.feature,org.eclipse.jgit.java7,3.7.0.201501071923
Comment 9 Pascal Rapicault CLA 2015-01-17 12:40:05 EST
(In reply to Markus Keller from comment #8)
> This is a blocker. Users must be able to either
> - continue a Revert operation even if some features cannot be reverted
> - or revert individual features
> - or install an older version of a specific feature.

Reverting is designed to be an all or nothing operation that takes you back to a state that you once were in, as such reverting partially does not really make sense w/o any user warning / consent (e.g. something like the remediation workflow).

As for installing an older version of a feature, this is something that is only supported through the command line. GUI wise, I'm not sure where / how we would allow a user.

Note in order to perform something meaningful here, we would have to improve the representation of the download failure in order to find the IU that actually caused the problem, and at this point prompt the user.
Comment 10 Markus Keller CLA 2017-03-28 14:29:59 EDT
https://wiki.eclipse.org/FAQ_Revert_an_Update_or_Installation_with_p2#Revert_doesn.27t_work
lists manual steps to revert using the p2 director from another Eclipse install.
Comment 11 Eclipse Genie CLA 2019-10-22 06:42:58 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.