[ 
https://issues.apache.org/jira/browse/SLING-13369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120986#comment-18120986
 ] 

Konrad Windszus commented on SLING-13369:
-----------------------------------------

The problem is that usually feature models are aggregated later on, so there 
may be package dependencies towards other mutable content packages leading to 
false positives when implementing validation as proposed above. Other potential 
solutions:

- Remove all package dependencies except for those which are pointing to mapped 
mutable content packages processed through cp2fm. The drawback is that 
potentially this may remove relevant package dependencies towards other 
(mutable) content packages which may affect installation order later on.

> feature-cpconverter: Restrict and validate package dependencies of generated 
> mutable packages
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-13369
>                 URL: https://issues.apache.org/jira/browse/SLING-13369
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content-Package to Feature Model Converter
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Currently a non resolvable mutable content package dependency is just passed 
> on as is into the resulting package. Only those package dependencies are 
> mapped which are pointing to known mutable package ids (in 
> [https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/e2dc780ec226b38748d71b68b9872e9fa221adcc/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java#L518).]
> In addition there should be:
>  * Removal of dependencies towards immutable package ids (as those packages 
> are dissolved)
>  * Validation of remaining dependency package ids so that only those 
> contained in the passed packages are allowed. Violations should lead to 
> exceptions.
>  * Also the version ranges within dependencies needs to be adjusted as cp2fm 
> packages have {{-cp2fm-converted}} suffix.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to