ctron / package-drone

An OSGI first software artifact repository – Moved to the Eclipse Foundation
https://github.com/eclipse/packagedrone
Eclipse Public License 1.0
39 stars 13 forks source link

Including multiple versions of the same bundle in a generated feature #57

Closed larkery closed 9 years ago

larkery commented 9 years ago

Hello,

I have a channel with a generated feature containing its bundles - however, the feature only seems to require the first bundle with a given name that is present in the repository, according to whatever ordering is used when displaying (looks like by version number), so the one with the least version.

Would it be possible to amend the feature generator to require all bundles, including different versions, or even to have a policy about what kind of versions to include?

Thanks!

ctron commented 9 years ago

Actually that should not be. The feature should contain all bundles which are present in the channel. For this to work, these artifacts have to be detected as OSGi bundles, which is done by the OSGi aspect.

Do you have an example?

larkery commented 9 years ago

I can provide some screenshots of how it looks for me, if that helps:

screenshot - 190315 - 13 06 10 screenshot - 190315 - 13 06 29 screenshot - 190315 - 13 06 50

You can see there are two versions of uk.org.cse.nhm.bundle.impl (5.1.4.20150318180928430 and 5.1.4.20150318181048057) but only the first is in the generated feature.

ctron commented 9 years ago

This looks strange indeed. Could you do me a favor and look into the generated feature.xml. It could be a bug in the UI.

ctron commented 9 years ago

Ok, I can reproduce it. And for me the issue is in the UI. The feature.xmlfile looks fine.

ctron commented 9 years ago

So there is a fix which will be in the next version.

larkery commented 9 years ago

I find that the feature.xml matches what I see in the UI; at the moment is is this:

<requires size="4">
  <required name="uk.org.cse.nhm.bundle.impl" namespace="org.eclipse.equinox.p2.iu" range="[5.1.4.20150319180613408,5.1.4.20150319180613408]"/>
  <required name="uk.org.cse.nhm.manual" namespace="org.eclipse.equinox.p2.iu" range="[5.1.4.20150319182156790,5.1.4.20150319182156790]"/>
  <required name="nhm.platform.feature.jar" namespace="org.eclipse.equinox.p2.iu" range="[6.0.0.201503191822,6.0.0.201503191822]">
    <filter>(org.eclipse.update.install.features=true)</filter>
  </required>
  <required name="uk.org.cse.nhm.bundle-api" namespace="org.eclipse.equinox.p2.iu" range="[1.1.0,1.1.0]"/>
</requires>

Interestingly the required version of uk.org.cse.nhm.bundle.impl has changed to be the result of another deployment that's happened since I last wrote; however it still only has one version in, and there are three in the channel now.

ctron commented 9 years ago

Hm, this seems even stranger.

Can you select the parent (generator) of this artifact. Showing the details there should be a green "regenerate" button. This should regenerate the child artifacts. Just to check if this makes any difference.

larkery commented 9 years ago

I have clicked "regenerate" but it still has only the one version of the requirement. Here is a bit more about how it all fits together, which might help

ctron commented 9 years ago

I am currently in the process of releasing RC1 of 0.5.0, this contains the previously mentioned bug fix.

Maybe you can give it a try. I will take a few minutes though until it is uploaded.

larkery commented 9 years ago

OK, I will see how that works out, thanks

ctron commented 9 years ago

0.5.0 is released