On Fri, Sep 3, 2010 at 1:31 AM, Yousouf, Shenol <s.yous...@sap.com> wrote: > Hello Hugues, > > Thank you for your answer ! Could you please tell me a little bit more about > this "bit of glue code added to the core.product" - what is it like and how > it works ?
It is really a case by case basis and an alternative to using p2.inf. For example: make a bundle in the base product that is auto-started. Have it track the installation of bundles with a custom manifest header: "my-auto-start". Trigger the start of those bundles. > > The trick which I found out for myself is to list the "extras" in a separate > product file and then attach the other product IU during the publishing > process via instructions from p2.inf file (more details here - > http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata ). Works like charm > if both products are in the same p2 repository ! :) If they are not, to > workaround the visibility problem between the two products, you can list the > repositories as childs of one composite repository and install from there. > > P2 has absolutely no problem to install product IUs which include other > product IUs as their requirements under specific conditions (i.e. nested > products). Unfortunately, currently there is no way to define such an IU > directly from product file except with "hacks" through p2.inf. This problem > can be viewed as an extension of another topic which I raised some time ago > when it turned out that .product files cannot also support the definition of > a mixed content of features and bundles inside them (again, p2.inf can > workaround this issue). > Thanks for the detailed explanation, Best, Hugues > > Best regards, > Shenny > > > -----Original Message----- > From: p2-dev-boun...@eclipse.org [mailto:p2-dev-boun...@eclipse.org] On > Behalf Of Hugues Malphettes > Sent: Thursday, September 02, 2010 6:16 PM > To: P2 developer discussions > Subject: Re: [p2-dev] Product definition as extension of another product > > Hi Yousouf, > > I was facing a similar situation: core.product, > core-with-extras.product where core-with-extras.product is core, some > new features and a couple bundles to start automatically. > > The best solution I found so far consists of eliminating the second 2 > product file. > > I re-factored this setup so that the "extras" are all described via a feature. > The extra bundles to be started are now enabled via a bit of glue code > added to the core.product. > This code is able to detect the extra bundles and start them early enough. > > I hope this helps. > Hugues. > > > On Thu, Sep 2, 2010 at 12:23 AM, Yousouf, Shenol <s.yous...@sap.com> wrote: >> Hi all, >> >> The following scenario sounds simple but I cannot find an elegant solution >> to implement it: >> I have a product A and now I need a product B which extends product A in the >> sense that it includes product A's IUs + some IUs of its own. However, it is >> well known that a p2 product definition can include only features xor >> bundles but cannot point to another product. (correct me if I am wrong) >> >> The obvious solution is to list product A's features in product B's >> definition. The disadvantage here is that any update in product A must be >> manually reflected into product B's definition. Could you point me to a more >> clean (build/publishing) procedure which will map changes in A automatically >> to B ? You can also assume that A and B should be published into two >> different p2 repositories. However, if this complicates the scenario too >> much, we can resort to the usage of one p2 repository only. >> >> Thanks in advance for any hints you can give me ! >> >> Best regards, >> Shenol Yousouf >> SAP Labs Bulgaria >> >> _______________________________________________ >> p2-dev mailing list >> p2-dev@eclipse.org >> https://dev.eclipse.org/mailman/listinfo/p2-dev >> >> > _______________________________________________ > p2-dev mailing list > p2-dev@eclipse.org > https://dev.eclipse.org/mailman/listinfo/p2-dev > _______________________________________________ > p2-dev mailing list > p2-dev@eclipse.org > https://dev.eclipse.org/mailman/listinfo/p2-dev > _______________________________________________ p2-dev mailing list p2-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/p2-dev