[
https://issues.apache.org/jira/browse/KARAF-5376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16315770#comment-16315770
]
ASF GitHub Bot commented on KARAF-5376:
---------------------------------------
grgrzybek closed pull request #434: [KARAF-5376] Do not add boot/installed
features when they're blacklis…
URL: https://github.com/apache/karaf/pull/434
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
index da6c938490..c9a398299e 100644
--- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
+++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
@@ -1522,6 +1522,10 @@ private void installStage(Profile installedProfile,
Set<Feature> allBootFeatures
Set<Feature> installedFeatures =
selector.getMatching(installedEffective.getFeatures());
ArtifactInstaller installer = new ArtifactInstaller(systemDirectory,
downloader, blacklist);
for (Feature feature : installedFeatures) {
+ if (feature.isBlacklisted()) {
+ LOGGER.info(" Feature " + feature.getId() + " is
blacklisted, ignoring");
+ continue;
+ }
LOGGER.info(" Feature {} is defined as an installed feature",
feature.getId());
for (Bundle bundle : feature.getBundle()) {
if (!ignoreDependencyFlag || !bundle.isDependency()) {
@@ -1597,7 +1601,10 @@ private void installStage(Profile installedProfile,
Set<Feature> allBootFeatures
FeatureSelector selector = new FeatureSelector(allBootFeatures);
Set<Feature> bootFeatures =
selector.getMatching(singletonList(generated.getName()));
for (Feature feature : bootFeatures) {
- // the feature is a startup feature, updating startup.properties
file
+ if (feature.isBlacklisted()) {
+ LOGGER.info(" Feature " + feature.getId() + " is
blacklisted, ignoring");
+ continue;
+ }
LOGGER.info(" Feature " + feature.getId() + " is defined as a
boot feature");
// add the feature in the system folder
Set<BundleInfo> bundleInfos = new HashSet<>();
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Processor mechanism for feature definitions (a.k.a. "better overrides")
> -----------------------------------------------------------------------
>
> Key: KARAF-5376
> URL: https://issues.apache.org/jira/browse/KARAF-5376
> Project: Karaf
> Issue Type: Proposal
> Components: karaf-feature
> Reporter: Grzegorz Grzybek
> Assignee: Grzegorz Grzybek
> Fix For: 4.2.0.M2
>
>
> It'd be good to have a mechanism that could transform/enhance/process feature
> definitions after reading them from original feature XML descriptors and
> before passing them to Karaf features deployer.
> Current overrides mechanism could be generalized beyond simple version change
> for {{<feature>/<bundle>}} URIs.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)