Skip to content

Commit

Permalink
#509: Remove "cosgi." "osgi." property usage from sources and propert…
Browse files Browse the repository at this point in the history
…ies files
  • Loading branch information
pnoltes committed Oct 29, 2023
1 parent 27c8e91 commit 8ff445a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion libs/framework/gtest/config.properties.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
# under the License.

LOGHELPER_ENABLE_STDOUT_FALLBACK=true
org.osgi.framework.storage.clean=true
CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true
7 changes: 0 additions & 7 deletions libs/framework/src/celix_bundle_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions libs/framework/src/framework.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE=true

0 comments on commit 8ff445a

Please sign in to comment.