This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/509-remove-osgi-defines in repository https://gitbox.apache.org/repos/asf/celix.git
commit 8ff445a393d66568529351962eea5364bcbccb73 Author: Pepijn Noltes <[email protected]> AuthorDate: Sun Oct 29 11:29:20 2023 +0100 #509: Remove "cosgi." "osgi." property usage from sources and properties files --- .../remote_service_admin_dfi/gtest/client.properties.in | 6 +++--- .../remote_service_admin_dfi/gtest/config.properties.in | 4 ++-- .../remote_service_admin_dfi/gtest/server.properties.in | 6 +++--- bundles/remote_services/topology_manager/tms_tst/CMakeLists.txt | 8 ++++---- libs/framework/gtest/config.properties.in | 2 +- libs/framework/src/celix_bundle_cache.c | 7 ------- libs/framework/src/framework.c | 5 ----- .../bundles/config_admin/config_admin_tst/config.properties.in | 4 ++-- 8 files changed, 15 insertions(+), 27 deletions(-) diff --git a/bundles/remote_services/remote_service_admin_dfi/gtest/client.properties.in b/bundles/remote_services/remote_service_admin_dfi/gtest/client.properties.in index 7c8ed7ee..6e98c5a8 100644 --- a/bundles/remote_services/remote_service_admin_dfi/gtest/client.properties.in +++ b/bundles/remote_services/remote_service_admin_dfi/gtest/client.properties.in @@ -1,7 +1,7 @@ -cosgi.auto.start.1=@rsa_bundle_file@ @discovery_bundle_file@ @topology_manager_bundle_file@ @tst_bundle_file@ +CELIX_FRAMEWORK_FRAMEWORK_CACHE_DIR=@rsa_bundle_file@ @discovery_bundle_file@ @topology_manager_bundle_file@ @tst_bundle_file@ LOGHELPER_ENABLE_STDOUT_FALLBACK=true -org.osgi.framework.storage.clean=onFirstInit -org.osgi.framework.storage=.cacheClient +CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true +CELIX_FRAMEWORK_CACHE_DIR=.cacheClient DISCOVERY_CFG_POLL_INTERVAL=1 DISCOVERY_CFG_POLL_TIMEOUT=5 diff --git a/bundles/remote_services/remote_service_admin_dfi/gtest/config.properties.in b/bundles/remote_services/remote_service_admin_dfi/gtest/config.properties.in index 86c90f19..c500d29f 100644 --- a/bundles/remote_services/remote_service_admin_dfi/gtest/config.properties.in +++ b/bundles/remote_services/remote_service_admin_dfi/gtest/config.properties.in @@ -15,6 +15,6 @@ # specific language governing permissions and limitations # under the License. -cosgi.auto.start.1=@rsa_bundle_file@ @calc_bundle_file@ +CELIX_FRAMEWORK_FRAMEWORK_CACHE_DIR=@rsa_bundle_file@ @calc_bundle_file@ LOGHELPER_ENABLE_STDOUT_FALLBACK=true -org.osgi.framework.storage.clean=onFirstInit +CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true diff --git a/bundles/remote_services/remote_service_admin_dfi/gtest/server.properties.in b/bundles/remote_services/remote_service_admin_dfi/gtest/server.properties.in index 97697259..c9821c6a 100644 --- a/bundles/remote_services/remote_service_admin_dfi/gtest/server.properties.in +++ b/bundles/remote_services/remote_service_admin_dfi/gtest/server.properties.in @@ -14,10 +14,10 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -cosgi.auto.start.1=@rsa_bundle_file@ @calc_bundle_file@ @remote_example_bundle_file@ @discovery_bundle_file@ @topology_manager_bundle_file@ +CELIX_FRAMEWORK_FRAMEWORK_CACHE_DIR=@rsa_bundle_file@ @calc_bundle_file@ @remote_example_bundle_file@ @discovery_bundle_file@ @topology_manager_bundle_file@ LOGHELPER_ENABLE_STDOUT_FALLBACK=true -org.osgi.framework.storage.clean=onFirstInit -org.osgi.framework.storage=.cacheServer +CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true +CELIX_FRAMEWORK_CACHE_DIR=.cacheServer DISCOVERY_CFG_POLL_INTERVAL=1 DISCOVERY_CFG_POLL_TIMEOUT=5 diff --git a/bundles/remote_services/topology_manager/tms_tst/CMakeLists.txt b/bundles/remote_services/topology_manager/tms_tst/CMakeLists.txt index 140e05c4..dfb91313 100644 --- a/bundles/remote_services/topology_manager/tms_tst/CMakeLists.txt +++ b/bundles/remote_services/topology_manager/tms_tst/CMakeLists.txt @@ -55,17 +55,17 @@ add_celix_bundle_dependencies(test_tm_scoped Celix::rsa_dfi Celix::rsa_topology_ file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/config.properties" CONTENT " -cosgi.auto.start.1=$<TARGET_PROPERTY:Celix::rsa_dfi,BUNDLE_FILE> $<TARGET_PROPERTY:calculator,BUNDLE_FILE> $<TARGET_PROPERTY:Celix::rsa_topology_manager,BUNDLE_FILE> $<TARGET_PROPERTY:topology_manager_disc_mock_bundle,BUNDLE_FILE> +CELIX_AUTO_START_1=$<TARGET_PROPERTY:Celix::rsa_dfi,BUNDLE_FILE> $<TARGET_PROPERTY:calculator,BUNDLE_FILE> $<TARGET_PROPERTY:Celix::rsa_topology_manager,BUNDLE_FILE> $<TARGET_PROPERTY:topology_manager_disc_mock_bundle,BUNDLE_FILE> LOGHELPER_ENABLE_STDOUT_FALLBACK=true -org.osgi.framework.storage.clean=onFirstInit +CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true ") file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/config_import.properties" CONTENT " -cosgi.auto.start.1=$<TARGET_PROPERTY:Celix::rsa_dfi,BUNDLE_FILE> $<TARGET_PROPERTY:calculator,BUNDLE_FILE> $<TARGET_PROPERTY:Celix::rsa_topology_manager,BUNDLE_FILE> $<TARGET_PROPERTY:topology_manager_test_bundle,BUNDLE_FILE> +CELIX_AUTO_START_1=$<TARGET_PROPERTY:Celix::rsa_dfi,BUNDLE_FILE> $<TARGET_PROPERTY:calculator,BUNDLE_FILE> $<TARGET_PROPERTY:Celix::rsa_topology_manager,BUNDLE_FILE> $<TARGET_PROPERTY:topology_manager_test_bundle,BUNDLE_FILE> LOGHELPER_ENABLE_STDOUT_FALLBACK=true -org.osgi.framework.storage.clean=onFirstInit +CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true ") configure_file("scope.json" "scope.json") diff --git a/libs/framework/gtest/config.properties.in b/libs/framework/gtest/config.properties.in index 58f2098f..f5931a4a 100644 --- a/libs/framework/gtest/config.properties.in +++ b/libs/framework/gtest/config.properties.in @@ -16,4 +16,4 @@ # under the License. LOGHELPER_ENABLE_STDOUT_FALLBACK=true -org.osgi.framework.storage.clean=true \ No newline at end of file +CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true \ No newline at end of file diff --git a/libs/framework/src/celix_bundle_cache.c b/libs/framework/src/celix_bundle_cache.c index 576d3fe1..8a746e81 100644 --- a/libs/framework/src/celix_bundle_cache.c +++ b/libs/framework/src/celix_bundle_cache.c @@ -321,12 +321,8 @@ celix_bundleCache_createBundleArchivesForSpaceSeparatedList(celix_framework_t* f celix_status_t celix_bundleCache_createBundleArchivesCache(celix_framework_t* fw, bool logProgress) { celix_status_t status = CELIX_SUCCESS; - const char* const cosgiKeys[] = {"cosgi.auto.start.0", "cosgi.auto.start.1", "cosgi.auto.start.2", - "cosgi.auto.start.3", "cosgi.auto.start.4", "cosgi.auto.start.5", - "cosgi.auto.start.6", NULL}; const char* const celixKeys[] = {CELIX_AUTO_START_0, CELIX_AUTO_START_1, CELIX_AUTO_START_2, CELIX_AUTO_START_3, CELIX_AUTO_START_4, CELIX_AUTO_START_5, CELIX_AUTO_START_6, NULL}; - CELIX_BUILD_ASSERT(sizeof(*cosgiKeys) == sizeof(*celixKeys)); long bndId = CELIX_FRAMEWORK_BUNDLE_ID + 1; //note cleaning cache, so starting bundle id at 1 const char* errorStr = NULL; @@ -342,9 +338,6 @@ celix_status_t celix_bundleCache_createBundleArchivesCache(celix_framework_t* fw for (int i = 0; celixKeys[i] != NULL; ++i) { const char* autoStart = celix_framework_getConfigProperty(fw, celixKeys[i], NULL, NULL); - if (autoStart == NULL) { - autoStart = celix_framework_getConfigProperty(fw, cosgiKeys[i], NULL, NULL); - } if (autoStart) { status = celix_bundleCache_createBundleArchivesForSpaceSeparatedList(fw, &bndId, autoStart, logProgress); if (status != CELIX_SUCCESS) { diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c index a2040cd3..e22d4b85 100644 --- a/libs/framework/src/framework.c +++ b/libs/framework/src/framework.c @@ -487,15 +487,10 @@ celix_status_t framework_start(celix_framework_t* framework) { static celix_status_t framework_autoStartConfiguredBundles(celix_framework_t* fw) { celix_status_t status = CELIX_SUCCESS; - const char* const cosgiKeys[] = {"cosgi.auto.start.0","cosgi.auto.start.1","cosgi.auto.start.2","cosgi.auto.start.3","cosgi.auto.start.4","cosgi.auto.start.5","cosgi.auto.start.6", NULL}; const char* const celixKeys[] = {CELIX_AUTO_START_0, CELIX_AUTO_START_1, CELIX_AUTO_START_2, CELIX_AUTO_START_3, CELIX_AUTO_START_4, CELIX_AUTO_START_5, CELIX_AUTO_START_6, NULL}; - CELIX_BUILD_ASSERT(sizeof(*cosgiKeys) == sizeof(*celixKeys)); celix_array_list_t *installedBundles = celix_arrayList_create(); for (int i = 0; celixKeys[i] != NULL; ++i) { const char *autoStart = celix_framework_getConfigProperty(fw, celixKeys[i], NULL, NULL); - if (autoStart == NULL) { - autoStart = celix_framework_getConfigProperty(fw, cosgiKeys[i], NULL, NULL); - } if (autoStart != NULL) { if (framework_autoInstallConfiguredBundlesForList(fw, autoStart, installedBundles) != CELIX_SUCCESS) { status = CELIX_BUNDLE_EXCEPTION; diff --git a/misc/experimental/bundles/config_admin/config_admin_tst/config.properties.in b/misc/experimental/bundles/config_admin/config_admin_tst/config.properties.in index 7e8c14df..d4db5671 100644 --- a/misc/experimental/bundles/config_admin/config_admin_tst/config.properties.in +++ b/misc/experimental/bundles/config_admin/config_admin_tst/config.properties.in @@ -15,6 +15,6 @@ # specific language governing permissions and limitations # under the License. -cosgi.auto.start.1=@config_admin_bundle_file@ @example_test_bundle_file@ @example_test2_bundle_file@ +CELIX_FRAMEWORK_FRAMEWORK_CACHE_DIR=@config_admin_bundle_file@ @example_test_bundle_file@ @example_test2_bundle_file@ LOGHELPER_ENABLE_STDOUT_FALLBACK=true -org.osgi.framework.storage.clean=onFirstInit \ No newline at end of file +CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true \ No newline at end of file
