diff options
author | Rusty Lynch <rusty.lynch@intel.com> | 2013-10-10 15:19:55 -0700 |
---|---|---|
committer | Rusty Lynch <rusty.lynch@intel.com> | 2013-10-10 15:38:05 -0700 |
commit | 5cdc2874cdc9b3cdcdb2289330403f192fcdfae0 (patch) | |
tree | 9a33dde7ac246187d2845f94a7a33a15560b892f | |
parent | 0c9b80463d2b7002d3122c9a3c7fcde98f6d2ad8 (diff) | |
download | vconf-tizen_ivi_genivi.tar.gz vconf-tizen_ivi_genivi.tar.bz2 vconf-tizen_ivi_genivi.zip |
Remove /tmp/vconf-init mechanismsubmit/tizen_ivi_stable/20131116.100255submit/tizen_ivi_genivi/20140131.060243submit/tizen/20131010.224337ivi_oct_m2accepted/tizen_ivi_stable/20131116.105959accepted/tizen/ivi/genivi/20140131.060202accepted/tizen/20131011.050107accepted/tizen/20131010.232904accepted/tizen/20131010.232841accepted/tizen/20131010.224906tizen_ivi_geniviaccepted/tizen_genericaccepted/tizen/ivi/stableaccepted/tizen/ivi/genivi
The vconf code has a left over, racey and broken, workaround to
have all vconf set operations attempt to wait for a file called
/tmp/vconf-initialized. If a set for an in-memory key was
attempted when the file did not exist, then after nearly two
seconds of trying the end result is the backup key file was
created, but containing no data.
Because of this, and because vconf initialization does not happen
at image creation time, then all images are created with many
in-memory backup items containing empty files. This results in
many subtle hard to debug bugs throughout the stack.
Change-Id: I3f9a4e1aa0f8267ccc07631c0eae2e2315ab2d17
Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
-rwxr-xr-x | packaging/vconf.spec | 1 | ||||
-rwxr-xr-x | vconf-init | 1 | ||||
-rwxr-xr-x | vconf.c | 27 |
3 files changed, 2 insertions, 27 deletions
diff --git a/packaging/vconf.spec b/packaging/vconf.spec index 7dd6f25..6631f40 100755 --- a/packaging/vconf.spec +++ b/packaging/vconf.spec @@ -57,7 +57,6 @@ install -m0644 %SOURCE2 %{buildroot}%{_prefix}/lib/tmpfiles.d/ ln -sf ../vconf-setup.service %{buildroot}%{_unitdir}/basic.target.wants/ %post -touch /tmp/vconf-initialized /sbin/ldconfig systemctl daemon-reload @@ -7,4 +7,3 @@ set -e cp -a /opt/var/kdb/memory_init/memory/* /var/run/memory -touch /tmp/vconf-initialized @@ -37,8 +37,6 @@ #define VCONF_ERROR_RETRY_CNT 20 #define VCONF_ERROR_RETRY_SLEEP_UTIME 10000 -#define VCONF_NOT_INITIALIZED (access("/tmp/vconf-initialized", F_OK) == -1) - #ifdef VCONF_USE_SQLFS_TRANSACTION int IN_SBOX=0; @@ -1037,11 +1035,6 @@ static int _vconf_set_key_filesys(keynode_t *keynode, int prefix) ret = _vconf_get_key_path(keynode->keyname, path); retv_if(ret != VCONF_OK, ret); - if(prefix == VCONF_BACKEND_MEMORY && VCONF_NOT_INITIALIZED) { - func_ret = VCONF_ERROR_NOT_INITIALIZED; - goto out_return; - } - #ifdef VCONF_USE_BACKUP_TRANSACTION if(prefix == VCONF_BACKEND_DB && keynode->type == VCONF_TYPE_STRING) { _vconf_get_backup_path(keynode->keyname, backup_path); @@ -1216,12 +1209,7 @@ static int _vconf_set_key(keynode_t *keynode) is_busy_err = 0; retry++; - if(VCONF_NOT_INITIALIZED) - { - ERR("%s : vconf is not initialized\n", keynode->keyname); - is_busy_err = 1; - } - else if(ret == VCONF_ERROR_FILE_OPEN) + if(ret == VCONF_ERROR_FILE_OPEN) { switch (errno) { @@ -1712,12 +1700,6 @@ static int _vconf_get_key_filesys(keynode_t *keynode, int prefix) ret = _vconf_get_key_path(keynode->keyname, path); retv_if(ret != VCONF_OK, ret); - if(prefix == VCONF_BACKEND_MEMORY && VCONF_NOT_INITIALIZED) - { - func_ret = VCONF_ERROR_NOT_INITIALIZED; - goto out_return; - } - #ifdef VCONF_USE_BACKUP_TRANSACTION if(prefix == VCONF_BACKEND_DB) { _vconf_get_backup_path(keynode->keyname, backup_path); @@ -1912,12 +1894,7 @@ int _vconf_get_key(keynode_t *keynode) is_busy_err = 0; retry++; - if(VCONF_NOT_INITIALIZED) - { - ERR("%s : vconf is not initialized\n", keynode->keyname); - is_busy_err = 1; - } - else if(ret == VCONF_ERROR_FILE_OPEN) + if(ret == VCONF_ERROR_FILE_OPEN) { switch (errno) { |