You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Pierre De Rop <pi...@gmail.com> on 2008/01/14 12:21:37 UTC

Problem with Assembly bundles/No Version

Hello everyone;

In my assembly bundle, I provide a "Assembly-Bundles" header without
specifying any version-range header.
I was thinking that, by doing do, the "Assembly installer" would try to
get  the latest version of bundles from the OBR.
However, it looks like the Assembly installer tries to load requrired
bundles with "version=0.0.0" from the OBR.

For instance:

MyAssembly.jar bundle contains:

Bundle-Version: 1.0.0
Assembly-Bundles: B1

However, when I try to deploy the MyAssembly.jar with the InstallerService,
I see that the InstallerServices uses the following filter, when
downloading B1.jar, from OBR:

*filter=(&(symbolicName=B1)(&(version>=0.0.0)(&(version<=0.0.1)(!(version=
0.0.1)))))*

In other words: the installerServices request a bundle B1 with version =
0.0.0 from the OBR !
Is it a bug ?

If this is a bug, then doing the following patch solve the problem:
in org.apache.sling.osgi.assembly.internal.BundleSpec.java, change the
initialization of the "version" attribute like this:

  private VersionRange version = VersionRange.DEFAULT; (line 110)
by
  private VersionRange version = null;

Doing so, the InstallerService will properly download the B1 bundle with the
following filter:

*filter=(symbolicName=B1)*

Re: Problem with Assembly bundles/No Version

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Pierre,

This is definitely a bug IMHO. May I ask you to create a JIRA for this,
such that we can track it ? Thanks a lot.

BTW: Your proposed fix is probably correct.

Thanks and Regards
Felix


Am Montag, den 14.01.2008, 12:21 +0100 schrieb Pierre De Rop:
> Hello everyone;
> 
> In my assembly bundle, I provide a "Assembly-Bundles" header without
> specifying any version-range header.
> I was thinking that, by doing do, the "Assembly installer" would try to
> get  the latest version of bundles from the OBR.
> However, it looks like the Assembly installer tries to load requrired
> bundles with "version=0.0.0" from the OBR.
> 
> For instance:
> 
> MyAssembly.jar bundle contains:
> 
> Bundle-Version: 1.0.0
> Assembly-Bundles: B1
> 
> However, when I try to deploy the MyAssembly.jar with the InstallerService,
> I see that the InstallerServices uses the following filter, when
> downloading B1.jar, from OBR:
> 
> *filter=(&(symbolicName=B1)(&(version>=0.0.0)(&(version<=0.0.1)(!(version=
> 0.0.1)))))*
> 
> In other words: the installerServices request a bundle B1 with version =
> 0.0.0 from the OBR !
> Is it a bug ?
> 
> If this is a bug, then doing the following patch solve the problem:
> in org.apache.sling.osgi.assembly.internal.BundleSpec.java, change the
> initialization of the "version" attribute like this:
> 
>   private VersionRange version = VersionRange.DEFAULT; (line 110)
> by
>   private VersionRange version = null;
> 
> Doing so, the InstallerService will properly download the B1 bundle with the
> following filter:
> 
> *filter=(symbolicName=B1)*