[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-sourceinstall] error saving preferences for first time + patch
From: |
Stephen Compall |
Subject: |
[bug-sourceinstall] error saving preferences for first time + patch |
Date: |
Sun, 29 Jan 2006 16:40:57 -0600 |
I wrote all the below as a bug report before finding the problem, which
was an extra free. See attached patch for libsrcinst-2.0-rc2.
After starting sourceinstall-gtk 2.0rc2 for the first time, I went into
preferences, changed the "Compression Format" to bzip2, clicked "Save",
and received this error message:
Your changes will apply to the current session only: an error has
occured trying to save preferences to p_Pj
Hmm, that was more confusing than I thought it would be; attached is a
screenshot.
I built sourceinstall-gtk (and libsrcinst for that matter) with
[~]$ gcc --version
gcc (GCC) 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)
...
[~]$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
[~]$ ./configure CFLAGS='-Wall -O0 -g -pipe' && make
Anyway, after that, trying to set preferences would offer the message
"Prefix directory not found", followed by "Preferences for this user
have been successfully saved."
I did a little debugging by deleting ~/.sourceinstall, setting a
breakpoint at _save_preferences, and found a few things:
(gdb) start
...
(gdb) c
Continuing.
Detaching after fork from child process 22961.
Detaching after fork from child process 22962.
Breakpoint 3, _save_preferences (p=0xb7f39930) at preferences.c:112
(gdb) p _srcinst_state.files
$2 = {0x807b3d0 "/home/sirian/.sourceinstall/sourceinstallrc", 0x807b400
"/home/sirian/.sourceinstall/.sourceinstall_lock", 0x0}
(gdb) c
Continuing.
options_init
gui_init
gui_set_default_size
events_bind
package_list_fill
gui_action_pref
... at this point the GUI appears, and I change the preference and try
to save as before
Breakpoint 2, pref_save_clicked (unused_w=0x80acec0, unused_data=0x0) at
pref.c:191
(gdb) p _srcinst_state.files
$3 = {0x807b3d0 "/usr/local", 0x807b400
"/home/sirian/.sourceinstall/.sourceinstall_lock", 0x0}
(gdb) c
Continuing.
Breakpoint 3, _save_preferences (p=0xb7f39930) at preferences.c:112
(gdb) n
... putting me after the _init_keywords_preferences call
(gdb) p _srcinst_state.files
$4 = {0x807b3d0 "/usr/local", 0x807b400
"/home/sirian/.sourceinstall/.sourceinstall_lock", 0x0}
--
Stephen Compall
http://scompall.nocandysw.com/blog
srcinstall-prefsave-1sttime.png
Description: PNG image
_save_preferences-extra-free.patch
Description: Text Data
signature.asc
Description: This is a digitally signed message part
- [bug-sourceinstall] error saving preferences for first time + patch,
Stephen Compall <=