Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] p2 director: commands with -verifyOnly require write access to destination

Hey,

The locking happens when we are loading the profile. Probably just to make sure that we are indeed loading the last one and prevent other writes. That said, given that the install is read only, the director should figure out that and do something about it (maybe just stop early and cleanly, or create a configuration in the ~/.eclipse/ like it would at runtime).

Please open a bug about this,

Pascal

On 09/16/2013 03:26 AM, Mikhail Kalkov wrote:
Hi p2 masters,

I've just tried to run these two commands (with and without -verifyOnly) but got an error message in both cases.
eclipse-platform -nosplash -application org.eclipse.equinox.p2.director -destination /path/to/readonly/targeteclipse -listInstalledRoots
eclipse-platform -nosplash -application org.eclipse.equinox.p2.director -destination /path/to/readonly/targeteclipse -listTags
!ENTRY org.eclipse.osgi 4 0 2013-09-13 15:36:25.612
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Profile not locked due to exception: /path/to/readonly/targeteclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.cpp.profile/.lock (Permission denied)
         at org.eclipse.equinox.internal.p2.engine.ProfileLock.lock(ProfileLock.java:106)
         at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.restore(SimpleProfileRegistry.java:502)
         at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.getProfileMap(SimpleProfileRegistry.java:338)
         at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.internalGetProfile(SimpleProfileRegistry.java:248)
         at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.getProfile(SimpleProfileRegistry.java:178)
         at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.getProfile(DirectorApplication.java:479)
         at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.initializeProfile(DirectorApplication.java:483)
         at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performListInstalledRoots(DirectorApplication.java:1317)
         at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1067)
         at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:1245)

Actually, before running the two commands above I tried running the following one and it failed with the same message.
eclipse-platform -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/juno,http://plantuml.sourceforge.net/updatesite -installIU net.sourceforge.plantuml.feature.feature.group -verifyOnly -destination /path/to/readonly/targeteclipse
Shouldn't the use of -verifyOnly as well as -listInstalledRoots and -listTags mean that nothing gets written to the destination? And if locking is necessary in order to avoid concurrent changes to the profile, why does the following command work? Is p2 data area copied, linked or something else happens?
/path/to/readonly/targeteclipse -nosplash -application org.eclipse.equinox.p2.director -listInstalledRoots -configuration usercgfarea
Kind regards,
Mikhail Kalkov

Purple Scout AB
Software Developer

Address: Kyrkogatan 20-22, SE-41110 Gothenburg, Sweden
Phone:   +46 (0) 732 - 051405
E-mail:  mikhail.kalkov@xxxxxxxxxxxxxx
Web:     www.purplescout.se
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev



Back to the top