Hello community, here is the log from the commit of package w3m checked in at Wed Aug 15 20:37:57 CEST 2007. -------- --- w3m/w3m.changes 2007-08-11 19:14:30.000000000 +0200 +++ /mounts/work_src_done/STABLE/w3m/w3m.changes 2007-08-14 19:06:44.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Aug 14 19:06:06 CEST 2007 - olh@suse.de + +- handle EXDEV during history file rename() + +------------------------------------------------------------------- New: ---- w3m-history-crossdev.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ w3m.spec ++++++ --- /var/tmp/diff_new_pack.E27026/_old 2007-08-15 20:37:42.000000000 +0200 +++ /var/tmp/diff_new_pack.E27026/_new 2007-08-15 20:37:42.000000000 +0200 @@ -14,7 +14,7 @@ BuildRequires: giflib-devel gpm imlib2-devel libpng-devel libtiff-devel ncurses-devel openssl-devel pkgconfig xorg-x11-devel URL: http://w3m.sourceforge.net/ Version: 0.5.2 -Release: 17 +Release: 19 Summary: A text-based WWW browser License: BSD 3-Clause, X11/MIT Group: Productivity/Networking/Web/Browsers @@ -33,6 +33,7 @@ Patch6: w3m-0.5.1-no-ASCII-equivalents-by-default.patch Patch7: w3m-tempdir-override.patch Patch8: w3m-parsetagx-crash.patch +Patch9: w3m-history-crossdev.patch Patch10: gc6.4.dif %package inline-image Summary: An inline image extension for w3m @@ -100,6 +101,7 @@ %patch6 %patch7 -p1 %patch8 -p1 +%patch9 -p1 cd ../gc* %patch10 @@ -178,6 +180,8 @@ /usr/%_lib/w3m/w3mimgdisplay %changelog +* Tue Aug 14 2007 - olh@suse.de +- handle EXDEV during history file rename() * Sat Aug 11 2007 - olh@suse.de - fix crash in parse_tag() during every start use TMPDIR, TMP or TEMP enviroment variables ++++++ w3m-history-crossdev.patch ++++++ --- history.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) --- a/history.c +++ b/history.c @@ -68,11 +68,13 @@ loadHistory(Hist *hist) void saveHistory(Hist *hist, size_t size) { - FILE *f; + FILE *f, *h = NULL; HistItem *item; char *tmpf; #define FNAMELEN 255 char fname[FNAMELEN+1] = HISTORY_FILE; + char buf[4096]; + size_t rs, ws, remaining; if (hist == NULL || hist->list == NULL) return; @@ -96,7 +98,29 @@ saveHistory(Hist *hist, size_t size) strncat(fname, ".", FNAMELEN -6 - strlen(fname)); strncat(fname, Session, FNAMELEN -6 - strlen(fname)); } - rename(tmpf, rcFile(fname)); + if (rename(tmpf, rcFile(fname)) == -1 && errno == EXDEV) { + if ((f = fopen(tmpf, "r")) && (h = fopen(rcFile(fname), "w"))) { + while (1) { + rs = fread(buf, 1, sizeof(buf), f); + if (rs == 0 || rs > sizeof(buf)) + break; + ws = fwrite(buf, 1, rs, h); + if (ws == rs) + continue; + if (ws == 0 || ws > rs) + break; + remaining = rs - ws; + while (remaining > 0) { + ws = fwrite(buf + (rs - remaining), 1, remaining, h); + if (ws == 0 || ws > remaining) + break; + remaining -= ws; + } + } + } + if (f) fclose(f); + if (h) fclose(h); + } } #endif /* USE_HISTORY */ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org