[
https://issues.apache.org/jira/browse/SLING-10136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17396838#comment-17396838
]
Eric Norman commented on SLING-10136:
-------------------------------------
[~cziegeler] I don't really agree with that assessment. I think delete would
be a reasonable thing to have. Any risk would be the responsibility of the
person creating the repoinit code. The framework doesn't need to do anything
to "avoid the risk". There are numerous unwise things one could do in repoinit
code but when there are also valid use cases for those things then there is no
reason why I shouldn't have the option to do those things.
I could easily imagine an upgrade scenario where you would want to delete an
obsolete node and then re-create it with new content. That would be much more
complicated if forced to use a "regular content package" to delete the old data
where you would have to figure out some way to determine what to keep and what
to delete with whatever mix was left after repoinit ran.
> 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)