You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Grzegorz Grzybek <gr...@gmail.com> on 2014/02/18 12:19:56 UTC

Transitive feature/bundle dependencies

Hello

I have such case:

feature one:

    <feature name='jclouds-rackspace-cloudblockstorage-us' resolver='(obr)'>
        <feature
version='1.6.2-incubating'>jclouds-api-openstack-cinder</feature>
        <feature
version='1.6.2-incubating'>jclouds-api-rackspace-cloudidentity</feature>

<bundle>mvn:org.apache.jclouds.provider/rackspace-cloudblockstorage-us/1.6.2-incubating</bundle>
    </feature>

which depends on feature two:

    <feature name="jclouds-api-rackspace-cloudidentity"
description="Rackspace Cloud Identity API" version="1.6.2-incubating"
resolver="(obr)">
        <feature version='1.6.2-incubating'>jclouds-compute</feature>
        <feature
version='1.6.2-incubating'>jclouds-api-openstack-keystone</feature>
        <bundle
dependency='true'>mvn:org.apache.jclouds.api/rackspace-cloudidentity/1.6.2-incubating</bundle>
    </feature>

the problem is that when I install feature one, then:
 - when it comes to installing "jclouds-api-rackspace-cloudidentity",
bundle "rackspace-cloudidentity" isn't installed because the feature has
@resolver set and the bundle is dependency="true"
 - when it returns to installing "jclouds-rackspace-cloudblockstorage-us",
the feature isn't correctly resolved because it's bundle
"rackspace-cloudblockstorage-us" requires (by package) bundle
"rackspace-cloudidentity"

I think that the dependency="true" bundles should be available "up the
chain", so the bundles from "upper features" are correctly resolved.

This should be easy to propagate these dependencies... Any problems? I
could provide a patch.

regards
Grzegorz Grzybek

Re: Transitive feature/bundle dependencies

Posted by Guillaume Nodet <gn...@apache.org>.
I agree, I think the feature is broken, as the bundle should not be flagged
as dependency = true if it's supposed to be installed.

Currently, the resolvers we have always resolve bundles feature by feature,
i.e. the resolver is only used to compute the bundles needed for a given
feature, and not as a whole.
I think that's ok, though at some point, I'd like to think about
introducing an enhanced resolver (using the real osgi resolver) that could
actually resolve features in a single pass, in which case, the dependencies
bundle would be transitive dependencies.

Guillaume


2014-02-24 9:45 GMT+01:00 Grzegorz Grzybek <gr...@gmail.com>:

> Hello
>
> I come to conclusion, that rather the feature definition below is
> incorrect, not the feature:install command:
>
> If someone wants to install this feature *alone*, he/she would end up with
> installed feature, but *not* with installed bundle:
>
>     <feature name="jclouds-api-rackspace-
> cloudidentity" description="Rackspace Cloud Identity API"
> version="1.6.2-incubating" resolver="(obr)">
>         <feature version='1.6.2-incubating'>jclouds-compute</feature>
>         <feature
> version='1.6.2-incubating'>jclouds-api-openstack-keystone</feature>
>         <bundle
>
> dependency='true'>mvn:org.apache.jclouds.api/rackspace-cloudidentity/1.6.2-incubating</bundle>
>     </feature>
>
> so I think it's better to change the feature definition, not the loader
> process.
> By the way: it's related to https://issues.jboss.org/browse/ENTESB-1209
>
> regards
> Grzegorz Grzybek
>
>
> 2014-02-18 12:55 GMT+01:00 Ioannis Canellos <io...@gmail.com>:
>
> > I think that the original intention was not to have the dependency
> > attribute on jclouds-api-rackspace-cloudidentity. Most probably this
> > was a side effect of splitting a feature into multiple features.
> >
> > Of course, the problem that you describe may apply to other cases too.
> > So, I think that the change you propose makes sense.
> >
> > Other thoughts?
> >
> > --
> > Ioannis Canellos
> >
> > Blog: http://iocanel.blogspot.com
> > Twitter: iocanel
> >
>

Re: Transitive feature/bundle dependencies

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Hello

I come to conclusion, that rather the feature definition below is
incorrect, not the feature:install command:

If someone wants to install this feature *alone*, he/she would end up with
installed feature, but *not* with installed bundle:

    <feature name="jclouds-api-rackspace-
cloudidentity" description="Rackspace Cloud Identity API"
version="1.6.2-incubating" resolver="(obr)">
        <feature version='1.6.2-incubating'>jclouds-compute</feature>
        <feature
version='1.6.2-incubating'>jclouds-api-openstack-keystone</feature>
        <bundle
dependency='true'>mvn:org.apache.jclouds.api/rackspace-cloudidentity/1.6.2-incubating</bundle>
    </feature>

so I think it's better to change the feature definition, not the loader
process.
By the way: it's related to https://issues.jboss.org/browse/ENTESB-1209

regards
Grzegorz Grzybek


2014-02-18 12:55 GMT+01:00 Ioannis Canellos <io...@gmail.com>:

> I think that the original intention was not to have the dependency
> attribute on jclouds-api-rackspace-cloudidentity. Most probably this
> was a side effect of splitting a feature into multiple features.
>
> Of course, the problem that you describe may apply to other cases too.
> So, I think that the change you propose makes sense.
>
> Other thoughts?
>
> --
> Ioannis Canellos
>
> Blog: http://iocanel.blogspot.com
> Twitter: iocanel
>

Re: Transitive feature/bundle dependencies

Posted by Ioannis Canellos <io...@gmail.com>.
I think that the original intention was not to have the dependency
attribute on jclouds-api-rackspace-cloudidentity. Most probably this
was a side effect of splitting a feature into multiple features.

Of course, the problem that you describe may apply to other cases too.
So, I think that the change you propose makes sense.

Other thoughts?

-- 
Ioannis Canellos

Blog: http://iocanel.blogspot.com
Twitter: iocanel