Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322344 - "Only one of the following can be installed" when trying to update product on Win7 with UAC
Summary: "Only one of the following can be installed" when trying to update product on...
Status: RESOLVED INVALID
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 08:37 EDT by Jacek Pospychala CLA
Modified: 2010-08-12 16:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Pospychala CLA 2010-08-11 08:37:07 EDT
hi,
we're installing our Eclipse product using MSI installer on Windows 7 with UAC enabled.
Typically, product is located under c:\Program Files.
Unfortunately, when updating it using p2 "Check for Updates", I'm getting following error:

Cannot complete the install because of a conflicting dependency.
  Software being installed: Zend Studio 8.0.0.v20100806 (com.zend.php.ide 8.0.0.v20100806)
  Software currently installed: Shared profile 1.0.0.1281012004128 (SharedProfile_studioProfile 1.0.0.1281012004128)
  Only one of the following can be installed at once:
    Zend Studio 8.0.0.v20100805 (com.zend.php.ide 8.0.0.v20100805)
    Zend Studio 8.0.0.v20100806 (com.zend.php.ide 8.0.0.v20100806)
  Cannot satisfy dependency:
    From: Shared profile 1.0.0.1281012004128 (SharedProfile_studioProfile 1.0.0.1281012004128)
    To: com.zend.php.ide [8.0.0.v20100805] 


If I start Eclipse using "Run as Administrator", then the product update process seems successful - there's no any error.
Comment 1 Jacek Pospychala CLA 2010-08-11 08:40:31 EDT
Our product is based on Helios.
I saw similar error in bug 315853 but scenario seems different there.
Could you please explain why this "SharedProfile" thing allows only one version of our product?
Comment 2 Jacek Pospychala CLA 2010-08-11 08:45:41 EDT
When using e.g. user home folder, instead of c:\Program files for the product installation, then update seems successful as well - no error message.
Comment 3 Ian Bull CLA 2010-08-11 17:42:54 EDT
This is actually by design, and I'm actually happy to see it working :-) (we've had lots of problems where this isn't working).

Here is the gist of what's going on.  

You have a number of plugins under c:\Program Files, and Eclipse can't write here because of UAC.  When you install add-ons (no upgrades, just extra bundles) they go in ~/.eclipse, a hidden folder under the users home directory.  However, we can't perform any 'updates' in this folder because you are in a shared install mode and it's assumed the admin will 'update' the base.

However, in some cases, an install will force an update (new plugin X depends on an update of Y).  In this case we can get into trouble, so we 'lock' the shared area so updates don't happen.  This is what you're hitting.

Now, this opens up some new questions, do you expect to update? In the past, the shared installs were more common on *nix environments, and the thinking is, you need to be an admin to 'update' the system.
Comment 4 Ian Bull CLA 2010-08-11 17:46:35 EDT
Jacek, for some more information see: 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=287246#c13
Comment 5 Jacek Pospychala CLA 2010-08-12 03:47:31 EDT
thanks for explanation Ian.
so you're saying that updates are impossible when shared pool is non-writeable?

It makes sense on *nix systems where user really has to make an effort ("su") to install Eclipse as root - it's fine to blame him for that :-) However on Windows with UAC privileges elevation is almost invisible (press "Yes" in this #*$&* dialog), so user will find it very difficult to resolve such issue. And UAC is becoming standard.

There's two things that could change in p2:
1. the error message could be saying something along the lines: "To perform updates you need Administrator privileges"
2. p2 could support privileges elevation, to get write permission to shared pool
Comment 6 Jacek Pospychala CLA 2010-08-12 04:39:02 EDT
I opened two bugs for issues mentioned in last comment:
Bug 322472 -  Don't be shy and warn about missing privileges
Bug 322477 -  Support for elevated privileges for updates in shared install

since this bug seems to fall into "work's as expected", feel free to close it accordingly.
Comment 7 Ian Bull CLA 2010-08-12 16:43:51 EDT
I completely agree with you Janek(In reply to comment #5)
> thanks for explanation Ian.
> so you're saying that updates are impossible when shared pool is non-writeable?
> 
Yep

> It makes sense on *nix systems where user really has to make an effort ("su")
> to install Eclipse as root - it's fine to blame him for that :-) However on
> Windows with UAC privileges elevation is almost invisible (press "Yes" in this
> #*$&* dialog), so user will find it very difficult to resolve such issue. And
> UAC is becoming standard.
> 
> There's two things that could change in p2:
> 1. the error message could be saying something along the lines: "To perform
> updates you need Administrator privileges"
> 2. p2 could support privileges elevation, to get write permission to shared
> pool

I really like option #2. In fact, I brought this up on the p2 mailing list last month ;) [1].  However, it's the summer, and we actually haven't had a p2 meeting in weeks.  Hopefully when everyone returns from vacation we can discuss this. Thanks for opening the other bugs.


[1] http://dev.eclipse.org/mhonarc/lists/p2-dev/msg03283.html