[
https://issues.apache.org/jira/browse/SLING-8877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989636#comment-16989636
]
Konrad Windszus edited comment on SLING-8877 at 12/6/19 12:06 PM:
------------------------------------------------------------------
I thought some more about this, and indeed the OSGi spec is pretty clear about
the location
(https://osgi.org/javadoc/r6/core/org/osgi/framework/Bundle.html#getLocation())
staying fix during updates.
The {{RegisteredResource}} could be extended to also store the bundle location
for installed bundles. Usually that would be the same as the URL but in case of
updates this would point to the fixed bundle location (of the first
installation). That way one would be able to come up with URL Handlers for all
registered update handlers in the OSGi installer centrally.
Update: Came up with the implementation for this proposal in
https://github.com/apache/sling-org-apache-sling-installer-core/pull/4.
[~cziegeler] Can you have a look?
was (Author: kwin):
I thought some more about this, and indeed the OSGi spec is pretty clear about
the location
(https://osgi.org/javadoc/r6/core/org/osgi/framework/Bundle.html#getLocation())
staying fix during updates.
The {{RegisteredResource}} could be extended to also store the bundle location
for installed bundles. Usually that would be the same as the URL but in case of
updates this would point to the fixed bundle location (of the first
installation). That way one would be able to come up with URL Handlers for all
registered update handlers in the OSGi installer centrally.
> Register URL Handler for JCR Installer scheme (jcrinstall)
> ----------------------------------------------------------
>
> Key: SLING-8877
> URL: https://issues.apache.org/jira/browse/SLING-8877
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Affects Versions: Installer Core 3.9.0
> Reporter: Konrad Windszus
> Assignee: Konrad Windszus
> Priority: Major
> Fix For: Installer Core 3.9.2
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> As outlined in
> https://lists.apache.org/thread.html/7ee96284d6a35d75523ab73ed801d87f22507ce1e13dd05c6afa7308%401411908283%40%3Cusers.sling.apache.org%3E
> there is the edge case where the bundle location is being used to look up
> the original source code. To allow that in the context of bundles deployed
> via the JCR Installer, one should register a custom URL handler for scheme
> {{jcrinstall}} via the means of
> https://osgi.org/specification/osgi.core/7.0.0/service.url.html#d0e42987.
> Similarly for all other providers.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)