This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 201612 - honor resolution:=optional when creating catalogue entry from osgi bundle
Summary: honor resolution:=optional when creating catalogue entry from osgi bundle
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on: 201695 206365
Blocks:
  Show dependency tree
 
Reported: 2011-09-05 07:29 UTC by Tomas Stupka
Modified: 2012-11-07 16:17 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Stupka 2011-09-05 07:29:25 UTC
an osgi bundle is plainly listed in OpenIDE-Module-Module-Dependencies also when the according value in Require-Package is optional. 
The result is that in such a case it might be impossible to install a module even if all mandatory dependencies (as defined in the bundle manifest) are satisfied.
Comment 1 Tomas Stupka 2011-09-05 08:23:21 UTC
org.netbeans.nbbuild.VerifyUpdateCenter fails too
Comment 2 Tomas Stupka 2011-09-05 14:07:24 UTC
fixed in core-main #09d776d9da10 so that optional dependencies aren't added to the catalog for now, 
but we should consider using the OpenIDE-Module-Provides, OpenIDE-Module-Requires and OpenIDE-Module-Recommends tokens
Comment 3 Quality Engineering 2011-09-06 14:29:38 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/09d776d9da10
User: Tomas Stupka <tstupka@netbeans.org>
Log: issue #201612 - honor resolution:=optional when creating catalogue entry from osgi bundle
do not add optionally required bundles into catalog
Comment 4 Jesse Glick 2011-09-06 16:24:22 UTC
Ought to use OpenIDE-Module-Recommends, but this depends on issue #201695.
Comment 5 Jesse Glick 2011-09-06 16:25:08 UTC
The partial change made so far is potentially a regression, since JZlib might never be downloaded if the user did not already have it.
Comment 6 Tomas Stupka 2011-09-06 16:41:46 UTC
(In reply to comment #5)
> The partial change made so far is potentially a regression, since JZlib might
> never be downloaded if the user did not already have it.
if we just want jzlib being available for jsch then lets remove optional from the manifest. or is there more to it?
Comment 7 Jesse Glick 2011-09-06 21:02:03 UTC
(In reply to comment #6)
> if we just want jzlib being available for jsch then lets remove optional from
> the manifest. or is there more to it?

Not sure how it is being used. As I understand it, parts of JSch (compression) work when JZlib is available, but these parts are not necessarily used by clients.
Comment 8 Tomas Stupka 2011-11-04 10:38:25 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > The partial change made so far is potentially a regression, since JZlib might
> > never be downloaded if the user did not already have it.
> if we just want jzlib being available for jsch then lets remove optional from
> the manifest. or is there more to it?
removed optional - core-main #322109309ff9

this was originally filed as p2 because of the failing tests, but that problem is gone => p3
Comment 9 Quality Engineering 2011-11-05 03:01:07 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/322109309ff9
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #201612 - honor resolution:=optional when creating catalogue entry from osgi bundle

hotfix #09d776d9da10 caused that in the uc catalog is no dependency declared at all between jsch and jzlib. Even if it is only optional, for the need of netbeans it makes more sense to declare it as mandatory, so that jzlib will be always downloaded together with jsch.
Comment 10 Jaroslav Tulach 2012-11-06 10:40:15 UTC
Please verify whether implementation of bug 206365 helps with this issue. My guess is that it does.
Comment 11 Tomas Stupka 2012-11-07 16:17:43 UTC
verified.

Bundle-SymbolicName: org.eclipse.equinox.preferences; singleton:=true
Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)",org.eclipse.equinox.registry;bundle-version="[3.2.0,4.0.0)";resolution:=optional

<module codenamebase="org.eclipse.equinox.preferences" distribution="ide/org-eclipse-equinox-preferences.jar" downloadsize="113791" targetcluster="ide">
<manifest AutoUpdate-Show-In-Client="false" OpenIDE-Module="org.eclipse.equinox.preferences" OpenIDE-Module-Module-Dependencies="org.eclipse.equinox.common > 3.2.0" OpenIDE-Module-Name="Eclipse Preferences Mechanism" OpenIDE-Module-Specification-Version="3.4.2"/>
</module>