You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/11/12 11:05:44 UTC

[jira] Created: (SLING-728) JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}

JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}
---------------------------------------------------------------

                 Key: SLING-728
                 URL: https://issues.apache.org/jira/browse/SLING-728
             Project: Sling
          Issue Type: Bug
          Components: JCR Install
    Affects Versions: JCR Install 2.0.4
            Reporter: Tobias Bocanegra
             Fix For: JCR Install 2.0.4


currently jcrinstall does not respect the search paths correctly.
the idea is, that configuration (and bundles) residing in /apps/{path} should win over /libs/{path}

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


[jira] Commented: (SLING-728) JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646981#action_12646981 ] 

Bertrand Delacretaz commented on SLING-728:
-------------------------------------------

A first shot is implemented in revision 713442, manually tested with the above scenario.

Also tested startup with config B overriding A, successful.

Need more automated tests, leaving this issue open.

> JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}
> ---------------------------------------------------------------
>
>                 Key: SLING-728
>                 URL: https://issues.apache.org/jira/browse/SLING-728
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Install
>    Affects Versions: JCR Install 2.0.4
>            Reporter: Tobias Bocanegra
>             Fix For: JCR Install 2.0.4
>
>
> currently jcrinstall does not respect the search paths correctly.
> the idea is, that configuration (and bundles) residing in /apps/{path} should win over /libs/{path}

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


[jira] Commented: (SLING-728) JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646931#action_12646931 ] 

Bertrand Delacretaz commented on SLING-728:
-------------------------------------------

Suggested test scenario for config nodes:

1. add config node A in /libs -> config X created
2. Update A -> X updated
3. add config node B in /apps, same path as A except /apps instead of /libs -> config X deleted and immediately recreated based on B
4. remove node A -> no effect on X
5. readd node A -> no effect on X
6. remove node B -> config X deleted and immediately recreated based on A

(the fact that /apps overrides /libs is configurable of course)

> JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}
> ---------------------------------------------------------------
>
>                 Key: SLING-728
>                 URL: https://issues.apache.org/jira/browse/SLING-728
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Install
>    Affects Versions: JCR Install 2.0.4
>            Reporter: Tobias Bocanegra
>             Fix For: JCR Install 2.0.4
>
>
> currently jcrinstall does not respect the search paths correctly.
> the idea is, that configuration (and bundles) residing in /apps/{path} should win over /libs/{path}

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


[jira] Commented: (SLING-728) JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646854#action_12646854 ] 

Bertrand Delacretaz commented on SLING-728:
-------------------------------------------

Giving priority to one path over another for installs looks easy, in WatchedFolder.scan():

while(it.hasNext()) {
  final Node n = it.nextNode();
  // add code here: ignore this node if there's another one
  // that "masks" it, from a folder with more priority
  for(NodeConverter nc : converters) {

But handling deletes is a bit trickier, I assume that deleting a node in a priority folder should cause the config defined by the non-priority folder node to be reactivated.




> JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}
> ---------------------------------------------------------------
>
>                 Key: SLING-728
>                 URL: https://issues.apache.org/jira/browse/SLING-728
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Install
>    Affects Versions: JCR Install 2.0.4
>            Reporter: Tobias Bocanegra
>             Fix For: JCR Install 2.0.4
>
>
> currently jcrinstall does not respect the search paths correctly.
> the idea is, that configuration (and bundles) residing in /apps/{path} should win over /libs/{path}

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


[jira] Commented: (SLING-728) JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646846#action_12646846 ] 

Tobias Bocanegra commented on SLING-728:
----------------------------------------

i will try to provide a patch...

> JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}
> ---------------------------------------------------------------
>
>                 Key: SLING-728
>                 URL: https://issues.apache.org/jira/browse/SLING-728
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Install
>    Affects Versions: JCR Install 2.0.4
>            Reporter: Tobias Bocanegra
>             Fix For: JCR Install 2.0.4
>
>
> currently jcrinstall does not respect the search paths correctly.
> the idea is, that configuration (and bundles) residing in /apps/{path} should win over /libs/{path}

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


[jira] Commented: (SLING-728) JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647006#action_12647006 ] 

Felix Meschberger commented on SLING-728:
-----------------------------------------

Re: RepositoryObserver

I think hard-coding /apps as an "override" path and "/libs" as an overwritten path is not a good idea. Rather than hardcoding (or even providing configuration) for this, it would be suitable to apply the ResourceResolver.getSearchPath() to the order of configuration overwriting.

Apart from using consistent values (/apps, /libs) in a consistent order (same entries and order for the configurations as for the script resolution and other stuff), it also has the benefit of requiring a single configuration.

> JcrInstall should prefer config in /apps/{xyz} over /libs/{xyz}
> ---------------------------------------------------------------
>
>                 Key: SLING-728
>                 URL: https://issues.apache.org/jira/browse/SLING-728
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Install
>    Affects Versions: JCR Install 2.0.4
>            Reporter: Tobias Bocanegra
>             Fix For: JCR Install 2.0.4
>
>
> currently jcrinstall does not respect the search paths correctly.
> the idea is, that configuration (and bundles) residing in /apps/{path} should win over /libs/{path}

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