[ 
https://issues.apache.org/jira/browse/SLING-2567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438552#comment-13438552
 ] 

Felix Meschberger commented on SLING-2567:
------------------------------------------

I think the current implementation has a number of flaws:
  * It uses the Import-Package header which may or may not reflect the actual 
reality of wiring, particularly in light of dynamic and optional imports
  * Its in a separate class. This is IMHO overkill and cannot be justified by 
testing.

As for the first issue, I think we should leverage the 
PackageAdmin.getExportedPackages(Bundle) method:

 1. have the list of bundles to update
 2. get ExportedPackage instances for each these bundles
 3. get the importing bundles of these ExportedPackage instances
 4. get ExportedPackage instances for each of these new bundles
 5. get the importing bundles and there ExportedPackage etc. etc.
 6. until either the Installer is visited or no more un-visited bundles show up 

This mechanism follows the actual and current wiring of the bundles and thus 
should hit the Installer if required.
                
> PABundleRefresher.isInstallerBundleAffected() does not seem to work in all 
> cases
> --------------------------------------------------------------------------------
>
>                 Key: SLING-2567
>                 URL: https://issues.apache.org/jira/browse/SLING-2567
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>    Affects Versions: Installer Core 3.3.8
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: bundles-to-refresh.txt
>
>
> I'll attach a list of bundles that, in my tests, caused the installer bundle 
> to be stopped although PABundleRefresher.isInstallerBundleAffected() returns 
> false.
> I assume that's because the installer core bundle is indirectly affected by 
> the refreshed bundles, but I haven't investigated in detail yet.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to