commit procps for openSUSE:Factory
Hello community, here is the log from the commit of package procps for openSUSE:Factory checked in at 2012-12-19 11:51:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/procps (Old) and /work/SRC/openSUSE:Factory/.procps.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "procps", Maintainer is "werner@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/procps/procps.changes 2012-11-02 17:40:50.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.procps.new/procps.changes 2012-12-19 11:52:00.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Dec 18 17:47:48 UTC 2012 - werner@suse.de + +- Add procps-v3.3.5-top-locale.patch (bnc#794678) + +------------------------------------------------------------------- New: ---- procps-v3.3.5-top-locale.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ procps.spec ++++++ --- /var/tmp/diff_new_pack.l0SxEe/_old 2012-12-19 11:52:02.000000000 +0100 +++ /var/tmp/diff_new_pack.l0SxEe/_new 2012-12-19 11:52:02.000000000 +0100 @@ -64,6 +64,8 @@ Patch20: procps-v3.3.3-tinfo.dif Patch21: procps-v3.3.3-pwdx.patch Patch22: procps-v3.3.3-chroot.diff +# PATCH-FIX-UPSTREAM procps-v3.3.5-top-locale.patch -- bnc#794678 - top has a locale-dpendent config file +Patch23: procps-v3.3.5-top-locale.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -129,6 +131,7 @@ %patch20 %patch21 %patch22 +%patch23 %build sh po/update-potfiles ++++++ procps-v3.3.5-top-locale.patch ++++++
From 34b8614f5699bb7ade9f98835e1d2a20a0aae5cb Mon Sep 17 00:00:00 2001 From: Jim Warner
Date: Mon, 17 Dec 2012 00:00:00 -0600 Subject: [PATCH 9/9] top: make rcfile immune from a potential locale change
The delay interval is kept in the rcfile in a floating point format and is thus susceptible to changes in the locale between invocations. So values written as #,### could not be read if a new locale uses decimal points. This commit takes control of our own decimal point and will henceforth make top immune to locale switcharoos. (now that we know a '.' + 2 spaces is squeezed to one) (everything's perfectly justified, but it's just luck) Reference(s): http://www.freelists.org/post/procps/top-has-a-localedpendent-config-file-to... http://lists.opensuse.org/opensuse-bugs/2012-12/msg01466.html --- top/top.c +++ top/top.c 2012-12-18 17:41:30.909860953 +0000 @@ -2479,16 +2479,19 @@ static void configs_read (void) { fp = fopen(Rc_name, "r"); if (fp) { + int tmp_whole, tmp_fract; fbuf[0] = '\0'; fgets(fbuf, sizeof(fbuf), fp); // ignore eyecatcher - if (5 != fscanf(fp - , "Id:%c, Mode_altscr=%d, Mode_irixps=%d, Delay_time=%f, Curwin=%d\n" - , &Rc.id, &Rc.mode_altscr, &Rc.mode_irixps, &tmp_delay, &i)) { + if (6 != fscanf(fp + , "Id:%c, Mode_altscr=%d, Mode_irixps=%d, Delay_time=%d.%d, Curwin=%d\n" + , &Rc.id, &Rc.mode_altscr, &Rc.mode_irixps, &tmp_whole, &tmp_fract, &i)) { p = fmtmk(N_fmt(RC_bad_files_fmt), Rc_name); goto default_or_error; } // you saw that, right? (fscanf stickin' it to 'i') Curwin = &Winstk[i]; + // this may be ugly, but it keeps us locale independent... + tmp_delay = (float)tmp_whole + (float)tmp_fract / 1000; for (i = 0 ; i < GROUPSMAX; i++) { WIN_t *w = &Winstk[i]; @@ -3015,9 +3018,12 @@ static void file_writerc (void) { return; } fprintf(fp, "%s's " RCF_EYECATCHER, Myname); - fprintf(fp, "Id:%c, Mode_altscr=%d, Mode_irixps=%d, Delay_time=%.3f, Curwin=%d\n" + fprintf(fp, "Id:%c, Mode_altscr=%d, Mode_irixps=%d, Delay_time=%d.%d, Curwin=%d\n" , RCF_VERSION_ID - , Rc.mode_altscr, Rc.mode_irixps, Rc.delay_time, (int)(Curwin - Winstk)); + , Rc.mode_altscr, Rc.mode_irixps + // this may be ugly, but it keeps us locale independent... + , (int)Rc.delay_time, (int)((Rc.delay_time - (int)Rc.delay_time) * 1000) + , (int)(Curwin - Winstk)); for (i = 0 ; i < GROUPSMAX; i++) { fprintf(fp, "%s\tfieldscur=%s\n" -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de