Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342156 - p2 director ignored bundlepool when using -roaming
Summary: p2 director ignored bundlepool when using -roaming
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL: http://alblue.bandlem.com/2011/04/mul...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 09:38 EDT by Paul Webster CLA
Modified: 2011-06-10 10:45 EDT (History)
4 users (show)

See Also:


Attachments
patch (1.53 KB, patch)
2011-04-08 14:56 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2011-04-07 09:38:06 EDT
I ran 2 installs from a mirror of http://download.eclipse.org/eclipse/updates/3.6.



$ECLIPSE362 -application org.eclipse.equinox.p2.director -noSplash -bundlepool /opt/local/eclipse/dirExp/eclipse -shared /opt/local/eclipse/dirExp/eclipse/p2 -destination /opt/local/eclipse/dirExp/eclipse/win32_win32_x86 -profile SDKProfile_win32_win32_x86 -profileProperties org.eclipse.update.install.features=true -p2.os win32 -p2.ws win32 -p2.arch x86 -roaming -repository file:///opt/local/eclipse/dirExp/eclipseRepo -installIUs org.eclipse.sdk.ide

$ECLIPSE362 -application org.eclipse.equinox.p2.director -noSplash -bundlepool /opt/local/eclipse/dirExp/eclipse -shared /opt/local/eclipse/dirExp/eclipse/p2 -destination /opt/local/eclipse/dirExp/eclipse/linux_gtk_x86_64 -profile SDKProfile_linux_gtk_x86_64 -profileProperties org.eclipse.update.install.features=true -p2.os linux -p2.ws gtk -p2.arch x86_64 -roaming -repository file:///opt/local/eclipse/dirExp/eclipseRepo -installIUs org.eclipse.sdk.ide

I expected all of the plugins in /opt/local/eclipse/dirExp/eclipse, but they were installed in /opt/local/eclipse/dirExp/eclipse/win32_win32_x86 and /opt/local/eclipse/dirExp/eclipse/linux_gtk_x86_64 respectively, complete with duplication.

PW
Comment 1 Jeff McAffer CLA 2011-04-07 10:06:42 EDT
you were using 3.6.2 right?
Comment 2 Paul Webster CLA 2011-04-07 11:14:51 EDT
(In reply to comment #1)
> you were using 3.6.2 right?

Right,org.eclipse.sdk.ide=3.6.2.M20110210-1200

PW
Comment 3 Andrew Niefer CLA 2011-04-08 14:07:01 EDT
This worked for me when I tried it on the latest 3.7
Comment 4 Andrew Niefer CLA 2011-04-08 14:15:53 EDT
I think this is related to the -roaming, I didn't have that in my test.

By inspection, DirectorApplication#updateRoamingProperties looks suspicious, it will change the PROP_CACHE (ie the bundlepool) to the destination.  I think it needs to consider the bundle pool here.

Work around is to not specify -roaming, this will make it so the resulting install is not able to be moved around after the fact.
Comment 5 Andrew Niefer CLA 2011-04-08 14:56:17 EDT
Created attachment 192869 [details]
patch

Patch uses the same logic as when the PROP_CACHE was set initially.
Comment 6 Paul Webster CLA 2011-04-08 15:08:03 EDT
OK, with no -roaming I have the same results.

eclipse.p2.data.area=file\:/opt/local/eclipse/dirExp37/eclipse/p2/ gets the absolute path, but my platform version launches no problem.

PW
Comment 7 Andrew Niefer CLA 2011-04-13 17:02:22 EDT
I released this patch.
Comment 8 Paul Webster CLA 2011-04-28 08:23:42 EDT
With this fix, the bundle pool is now indeed shared.

But -roaming is still broken, as there are absolute paths in the eclipse.ini and configuration/config.ini:

eclipse.p2.data.area=file\:/opt/local/eclipse/I20110427-1300/target/p2

In a normal install:
eclipse.p2.data.area=@config.dir/../p2/

PW
Comment 9 Paul Webster CLA 2011-04-28 08:24:46 EDT
-install
/opt/local/eclipse/I20110427-1300/target/linux_gtk_x86_64
is the extra eclipse.ini line that is written.

Should I open a new bug?

PW
Comment 10 Paul Webster CLA 2011-04-28 11:55:57 EDT
I opened bug 344155 and bug 344153

PW