Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311769

Summary: In a shared installation, an install fails
Product: [Eclipse Project] Equinox Reporter: Tom Houser <tmhouser>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, john.arthorne, mjboyers, pquiring, simon_kaegi
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Tom Houser CLA 2010-05-05 13:49:52 EDT
In Eclipse 3.5, I noticed an issue with "Help -> Install New Software" when a read-only admin install is being used by non-admin users.

In Eclipse 3.6, I suspect the same issue will occur, but because of bug 311645, I can't get past step 4 in the repro scenario below.

In Eclipse 3.5, the scenario fails with this error:

An error occurred while configuring the installed items
  session context was:(profile=bootProfile, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Configure, operand=null --> [R]org.eclipse.equinox.p2.reconciler.dropins 1.0.100.v20090520-1905, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.MkdirAction).
  Could not create directory /opt/IBM/XYZ/dropins.

In Eclipse 3.4.2, the scenario is completely successful.

To reproduce on Linux:

1) As root, umask 022, install the latest IM 1.4 (see https://constellation.beaverton.ibm.com/cic/head/im/O/O.html).
2) Still as root, install the sample IES 3.5 offering at https://bluewhale.torolab.ibm.com/local/products/sample/35/repository, using all the defaults.
3) Login as a non-root user and execute the sample IES offering (e.g. launch "/opt/IBM/XYZ/eclipse" executable).
4) Click on "Help -> Install New Software...".
5) In the Install dialog, click on the "Add..." button.
6) In the Add Site dialog, specify https://w3kmwest.beaverton.ibm.com/capilano/QE-Tools/com.ibm.qetools.updatesite_4.1.8.v20100302 for the Location field and "QE Tools" for the Name field.  Click OK, and provide your credentials to the "Login required" dialog.
7) In the Install dialog, click the check box next to "QE Tools" and then click the Next button.
8) Click on the Finish button.
9) When the Security Warning dialog pops up warning you about unsigned content, click on OK.

Expected:
  Install should succeed and a dialog prompting you to restart eclipse should pop-up.
Actual:
  An error dialog pops up with the error message above in its Details.

Assuming the problem above is fixed, these are the remaining steps to successfully complete the scenario above:

11) Click on the button to restart eclipse.
12) Confirm the the QE Tools UI is now present in the Eclipse IDE.  Exit eclipse.
13) Login as another user and launch "/opt/IBM/XYZ/eclipse" executable again (use a different workspace too).  Confirm that the QE Tools UI is not present.

This should all succeed (as it does in Eclipse 3.4.2).

After bug 311645 is fixed, the scenario above should be re-run, this time using the sample IES 3.6 offering at https://bluewhale.torolab.ibm.com/local/products/sample/36/repository.

See also https://jazzop03.rtp.raleigh.ibm.com:9943/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/29215.
Comment 1 John Arthorne CLA 2010-05-05 15:33:19 EDT
Simpler steps, on windows (I used I20100504-0800)

1) Unzip Eclipse SDK into a new directory
2) Under properties for the folder, Deny "Write" permission under the security tab
3) Launch Eclipse SDK
4) Try to install something

Error occurs:

!ENTRY org.eclipse.equinox.p2.ui 4 0 2010-05-05 15:22:31.218
!MESSAGE Profile id _SELF_ is not registered.
!STACK 0
java.lang.IllegalArgumentException: Profile id _SELF_ is not registered.
	at org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest.createByProfileId(ProfileChangeRequest.java:49)
	at org.eclipse.equinox.p2.operations.InstallOperation.computeProfileChangeRequest(InstallOperation.java:68)
	at org.eclipse.equinox.p2.operations.ProfileChangeOperation.makeResolveJob(ProfileChangeOperation.java:158)
	at org.eclipse.equinox.p2.operations.ProfileChangeOperation.resolveModal(ProfileChangeOperation.java:113)
	at org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard$1.run(ProvisioningOperationWizard.java:206)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 2 John Arthorne CLA 2010-05-05 15:48:22 EDT
The previous steps only fail if you run as a UNC install:

 - Select the install folder, under properties, select "Sharing"
 - Select "Share this folder". Give the shared folder a name ("shared")
 - In Explorer type in the address bar \\<yourhostname>\shared
 - Now launch eclipse.exe from the UNC location.
Comment 3 John Arthorne CLA 2010-05-05 16:13:27 EDT
Since my particular problem only occurs when using UNC paths, I have entered a separate bug for it: bug 311789. It's quite possibly different from Tom's problem.
Comment 4 DJ Houghton CLA 2010-05-14 16:28:21 EDT
The work-around for the problem as described in comment #0 is to create the /opt/IBM/XYZ/dropins folder manually.
Comment 5 Tom Houser CLA 2010-05-19 17:31:22 EDT
In which 3.6 RC is this targeted to be fixed?
Comment 6 DJ Houghton CLA 2010-05-19 17:40:15 EDT
It is unclear if this is a bug in p2. There are open questions in the internal bug report which need to be answered in order to make further progress.
Comment 7 Tom Houser CLA 2010-05-19 18:04:27 EDT
What's an "internal" bug report?  Can you reference that?
Comment 8 Tom Houser CLA 2010-05-21 11:38:51 EDT
Ah, ok, thanks DJ for pointing me at the internal bug report.  I wasn't familiar with this, but now that you pointed it out to me I now see that Powell had already added a reference to the internal bug report in my capilano work item corresponding to this issue.  I overlooked that.

Anyways, given the explanation in the internal bug report, it does seem apparent that we'll need to work around the issue as suggested.

So this bug report can be closed.
Comment 9 DJ Houghton CLA 2010-05-22 07:52:14 EDT
Thanks, Tom.
Closing.
Comment 10 Mike Boyersmith CLA 2010-06-01 13:58:55 EDT
Tom can you point me to this internal work item? and the work around? were still seeing a mkdir issue with latest builds. 

see bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=306402