karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (Resolved) (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (KARAF-983) Karaf Cave repository scanning not accounting for removed bundles
Date Wed, 09 Nov 2011 23:17:52 GMT

     [ https://issues.apache.org/jira/browse/KARAF-983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Jean-Baptiste Onofré resolved KARAF-983.

    Resolution: Fixed

Revision 1200030.
> Karaf Cave repository scanning not accounting for removed bundles
> -----------------------------------------------------------------
>                 Key: KARAF-983
>                 URL: https://issues.apache.org/jira/browse/KARAF-983
>             Project: Karaf
>          Issue Type: Bug
>          Components: cave-server
>    Affects Versions: cave-3.0.0
>            Reporter: Glen Mazza
>            Assignee: Jean-Baptiste Onofré
>             Fix For: cave-3.0.0
>         Attachments: karafScan.patch
> The attached patch fixes two problems:
> 1.) When a user does a "cave:create-repository cave-repo", where cave-repo existed as
a previous repo but was removed from Karaf (cave:remove-repository) (or not listed due to
new startup of Karaf) but not the filesystem, the Cave code presently loads in the repository.xml
and populates the CaveRepositoryImpl's obrRepository structure with all the listed bundles--but
it doesn't check whether those bundles are still in the Cave folder.  The patch has the repository.xml
always start empty on a create-repository, to be immediately populated after the scan() is
called (which normally happens immediately afterwards unless you expressly do a --no-update
with your create-repository call.)  Making this change (which is the "-71,13 +71,8" part of
the patch) is optional IMO -- if you assume in most cases people will scan anyway when they
do a create-repository, it's good to have this change in as it guarantees full accuracy. 
However, it will require scans whenever you restart Karaf and "create" already existing Cave
> 2.) If a person does a cave:update-repository presently *new* bundles in the repo will
be added to the repository.xml file, but bundles that have been removed from the repo will
not be removed from the repository.xml file.  This change is required IMO -- the patch again
resets the obrRepository to a new empty object (unfortunately no ability to empty it out)
each time scan() is called so nonexistent bundles will be removed from the XML file.

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


View raw message