[
https://issues.apache.org/jira/browse/SLING-10136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17397897#comment-17397897
]
Karl Pauls commented on SLING-10136:
------------------------------------
[~enorman], I don't see anybody is being dismissive - I think the question is
about the scope of repoinit.
More specifically, I think it is about to what degree can one assume that a
repoinit script can just be applied regardless of the context. In other words,
that you can reapply repoinit scripts and they will turn into noops if the work
is already done. Unfortunately, repoinit already has some violations of this
but clearly, having all sorts of delete and move operations increases the risk
that a given repoinit has different effects in different scenarios which as you
point out, increases the importance to understand the script (and/or trust the
implementer) to be able to judge the impact it might have.
Obviously, that doesn't mean it doesn't make sense to enhance repoinit in this
direction but it does have an impact that is not just risk - its a question of
what it is meant to be. If we have a need for a DSL that is more powerful wrt.
mutating operations maybe it should be a new one that is either compatible with
repoinit or just complete independent - that way, it is clear that if one has
support for this new language the scripts might do more than just setting up
structure...
> Sling Repo Init: Add option to delete paths
> -------------------------------------------
>
> Key: SLING-10136
> URL: https://issues.apache.org/jira/browse/SLING-10136
> Project: Sling
> Issue Type: New Feature
> Components: Repoinit
> Affects Versions: Repoinit Parser 1.6.4, Repoinit JCR 1.1.30
> Reporter: Henry Kuijpers
> Priority: Major
> Time Spent: 2h
> Remaining Estimate: 0h
>
> Given that we are able to create paths, it would also be beneficial to be
> able to delete paths as well.
> In our case, we're migrating a legacy setup to Sling Repo Init, where there
> are some "leftover" nodes in the instances. Given that Sling Repo Init is an
> "admin" way to initialize a repo, it would be very nice if delete statements
> could be supported.
> In our case, we would want to delete /apps/foundation, for example, because
> historically there seem to have been modifications made there.
> This mandates for a simple syntax like "delete path /apps/foundation" being
> supported.
> Another case is that we would like to cleanup /apps/cq, however, there are
> some nodes that are maintained by the product (in our case AEM), such as
> /apps/cq/xssprotection and also /apps/cq/core/content/nav/tools.
> This mandates for a slightly more complicated syntax such as "delete path
> /apps/cq (!/xssprotection,!/core/content/nav/tools,*)", however, I would be
> fine with multiple delete path statements as well, for that usecase.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)