noblepaul commented on a change in pull request #560: URL: https://github.com/apache/solr/pull/560#discussion_r794186760
########## File path: solr/core/src/java/org/apache/solr/pkg/PackageLoader.java ########## @@ -78,29 +82,31 @@ public PackageLoader(CoreContainer coreContainer) { this.coreContainer = coreContainer; - List<String> enabledPackages = StrUtils.splitSmart(localPkgsWhiteList, ','); + List<String> enabledPackages = StrUtils.splitSmart(enabledLocalPkgsList, ','); packageAPI = new PackageAPI(coreContainer, this); if (localPkgsDir != null && !enabledPackages.isEmpty()) { - loadLocalPackages(enabledPackages); + loadLocalPackages(localPkgsDir, enabledPackages); + } + if (repoPackagesEnabled) { + refreshPackageConf(); } - if (enablePackages) refreshPackageConf(); } - private void loadLocalPackages(List<String> enabledPackages) { - final Path packagesPath = new File(localPkgsDir.charAt(0)== File.separatorChar? - localPkgsDir : - coreContainer.getSolrHome()+ File.separator+ localPkgsDir).toPath(); + private void loadLocalPackages(String localPkgsDir, List<String> enabledPackages) { + final Path packagesPath = localPkgsDir.charAt(0) == File.separatorChar ? + Paths.get(localPkgsDir) : + Paths.get(coreContainer.getSolrHome()).resolve(localPkgsDir); log.info("Packages to be loaded from directory: {}", packagesPath); - if (!packagesPath.toFile().exists()) { + if (!Files.exists(packagesPath)) { Review comment: Sys prop is the only way to do it now. We should NOT have an API to do this because this also goes against the `immutable deployments` narrative . However we may, in the future, use other startup mechanisms to configure the same (say `solr.xml`) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org