Community
Participate
Working Groups
Build Identifier: I20100603-1500 When publishing a product which contains a single feature with a single binary artifact and no bundles, using the product publisher application, and then trying to install with p2 director, the installation fails with message: “Missing requirement: tooling.osgi.bundle.default 1.0.0 requires 'org.eclipse.equinox.p2.eclipse.type bundle 0.0.0' but it could not be found” Reproducible: Always Steps to Reproduce: 1. Create an empty feature project. Let’s name the feature “ziptest” as a reference for the instructions below. 2. Create a folder inside the feature project and put some files inside. 3. Replace the contents of the build.properties file inside the feature project with the following line: root=<folder> where <folder> is the name of the folder created in point 2. 4. Open feature.xml file and modify the <data> XML tag to look like this: <data id="build.properties" download-size="0" install-size="0"/> If <data> XML tag does not exist, add it. 5. Export the feature. 6. Create a product file which contains only the feature. For a feature named “ziptest” it should look like the attached file "ziptest.product ". 7. Run the product publisher application from the IDE with the following parameters: -ar file:/<file path to exported repo> -mr file:/<file path to exported repo> -productFile <file path to product file> -append -flavor tooling -configs win32.win32.x86 After –ar and –mr you should point to the file location where you exported the feature in point 5. 8. Run the p2 director application inside the IDE with the following parameters: -repository file:/<file path to exported repo> -installIU <product ID> -destination <installation location> -profile <profile name> -bundlepool <installation location> Where <file path to exported repo> is the same as in point 7, <product ID> is the ID of the product (specified as value of uid attribute of “product” XML element inside the .product file), <installation location> is file path you wish your product to be installed into and <profile name> is a random String. 9. Notice that installation fails with a message for a missing requirement. Sample repository to reproduce from: Attached "ziptest_repo.zip"
Created attachment 174620 [details] Sample product which doesn't contain bundles
Created attachment 174621 [details] Sample repository to install product from
Here are some findings which provides additional information about that issue: The reason for the issue is that "tooling.osgi.bundle.default" IU is always generated as a configuration unit for the existing repository. Bundles satisfy the requirements of this configuration unit. However, if the repository contains no bundles, as in our case, this requirement cannot be fulfilled. In the course of the product publishing process, there is a set of default actions generated in ProductActions.createActions() which create the configuration units no matter what is included in the product. A possible fix could refine the set of actions based on contents of the repository over which the product publisher operates. There is a workaround: Add an empty bundle to the feature and republish it again.
There may be other IUs that should not be installed in this case. There is the a.jre IU.
Created attachment 177009 [details] tooling.osgi.bundle.default marked as optional There are a few tooling.* configuration units which the Product Publisher always generates in the repository in order to provide touchpoint instructions for the installation of bundles, features and sources for the artifacts of the respective type. The CUs declare requirements which attach them to the IUs of the particular type. However, the requirements for features and source bundles are defined as optional because it is entirely possible that the repository does not contain such kinds of artifacts and the requirements would not be met if mandatory. The bug report gives an example when the repository may not include a standard bundle item too. In the context of the described use case, the proposed patch follows the rationale of the optional features and source bundles requirements and declares the bundle requirement in the default bundle configuration unit (“tooling.osgi.bundle.default”) as optional too
I happend to have the same proble with a product including one plugin. Actually we have a headless pde build to build our features. I have published p2 metadata and artifacts using org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher and then have tried to publish a product defining one feature that contains 1 plugin and many features. then i tryed to install that product IU and got the same error message : Missing requirement: tooling.osgi.bundle.default 1.0.0 requires 'org.eclipse.equinox.p2.eclipse.type bundle 0.0.0' but it could not I there any workaround or should I install the patch ?
(In reply to comment #6) > I happend to have the same proble with a product including one plugin. > ... > I there any workaround or should I install the patch ? Did you try the workaround suggested at the end of comment #3 ?
I you read my first comment you'll notice I am already in the comment #3 workaround configuration which suggest to have at least one plugin in the feature which is my case.
Making the dependency to tooling.osgi.bundle.default optional, as proposed in Kaja's patch, could in fact solve the problem. Nevertheless, I would like to see an automated test verifying this. This test would require chaining the ProductAction with a planner. However I haven't seen this done elsewhere in the p2 test suite. Are there any reasons that speak against this approach?
> Nevertheless, I would like to see an automated test verifying this. This test > would require chaining the ProductAction with a planner. However I haven't seen > this done elsewhere in the p2 test suite. Are there any reasons that speak > against this approach? The only reason is we tried to keep the tests isolated. The planner has plenty of tests on optional dependencies, and we have the publisher test. In this case I think that a test that validates the behaviour of BundlesAction should suffice. But if you want to write something more complex, I don't see any issue. Just persist your IU, create a profile and plan (there are plenty of example of this latter part in the planner tests).
(In reply to comment #10) > The only reason is we tried to keep the tests isolated. The planner has plenty > of tests on optional dependencies, and we have the publisher test. In this case > I think that a test that validates the behaviour of BundlesAction should > suffice. Is there a test for an optional dependency on an IU fragment? I think this is quite a tricky case, and we should verify that the patch doesn't break the product publisher alltogether. > But if you want to write something more complex, I don't see any issue. > Just persist your IU, create a profile and plan (there are plenty of example of > this latter part in the planner tests). @Katja: Could you please provide a test that creates a provisioning plan from the publisher result of the ProductAction?
Move all 3.8 bugs to Juno.
Guys, I'm trying to adopt Eclipse 38 M6, but I'm having a similar issue with my app. In my case I do have always bundles; although I've tried your workaroung but I did not have success. Here's my log file: While I run product with the following command I got a problem during the P2 installation: !SESSION 2012-03-27 12:03:10.308 ----------------------------------------------- eclipse.buildId=I20120314-1800 java.fullversion=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223ifx-20110203 (JIT enabled) J9VM - 20110202_74536_lHdSMr JIT - 20100623_16197ifx3_r8 GC - 20100211_AA BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Framework arguments: -application org.eclipse.equinox.p2.director -metadataRepository file:/build/root/metadata/ies/38/T/T38I20120327_20120327_1153/p2/repository/linux.gtk.x86 -artifactRepository file:/build/root/metadata/ies/38/T/T38I20120327_20120327_1153/p2/repository/linux.gtk.x86 -installIU bootstrap/1.3.1.38I20120327 -destination /build/root/metadata/ies/38/T/T38I20120327_20120327_1153/p2/bootstrap.gtk.linux.x86 -profile bootProfile -profileProperties org.eclipse.update.install.features=true -p2.os linux -p2.ws gtk -p2.arch x86 Command-line arguments: -application org.eclipse.equinox.p2.director -metadataRepository file:/build/root/metadata/ies/38/T/T38I20120327_20120327_1153/p2/repository/linux.gtk.x86 -artifactRepository file:/build/root/metadata/ies/38/T/T38I20120327_20120327_1153/p2/repository/linux.gtk.x86 -installIU bootstrap/1.3.1.38I20120327 -destination /build/root/metadata/ies/38/T/T38I20120327_20120327_1153/p2/bootstrap.gtk.linux.x86 -profile bootProfile -profileProperties org.eclipse.update.install.features=true -p2.os linux -p2.ws gtk -p2.arch x86 !ENTRY org.eclipse.equinox.p2.director 4 1 2012-03-27 12:03:16.667 !MESSAGE Cannot complete the install because one or more required items could not be found. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2012-03-27 12:03:16.667 !MESSAGE Software being installed: bootstrap 1.3.1.38I20120327 (bootstrap 1.3.1.38I20120327) !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2012-03-27 12:03:16.667 !MESSAGE Missing requirement: tooling.osgi.bundle.default 1.0.0 requires 'org.eclipse.equinox.p2.eclipse.type bundle 0.0.0' but it could not be found !SUBENTRY 1 org.eclipse.equinox.p2.director 4 1 2012-03-27 12:03:16.667 !MESSAGE Cannot satisfy dependency: !SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2012-03-27 12:03:16.668 !MESSAGE From: bootstrap 1.3.1.38I20120327 (bootstrap 1.3.1.38I20120327) !SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2012-03-27 12:03:16.668 !MESSAGE To: tooling.osgi.bundle.default [1.0.0] ----------------------- NOTE: My application worked fine adopting Eclipse 38 M5. Any help would be greatly appreciated.
(In reply to comment #11) > Could you please provide a test that creates a provisioning plan from > the publisher result of the ProductAction? I didn't receive the requested test case. Returning to inbox.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.