| Summary: | [test][operations] Problems with SynchronizeOperation API | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | DJ Houghton <dj.houghton> |
| Component: | p2 | Assignee: | Pascal Rapicault <pascal> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | djo, irbull, pascal, tjwatson, wallmarc |
| Version: | 3.7 | Flags: | dj.houghton:
review+
|
| Target Milestone: | Kepler | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
DJ Houghton
Created attachment 195442 [details]
Patch for the issue
The fix consists in setting the PROP_PROFILE_ROOT_IU property on the element so that the UserVisibleRootQuery query returns something.
I have debated doing this over returning all the IUs in the profile for removal (replace UserVisibleRootQuery by QueryUtil.ALL_UNITS) but PROP_PROFILE_ROOT_IU is set in other operations like InstallOperation so I followed this pattern.
I've released the patch. I assume DJ can give a sufficient review? No chance of this getting into 3.7? Is there anything I can do to make sure this makes 3.7? Thanks in advance. This has been fixed in on May 11th and is available in the I build since then. I've just kept this bug open to make sure I eventually write a test. Thanks Pascal. Pascal, I just downloaded the latest I-build and re-ran the TestSynchronizeOperation and it still fails for me the same way it did before (failure to download version fixture bundle version 4.0.0). Am I doing something wrong? I'm a bit surprised. Could you please attach the profile file form which the operation is triggered as well as the metadata for repository you are trying to install new content from. (and drop me a direct mail so I don't miss the update in the bug) Log file from the fixture: !SESSION 2011-05-31 11:37:22.313 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_23 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY test.app 1 0 2011-05-31 11:37:48.048 !MESSAGE Starting... !ENTRY test.app 1 0 2011-05-31 11:37:48.157 !MESSAGE Kicking off update !ENTRY test.app 1 0 2011-05-31 11:37:50.485 !MESSAGE Adding metadata repo at: http://localhost:8080/payload.site_4.0.0 !ENTRY test.app 1 0 2011-05-31 11:37:56.220 !MESSAGE Adding metadata repo at: file:///c:/temp/test.app/repository !ENTRY test.app 1 0 2011-05-31 11:37:56.954 !MESSAGE IUs in queried repositories: org.eclipse.equinox.simpleconfigurator.manipulator2.0.0.v20110502-1955 org.eclipse.equinox.util1.0.300.v20110502 org.eclipse.equinox.registry3.5.100.v20110502 org.eclipse.equinox.p2.touchpoint.natives1.0.300.v20110502-1955 tooling.org.eclipse.update.feature.default1.0.0 org.eclipse.rcp3.7.0.v201105250800 test.app.product1.0.0 org.eclipse.swt.win32.win32.x863.7.0.v3735a org.sat4j.core2.3.0.v20110329 org.eclipse.equinox.security1.1.0.v20110502 org.eclipse.equinox.p2.touchpoint.eclipse2.1.0.v20110511 org.eclipse.ecf3.1.300.v20110518-0313 org.eclipse.core.runtime3.7.0.v20110110 org.eclipse.update.core3.2.500.v20110330 org.eclipse.equinox.app1.3.100.v20110321 org.eclipse.equinox.ds1.3.0.v20110502 org.eclipse.ui.workbench3.7.0.I20110519-0100 tooling.osgi.bundle.default1.0.0 org.eclipse.equinox.p2.engine2.1.0.v20110511 org.eclipse.ecf.identity3.1.100.v20110518-0313 org.eclipse.osgi3.7.0.v20110524 org.eclipse.equinox.simpleconfigurator1.0.200.v20110502-1955 org.eclipse.equinox.p2.metadata.repository1.2.0.v20110511-1359 org.eclipse.core.runtime.compatibility.auth3.2.200.v20110110 org.eclipse.jface.databinding1.5.0.I20100907-0800 org.eclipse.equinox.p2.directorywatcher1.0.300.v20110502-1955 org.eclipse.ecf.filetransfer5.0.0.v20110518-0313 org.eclipse.equinox.p2.repository2.1.0.v20110510 org.eclipse.equinox.p2.artifact.repository1.1.100.v20110519 org.eclipse.ecf.provider.filetransfer.httpclient.ssl1.0.0.v20110518-0313 org.eclipse.equinox.p2.director2.1.0.v20110504-1715 org.eclipse.equinox.frameworkadmin.equinox1.0.300.v20110506 org.eclipse.help3.5.100.v20110426 org.eclipse.swt3.7.0.v3735a org.eclipse.core.jobs3.5.100.v20110404 toolingtest.app.product.configuration1.0.0 org.eclipse.osgi.services3.3.0.v20110513 toolingwin32.win32.x86org.eclipse.equinox.p2.reconciler.dropins1.0.0 org.eclipse.core.commands3.6.0.I20110111-0800 org.eclipse.rcp.feature.group3.7.0.v20110216-9DB5Fm1FpBGy_AJSxz-EcmdY org.apache.commons.codec1.3.0.v201101211617 test.app1.0.0.201105261530 toolingwin32.win32.x86org.eclipse.equinox.p2.touchpoint.natives1.0.0 org.eclipse.equinox.p2.operations2.1.0.v20110511-1821 org.eclipse.core.databinding.beans1.2.100.I20100824-0800 org.eclipse.core.net1.2.100.I20110511-0800 org.apache.commons.httpclient3.1.0.v201012070820 org.eclipse.jface3.7.0.I20110522-1430 org.eclipse.equinox.p2.garbagecollector1.0.200.v20110510 org.eclipse.equinox.launcher.win32.win32.x861.1.100.v20110502 test.app.feature.feature.jar1.0.0.201105261530 toolingwin32.win32.x86org.eclipse.core.runtime1.0.0 org.eclipse.rcp_root3.7.0.v20110216-9DB5Fm1FpBGy_AJSxz-EcmdY payload.feature.feature.jar4.0.0.201105042319 org.apache.commons.logging1.0.4.v201101211617 test.app.feature.feature.group1.0.0.201105261530 org.eclipse.rcp.feature.jar3.7.0.v20110216-9DB5Fm1FpBGy_AJSxz-EcmdY org.eclipse.core.expressions3.4.300.v20110228 org.eclipse.core.databinding.property1.4.0.I20110222-0800 org.sat4j.pb2.3.0.v20110329 org.eclipse.equinox.p2.publisher.eclipse1.0.0.v20110511 org.eclipse.equinox.p2.jarprocessor1.0.200.v20110502-1955 Default1.0.0.78--cljCo-773553C3A795K org.eclipse.equinox.frameworkadmin2.0.0.v20110502-1955 org.eclipse.ui3.7.0.I20110522-1430 org.eclipse.update.configurator3.3.100.v20100512 org.eclipse.equinox.launcher1.2.0.v20110502 payload.feature.feature.group4.0.0.201105042319 toolingwin32.win32.x86org.eclipse.equinox.p2.artifact.repository1.0.0 toolingorg.eclipse.equinox.launcher.win32.win32.x861.1.100.v20110502 config.a.jre.javase1.6.0 org.eclipse.core.databinding1.4.0.I20110111-0800 tooling.source.default1.0.0 org.eclipse.equinox.p2.transport.ecf1.0.0.v20110510 toolingtest.app.product.config.win32.win32.x861.0.0 com.ibm.icu4.4.2.v20110208 test.app.product_root.win32.win32.x861.0.0 toolingwin32.win32.x86org.eclipse.equinox.simpleconfigurator1.0.0 org.eclipse.equinox.preferences3.4.0.v20110502 org.eclipse.ecf.provider.filetransfer.httpclient4.0.0.v20110518-0313 org.eclipse.equinox.common3.6.0.v20110523 toolingtest.app.product_root.win32.win32.x861.0.0 toolingwin32.win32.x86org.eclipse.equinox.p2.transport.ecf1.0.0 toolingorg.eclipse.equinox.launcher1.2.0.v20110502 org.eclipse.equinox.p2.repository.tools2.0.100.v20110512-1320 org.eclipse.equinox.p2.reconciler.dropins1.1.100.v20110510 toolingwin32.win32.x86org.eclipse.equinox.common1.0.0 toolingwin32.win32.x86org.eclipse.update.configurator1.0.0 org.eclipse.equinox.p2.extensionlocation1.2.100.v20110510 a.jre.javase1.6.0 org.eclipse.core.contenttype3.4.100.v20110423-0524 org.eclipse.equinox.p2.core2.1.0.v20110502-1955 org.eclipse.equinox.p2.publisher1.2.0.v20110511 toolingwin32.win32.x86org.eclipse.equinox.ds1.0.0 org.eclipse.equinox.p2.metadata2.1.0.v20110510 payload4.0.0.201105042319 org.eclipse.ecf.provider.filetransfer3.2.0.v20110518-0313 org.eclipse.core.databinding.observable1.4.0.I20110222-0800 !ENTRY test.app 1 0 2011-05-31 11:38:02.079 !MESSAGE Ooops, got an error. Details after the break... !ENTRY org.eclipse.equinox.p2.operations 4 0 2011-05-31 11:38:02.095 !MESSAGE Operation details !SUBENTRY 1 org.eclipse.equinox.p2.director 4 1 2011-05-31 11:38:02.095 !MESSAGE Cannot complete the install because of a conflicting dependency. !SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE Software being installed: Feature 1.0.0.201105261530 (test.app.feature.feature.jar 1.0.0.201105261530) !SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE Software being installed: P2 test app 1.0.0 (test.app.product 1.0.0) !SUBENTRY 2 org.eclipse.equinox.p2.director 4 1 2011-05-31 11:38:02.095 !MESSAGE Only one of the following can be installed at once: !SUBENTRY 3 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE Feature 1.0.0.201105261530 (test.app.feature.feature.jar 1.0.0.201105261530) !SUBENTRY 3 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE Feature 1.0.0.201105311129 (test.app.feature.feature.jar 1.0.0.201105311129) !SUBENTRY 2 org.eclipse.equinox.p2.director 4 1 2011-05-31 11:38:02.095 !MESSAGE Cannot satisfy dependency: !SUBENTRY 3 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE From: Feature 1.0.0.201105311129 (test.app.feature.feature.group 1.0.0.201105311129) !SUBENTRY 3 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE To: test.app.feature.feature.jar [1.0.0.201105311129] !SUBENTRY 2 org.eclipse.equinox.p2.director 4 1 2011-05-31 11:38:02.095 !MESSAGE Cannot satisfy dependency: !SUBENTRY 3 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE From: P2 test app 1.0.0 (test.app.product 1.0.0) !SUBENTRY 3 org.eclipse.equinox.p2.director 4 0 2011-05-31 11:38:02.095 !MESSAGE To: test.app.feature.feature.group [1.0.0.201105311129] Created attachment 197022 [details]
Fixture profile registry
Created attachment 197023 [details]
Artifacts repository for the main platform
My understanding is that SynchronizeOperation needs a repo that contains *everything* in the current running platform PLUS whatever is needed to install/update. This is the artifact repo for the running platform (generated by Maven/Tycho and the P2 director during the same build as generated the executable fixture).
I currently pass this repo, plus a second repo containing the extra artifact to install as a CompoundQueryable. The second repo follows...
Created attachment 197024 [details]
Artifacts repository for the extra Feature I want to install
The artifact repos are not sufficient. I need the metadata repos. Please attach those asap.
> My understanding is that SynchronizeOperation needs a repo that contains
> *everything* in the current running platform PLUS whatever is needed to
> install/update.
It should not be the case.
Created attachment 197052 [details]
Metatdata repo for platform
Created attachment 197053 [details]
Metatdata repo for Feature/Bundle to install
Sorry; my bad. Correct files attached. Thanks Pascal. (In reply to comment #13) > > My understanding is that SynchronizeOperation needs a repo that contains > > *everything* in the current running platform PLUS whatever is needed to > > install/update. > It should not be the case. If I have foo.bar_2.0.0.20110327 installed and need to remove it, can I do that using SynchronizeOperation as you understand it? Using the profile and repo you attached I wrote and released the test case called SynchronizeOperationTest. As far as I can say everything works as expected. What I noticed though is that the repository attached only contains the IU for the payload.feature.feature.group and not the test.app.product which may explain why you are seeing some surprising behaviour since it will cause the test.app.product to be uninstalled and only have the payload.feature.feature.group to be installed. Leaving this bug open to add the test to the test suite and maybe move it to a more appropriate location (e.g. in the UI bundle). (In reply to comment #18) > What I noticed though is that the repository attached only contains the IU for > the payload.feature.feature.group and not the test.app.product.... Yep; its totally possible it's my bug. Thanks again for looking at this. I'll re-check my code. Move all 3.8 bugs to Juno. Overview: Still trying to get this to work. I've made progress but can't seem to find the exact query I need to simply update a product with one more feature, leaving everything else intact. The problem is that if I specify the product as a part of the query (to avoid uninstalling it), I get an error message from P2 and P2 aborts. The exact error I'm getting from P2 is: !ENTRY org.eclipse.equinox.p2.operations 4 0 2011-06-08 16:57:15.654 !MESSAGE Operation details !SUBENTRY 1 org.eclipse.equinox.p2.operations 4 10011 2011-06-08 16:57:15.654 !MESSAGE "P2 test app" is not applicable to the current configuration and will not be installed. !SUBENTRY 1 org.eclipse.equinox.p2.operations 1 10007 2011-06-08 16:57:15.654 !MESSAGE "P2 test app" cannot be fully uninstalled because other installed software requires it. The parts that are not required will be uninstalled. However if I remove the .product from the set of IUs I'm passing then the P2 operation succeeds in installing the new IU, but as you said, also uninstalls the product, resulting in a non-runnable installation. What's the secret sauce required to get P2 to accept the product? ;) Details: Here are the IUs I'm passing to SynchronizeOperation (the results of querying for IUs to install): Default1.0.0.78--cljCo-773553C3A795K test.app.product.executable.win32.win32.x861.0.0 payload.feature.feature.group4.0.0.201105042319 payload4.0.0.201105042319 payload.feature.feature.jar4.0.0.201105042319 test.app.product1.0.0 (If I don't pass the product.executable, it deletes the launcher; not what i want. Maybe this will be fixed when I get it to accept the product.) Here are the IUs in all the repositories (both the installed product and the available IUs): org.eclipse.equinox.util1.0.300.v20110502 org.eclipse.rcp_root3.7.0.v20110216-9DB5Fm1FpBGy_AJSy2FajiY org.eclipse.equinox.p2.touchpoint.natives1.0.300.v20110502-1955 org.eclipse.equinox.registry3.5.100.v20110502 org.eclipse.rcp.feature.group3.7.0.v20110216-9DB5Fm1FpBGy_AJSy2FajiY tooling.org.eclipse.update.feature.default1.0.0 org.eclipse.core.databinding.property1.4.0.I20110222-0800 test.app1.0.0.201106081656 org.eclipse.core.expressions3.4.300.v20110228 test.app.product1.0.0 org.eclipse.swt.win32.win32.x863.7.0.v3735a org.eclipse.rcp3.7.0.v201105261708 org.eclipse.equinox.p2.touchpoint.eclipse2.1.0.v20110511 org.eclipse.ecf3.1.300.v20110518-0313 org.eclipse.core.runtime3.7.0.v20110110 org.eclipse.equinox.app1.3.100.v20110321 org.eclipse.rcp.feature.jar3.7.0.v20110216-9DB5Fm1FpBGy_AJSy2FajiY org.eclipse.equinox.ds1.3.0.v20110502 tooling.osgi.bundle.default1.0.0 org.eclipse.ui.workbench3.7.0.I20110519-0100 org.eclipse.equinox.p2.engine2.1.0.v20110511 test.app.feature.feature.group1.0.0.201106081656 org.eclipse.ecf.identity3.1.100.v20110518-0313 test.app.product.executable.win32.win32.x86.eclipse1.0.0 test.app.feature.feature.jar1.0.0.201106081656 toolingtest.app.product.application1.0.0 org.eclipse.update.configurator3.3.100.v20100512 org.eclipse.osgi3.7.0.v20110524 org.eclipse.equinox.p2.metadata.repository1.2.0.v20110511-1359 org.eclipse.equinox.simpleconfigurator1.0.200.v20110502-1955 org.eclipse.equinox.launcher1.2.0.v20110502 org.eclipse.core.runtime.compatibility.auth3.2.200.v20110110 org.eclipse.jface.databinding1.5.0.I20100907-0800 toolingwin32.win32.x86org.eclipse.equinox.p2.artifact.repository1.0.0 org.eclipse.ecf.filetransfer5.0.0.v20110518-0313 config.a.jre.javase1.6.0 org.eclipse.equinox.p2.artifact.repository1.1.100.v20110519 org.eclipse.equinox.p2.transport.ecf1.0.0.v20110510 tooling.source.default1.0.0 org.eclipse.core.databinding1.4.0.I20110111-0800 org.eclipse.ecf.provider.filetransfer.httpclient.ssl1.0.0.v20110518-0313 toolingtest.app.product.config.win32.win32.x861.0.0 com.ibm.icu4.4.2.v20110208 toolingwin32.win32.x86org.eclipse.equinox.simpleconfigurator1.0.0 org.eclipse.ecf.provider.filetransfer.httpclient4.0.0.v20110518-0313 org.eclipse.help3.5.100.v20110426 org.eclipse.equinox.preferences3.4.0.v20110502 org.eclipse.equinox.common3.6.0.v20110523 toolingwin32.win32.x86org.eclipse.equinox.p2.transport.ecf1.0.0 org.eclipse.core.jobs3.5.100.v20110404 org.eclipse.swt3.7.0.v3735a org.eclipse.equinox.p2.repository.tools2.0.100.v20110512-1320 org.eclipse.osgi.services3.3.0.v20110513 toolingtest.app.product.configuration1.0.0 org.eclipse.core.commands3.6.0.I20110111-0800 toolingtest.app.product.executable.win32.win32.x861.0.0 org.apache.commons.codec1.3.0.v201101211617 toolingwin32.win32.x86org.eclipse.equinox.p2.touchpoint.natives1.0.0 toolingwin32.win32.x86org.eclipse.equinox.common1.0.0 org.eclipse.equinox.p2.operations2.1.0.v20110511-1821 org.eclipse.core.databinding.beans1.2.100.I20100824-0800 toolingwin32.win32.x86org.eclipse.update.configurator1.0.0 org.apache.commons.httpclient3.1.0.v201012070820 org.eclipse.jface3.7.0.I20110522-1430 a.jre.javase1.6.0 org.eclipse.equinox.p2.repository2.1.0.v20110525 org.eclipse.core.contenttype3.4.100.v20110423-0524 org.eclipse.equinox.p2.core2.1.0.v20110502-1955 org.eclipse.equinox.launcher.win32.win32.x861.1.100.v20110502 toolingwin32.win32.x86org.eclipse.equinox.ds1.0.0 toolingwin32.win32.x86org.eclipse.core.runtime1.0.0 test.app.product.executable.win32.win32.x861.0.0 org.eclipse.equinox.p2.metadata2.1.0.v20110510 org.eclipse.ecf.provider.filetransfer3.2.0.v20110518-0313 org.eclipse.ui3.7.0.I20110526-0100 org.eclipse.core.databinding.observable1.4.0.I20110222-0800 I've updated the test case at: https://github.com/pieceoftheloaf/SynchronizeOperation to reproduce the behavior I'm seeing (in comment 22). Right now it _has_ to run on win32. As before, to see the behavior, simply checkout and run 'mvn clean install' from the "releng" folder. I'm happy to help, but running a complete build like that is not practical for me. The first time I did it was super long/painful to debug because it forks processes left and right and I had to debug the build in order to figure out the processes of interest. Sorry but this does not scale for me with my other commitments. Please provide a more contained example. Thx. There is a small test example for sync operation in SynchronizeOperationTest. Also attaching the profile and the repo could help. Any progress on this or any known workarounds? I get the same error output as in https://bugs.eclipse.org/bugs/show_bug.cgi?id=345284#c22 when trying to use SyncronizeOperation (similar setup as in https://github.com/pieceoftheloaf/SynchronizeOperation/blob/master/webapps/root/test.app/src/test/app/Application.java) 2012:01:26:14:39:03:INFO :P2Synchronize:Kicking off update 2012:01:26:14:39:03:INFO :P2Synchronize:Synch repos: http://localhost 2012:01:26:14:39:03:INFO :P2Synchronize:Adding metadata repo at: http://localhost 2012:01:26:14:39:03:INFO :P2Synchronize:Everything to synchronize: 2012:01:26:14:39:03:INFO :P2Synchronize:IUs: org.eclipse.equinox.p2.core.feature.feature.group1.0.1.R37x_v20110906-8290FZ3FUqIcLqkVkEaTdn_14C7G org.eclipse.equinox.p2.extras.feature.feature.group1.0.1.R37x_v20110906-7A4FD4DiVOManqZttPtXz0lWlFbU org.eclipse.rcp.feature.group3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A org.eclipse.equinox.p2.user.ui.feature.group2.1.2.R37x_v20110815-1155-6-Bj9JXOeQxOURYC-l9BL7rDEQO7 com.myapp.rcpclient.feature.feature.group1.6.0.201201261429 com.myapp.rcpclient.product1.6.0.201201261429 org.eclipse.equinox.p2.rcp.feature.feature.group1.0.1.R37x_v20110906-782EpBqNKGUkZQpuT8hAlWlFbUeo com.myapp.rcpclient.product_1.6.0.201201261429 2012:01:26:14:39:04:INFO :P2Synchronize:Ooops, got an error. Details after the break... 2012:01:26:14:39:04:INFO :P2Synchronize:Status ERROR: org.eclipse.equinox.p2.operations code=0 Operation details null ch ildren=[Status ERROR: org.eclipse.equinox.p2.operations code=10011 "MyProduct" is not applicable to the current configuration and will not be installed. null Status INFO: org.eclipse.equinox.p2.operations code=10007 "MyProduct" cannot be fully uninstal led because other installed software requires it. The parts that are not required will be uninstalled. null] My running product and feature have the same versions as in the repository (both built using tycho eclipse-repository) so no update should even be required. (In reply to comment #26) Never mind this. I got around the problem by using a more recent platform build. There's a suggestion here (https://bugs.eclipse.org/bugs/show_bug.cgi?id=337016#c55) that there are problems in 3.7.0 and 3.7.1 (which I was using). When downloading the latest maintenance build (eclipse-platform-SDK-M20120118-0800-win32) it started working. I'll put this on Kepler since there is a patch here, but I'm not experienced enough in the operation manager to make a call. Pascal, any thoughts? Nothing left to be done here. The remaining problems have been addressed in 3.7.x. |