PengZheng opened a new issue, #688:
URL: https://github.com/apache/celix/issues/688
Our current API relies on bundle ID, which servers as a safe handle to
dynamic bundle objects.
Though the usage of bundle ID provides safety, it also brings inconvenience
to our users.
They have to traverse the list of installed bundles to find out ID of the
bundle they want to manipulate using location or symbolic name.
Another usability issue I found is that we don't support bundles with the
same symbolic name but of different versions:
```C
/*
* NOTE only allowing a single bundle with a symbolic name.
* OSGi spec allows same symbolic name and different versions, but this
is risky with
* the behaviour of dlopen when opening shared libraries with the same
SONAME.
*/
bool alreadyInstalled =
celix_framework_isBundleAlreadyInstalled(bundle->framework, symName);
if (alreadyInstalled) {
status = CELIX_BUNDLE_EXCEPTION;
fw_logCode(bundle->framework->logger, CELIX_LOG_LEVEL_ERROR, status,
"Cannot create module, bundle with symbolic name '%s' already installed.",
symName);
}
```
Suppose I want to programmatically install a bundle of the same symbolic
name as of an existing bundle but of a different version and it failed, what
can I do?
I have no idea of the conflicting symbolic name, since I can not have a look
at the logging messaging to find out what's wrong.
Neither can I find it out from a bundle not installed yet.
Without the conflicting symbolic name, I don't know which bundle to
uninstall first.
IIRC, `dlopen` can open libraries of the same soname but of different paths
on Linux.
I can't see why we don't support at the first place. Maybe it will cause
trouble on macOS?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]