Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package btop for openSUSE:Factory checked in at 2022-02-28 19:44:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/btop (Old) and /work/SRC/openSUSE:Factory/.btop.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "btop" Mon Feb 28 19:44:04 2022 rev:15 rq:958095 version:1.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/btop/btop.changes 2022-02-15 23:58:15.240373839 +0100 +++ /work/SRC/openSUSE:Factory/.btop.new.1958/btop.changes 2022-02-28 19:44:34.925963560 +0100 @@ -1,0 +2,10 @@ +Mon Feb 28 16:23:44 UTC 2022 - Scott Bradnick <scott.bradnick@suse.com> - 1.2.4 + +- Update to upstream release 1.2.4: + * Optimization: Proc::draw() + * Fixed: Ignore duplicate disks with same mountpoint + * Changed: Restrict command line for processes to 1000 characters to fix + utf8 conversion errors + * Added: add "g" and "G" to vim keys, by @mohi001 + +------------------------------------------------------------------- Old: ---- v1.2.3.tar.gz New: ---- v1.2.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ btop.spec ++++++ --- /var/tmp/diff_new_pack.lrsjS7/_old 2022-02-28 19:44:35.629963711 +0100 +++ /var/tmp/diff_new_pack.lrsjS7/_new 2022-02-28 19:44:35.637963713 +0100 @@ -17,7 +17,7 @@ Name: btop -Version: 1.2.3 +Version: 1.2.4 Release: 0 Summary: Usage and stats for processor, memory, disks, network and processes License: Apache-2.0 ++++++ v1.2.3.tar.gz -> v1.2.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/CHANGELOG.md new/btop-1.2.4/CHANGELOG.md --- old/btop-1.2.3/CHANGELOG.md 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/CHANGELOG.md 2022-02-27 14:24:39.000000000 +0100 @@ -1,3 +1,13 @@ +## v1.2.4 + +* Optimization: Proc::draw() + +* Fixed: Ignore duplicate disks with same mountpoint + +* Changed: Restrict command line for processes to 1000 characters to fix utf8 conversion errors + +* Added: add "g" and "G" to vim keys, by @mohi001 + ## v1.2.3 * Changed: floating_humanizer() now show fractions when shortened and value is < 10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/README.md new/btop-1.2.4/README.md --- old/btop-1.2.3/README.md 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/README.md 2022-02-27 14:24:39.000000000 +0100 @@ -595,7 +595,7 @@ #* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" -#* Set to True to enable "h,j,k,l" keys for directional control in lists. +#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. #* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. vim_keys = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/btop.cpp new/btop-1.2.4/src/btop.cpp --- old/btop-1.2.3/src/btop.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/btop.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -60,7 +60,7 @@ {"#801414", "������������������������ ��������� ������������������������������������ ��������� ���������"}, {"#000000", "��������������������� ��������� ��������������������� ���������"}, }; - const string Version = "1.2.3"; + const string Version = "1.2.4"; int coreCount; string overlay; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/btop_config.cpp new/btop-1.2.4/src/btop_config.cpp --- old/btop-1.2.3/src/btop_config.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/btop_config.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -54,7 +54,7 @@ "#* Use withespace \" \" as separator between different presets.\n" "#* Example: \"cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty\""}, - {"vim_keys", "#* Set to True to enable \"h,j,k,l\" keys for directional control in lists.\n" + {"vim_keys", "#* Set to True to enable \"h,j,k,l,g,G\" keys for directional control in lists.\n" "#* Conflicting keys for h:\"help\" and k:\"kill\" is accessible while holding shift."}, {"rounded_corners", "#* Rounded corners on boxes, is ignored if TTY mode is ON."}, @@ -77,8 +77,8 @@ {"update_ms", "#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs."}, - {"proc_sorting", "#* Processes sorting, \"pid\" \"program\" \"arguments\" \"threads\" \"user\" \"memory\" \"cpu lazy\" \"cpu responsive\",\n" - "#* \"cpu lazy\" sorts top process over time (easier to follow), \"cpu responsive\" updates top process directly."}, + {"proc_sorting", "#* Processes sorting, \"pid\" \"program\" \"arguments\" \"threads\" \"user\" \"memory\" \"cpu lazy\" \"cpu direct\",\n" + "#* \"cpu lazy\" sorts top process over time (easier to follow), \"cpu direct\" updates top process directly."}, {"proc_reversed", "#* Reverse sorting order, True or False."}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/btop_draw.cpp new/btop-1.2.4/src/btop_draw.cpp --- old/btop-1.2.3/src/btop_draw.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/btop_draw.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -1024,6 +1024,7 @@ int selected_pid = 0; string selected_name; unordered_flat_map<size_t, Draw::Graph> p_graphs; + unordered_flat_map<size_t, bool> p_wide_cmd; unordered_flat_map<size_t, int> p_counters; int counter = 0; Draw::TextEdit filter; @@ -1069,11 +1070,11 @@ if (selected > 0 and start >= numpids - select_max) selected = select_max; else start = clamp(start + select_max, 0, max(0, numpids - select_max)); } - else if (cmd_key == "home") { + else if (cmd_key == "home" or (vim_keys and cmd_key == "g")) { start = 0; if (selected > 0) selected = 1; } - else if (cmd_key == "end") { + else if (cmd_key == "end" or (vim_keys and cmd_key == "G")) { start = max(0, numpids - select_max); if (selected > 0) selected = select_max; } @@ -1394,12 +1395,14 @@ } } + if (not p_wide_cmd.contains(p.pid)) p_wide_cmd[p.pid] = ulen(p.cmd) != ulen(p.cmd, true); + //? Normal view line if (not proc_tree) { out += Mv::to(y+2+lc, x+1) + g_color + rjust(to_string(p.pid), 8) + ' ' + c_color + ljust(p.name, prog_size, true) + ' ' + end - + (cmd_size > 0 ? g_color + ljust(p.cmd, cmd_size, true, true) + Mv::to(y+2+lc, x+11+prog_size+cmd_size) + ' ' : ""); + + (cmd_size > 0 ? g_color + ljust(p.cmd, cmd_size, true, p_wide_cmd[p.pid]) + Mv::to(y+2+lc, x+11+prog_size+cmd_size) + ' ' : ""); } //? Tree view line else { @@ -1412,7 +1415,7 @@ width_left -= (ulen(p.name) + 1); } if (width_left > 7 and p.short_cmd != p.name) { - out += g_color + '(' + uresize(p.short_cmd, width_left - 3, true) + ") "; + out += g_color + '(' + uresize(p.short_cmd, width_left - 3, p_wide_cmd[p.pid]) + ") "; width_left -= (ulen(p.short_cmd, true) + 3); } out += string(max(0, width_left), ' ') + Mv::to(y+2+lc, x+2+tree_size); @@ -1473,6 +1476,15 @@ } p_graphs.compact(); p_counters.compact(); + + for (auto element = p_wide_cmd.begin(); element != p_wide_cmd.end();) { + if (rng::find(plist, element->first, &proc_info::pid) == plist.end()) { + element = p_wide_cmd.erase(element); + } + else + ++element; + } + p_wide_cmd.compact(); } if (selected == 0 and selected_pid != 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/btop_input.cpp new/btop-1.2.4/src/btop_input.cpp --- old/btop-1.2.3/src/btop_input.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/btop_input.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -416,7 +416,7 @@ Menu::show(Menu::Menus::SignalChoose); return; } - else if (is_in(key, "up", "down", "page_up", "page_down", "home", "end") or (vim_keys and is_in(key, "j", "k"))) { + else if (is_in(key, "up", "down", "page_up", "page_down", "home", "end") or (vim_keys and is_in(key, "j", "k", "g", "G"))) { proc_mouse_scroll: redraw = false; auto old_selected = Config::getI("proc_selected"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/btop_menu.cpp new/btop-1.2.4/src/btop_menu.cpp --- old/btop-1.2.3/src/btop_menu.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/btop_menu.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -550,10 +550,10 @@ "Possible values:", "\"pid\", \"program\", \"arguments\", \"threads\",", "\"user\", \"memory\", \"cpu lazy\" and", - "\"cpu responsive\".", + "\"cpu direct\".", "", "\"cpu lazy\" updates top process over time.", - "\"cpu responsive\" updates top process", + "\"cpu direct\" updates top process", "directly."}, {"proc_reversed", "Reverse processes sorting order.", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/freebsd/btop_collect.cpp new/btop-1.2.4/src/freebsd/btop_collect.cpp --- old/btop-1.2.3/src/freebsd/btop_collect.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/freebsd/btop_collect.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -1201,12 +1201,16 @@ new_proc.name = kproc->ki_comm; char** argv = kvm_getargv(kd(), kproc, 0); if (argv) { - for (int i = 0; argv[i]; i++) { + for (int i = 0; argv[i] and cmp_less(new_proc.cmd.size(), 1000); i++) { new_proc.cmd += argv[i] + " "s; } if (not new_proc.cmd.empty()) new_proc.cmd.pop_back(); } if (new_proc.cmd.empty()) new_proc.cmd = new_proc.name; + if (new_proc.cmd.size() > 1000) { + new_proc.cmd.resize(1000); + new_proc.cmd.shrink_to_fit(); + } new_proc.ppid = kproc->ki_ppid; new_proc.cpu_s = round(kproc->ki_start.tv_sec); struct passwd *pwd = getpwuid(kproc->ki_uid); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/linux/btop_collect.cpp new/btop-1.2.4/src/linux/btop_collect.cpp --- old/btop-1.2.3/src/linux/btop_collect.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/linux/btop_collect.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -885,6 +885,9 @@ while (not diskread.eof()) { std::error_code ec; diskread >> dev >> mountpoint >> fstype; + diskread.ignore(SSmax, '\n'); + + if (v_contains(found, mountpoint)) continue; //? Match filter if not empty if (not filter.empty()) { @@ -918,7 +921,6 @@ } } - diskread.ignore(SSmax, '\n'); } //? Remove disks no longer mounted or filtered out if (swap_disk and has_swap) found.push_back("swap"); @@ -1494,7 +1496,7 @@ if (not pread.good()) continue; long_string.clear(); while(getline(pread, long_string, '\0')) { - new_proc.cmd += long_string + ' '; + new_proc.cmd += long_string + ' '; if (new_proc.cmd.size() > 1000) { new_proc.cmd.resize(1000); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.3/src/osx/btop_collect.cpp new/btop-1.2.4/src/osx/btop_collect.cpp --- old/btop-1.2.3/src/osx/btop_collect.cpp 2022-02-15 18:39:36.000000000 +0100 +++ new/btop-1.2.4/src/osx/btop_collect.cpp 2022-02-27 14:24:39.000000000 +0100 @@ -1258,7 +1258,7 @@ std::string_view proc_args(proc_chars.get(), argmax); if (size_t null_pos = proc_args.find('\0', sizeof(argc)); null_pos != string::npos) { if (size_t start_pos = proc_args.find_first_not_of('\0', null_pos); start_pos != string::npos) { - while (argc-- > 0 and null_pos != string::npos) { + while (argc-- > 0 and null_pos != string::npos and cmp_less(new_proc.cmd.size(), 1000)) { null_pos = proc_args.find('\0', start_pos); new_proc.cmd += (string)proc_args.substr(start_pos, null_pos - start_pos) + ' '; start_pos = null_pos + 1; @@ -1269,6 +1269,10 @@ } } if (new_proc.cmd.empty()) new_proc.cmd = f_name; + if (new_proc.cmd.size() > 1000) { + new_proc.cmd.resize(1000); + new_proc.cmd.shrink_to_fit(); + } new_proc.ppid = kproc.kp_eproc.e_ppid; new_proc.cpu_s = kproc.kp_proc.p_starttime.tv_sec * 1'000'000 + kproc.kp_proc.p_starttime.tv_usec; struct passwd *pwd = getpwuid(kproc.kp_eproc.e_ucred.cr_uid);
participants (1)
-
Source-Sync