You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "musachy (JIRA)" <ji...@apache.org> on 2008/05/09 15:44:55 UTC

[jira] Created: (FELIX-551) File Install tries to installa a bundle that is installed already

File Install tries to installa a bundle that is installed already
-----------------------------------------------------------------

                 Key: FELIX-551
                 URL: https://issues.apache.org/jira/browse/FELIX-551
             Project: Felix
          Issue Type: Bug
          Components: File Install
            Reporter: musachy
         Attachments: patch.diff

traverse(...) adds the found files to a map, keyed by the absolute path. The problem is that in doInstalled:

           String location = bundle.getLocation();
            File file = (File) installed.get(location);
            if (file != null) 

Location is a URL string (file:/....) instead of an absolute path, so the file is never found in the map, and fileinstall tries to install it again. Attached is a patch, which I am not sure if would break something else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-551) File Install tries to installa a bundle that is installed already

Posted by "musachy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595597#action_12595597 ] 

musachy commented on FELIX-551:
-------------------------------

I forgot to mention that this causes an exception on every watch iteration

> File Install tries to installa a bundle that is installed already
> -----------------------------------------------------------------
>
>                 Key: FELIX-551
>                 URL: https://issues.apache.org/jira/browse/FELIX-551
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>            Reporter: musachy
>         Attachments: patch.diff
>
>
> traverse(...) adds the found files to a map, keyed by the absolute path. The problem is that in doInstalled:
>            String location = bundle.getLocation();
>             File file = (File) installed.get(location);
>             if (file != null) 
> Location is a URL string (file:/....) instead of an absolute path, so the file is never found in the map, and fileinstall tries to install it again. Attached is a patch, which I am not sure if would break something else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-551) File Install tries to installa a bundle that is installed already

Posted by "Peter Kriens (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625350#action_12625350 ] 

Peter Kriens commented on FELIX-551:
------------------------------------

I looked at the code and can't see the problem ...

Fileinstall makes sures that the location == the file path (without file:). It compares this to the watch directory path to see if it is managed. So the code looks perfect, it just fails for bundles that are not managed, but it should not throw an exception? Could the exceptions be attached?

> File Install tries to installa a bundle that is installed already
> -----------------------------------------------------------------
>
>                 Key: FELIX-551
>                 URL: https://issues.apache.org/jira/browse/FELIX-551
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>            Reporter: musachy
>         Attachments: patch.diff
>
>
> traverse(...) adds the found files to a map, keyed by the absolute path. The problem is that in doInstalled:
>            String location = bundle.getLocation();
>             File file = (File) installed.get(location);
>             if (file != null) 
> Location is a URL string (file:/....) instead of an absolute path, so the file is never found in the map, and fileinstall tries to install it again. Attached is a patch, which I am not sure if would break something else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-551) File Install tries to installa a bundle that is installed already

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier closed FELIX-551.
-----------------------------------

    Resolution: Fixed

Was fixed in the 0.9.2 released version.

> File Install tries to installa a bundle that is installed already
> -----------------------------------------------------------------
>
>                 Key: FELIX-551
>                 URL: https://issues.apache.org/jira/browse/FELIX-551
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>            Reporter: musachy
>         Attachments: patch.diff
>
>
> traverse(...) adds the found files to a map, keyed by the absolute path. The problem is that in doInstalled:
>            String location = bundle.getLocation();
>             File file = (File) installed.get(location);
>             if (file != null) 
> Location is a URL string (file:/....) instead of an absolute path, so the file is never found in the map, and fileinstall tries to install it again. Attached is a patch, which I am not sure if would break something else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-551) File Install tries to installa a bundle that is installed already

Posted by "musachy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

musachy updated FELIX-551:
--------------------------

    Attachment: patch.diff

> File Install tries to installa a bundle that is installed already
> -----------------------------------------------------------------
>
>                 Key: FELIX-551
>                 URL: https://issues.apache.org/jira/browse/FELIX-551
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>            Reporter: musachy
>         Attachments: patch.diff
>
>
> traverse(...) adds the found files to a map, keyed by the absolute path. The problem is that in doInstalled:
>            String location = bundle.getLocation();
>             File file = (File) installed.get(location);
>             if (file != null) 
> Location is a URL string (file:/....) instead of an absolute path, so the file is never found in the map, and fileinstall tries to install it again. Attached is a patch, which I am not sure if would break something else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.