Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package btop for openSUSE:Factory checked in 
at 2021-11-09 23:55:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/btop (Old)
 and      /work/SRC/openSUSE:Factory/.btop.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "btop"

Tue Nov  9 23:55:02 2021 rev:7 rq:930481 version:1.0.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/btop/btop.changes        2021-11-05 
22:58:28.608276433 +0100
+++ /work/SRC/openSUSE:Factory/.btop.new.1890/btop.changes      2021-11-09 
23:55:30.499980077 +0100
@@ -1,0 +2,14 @@
+Tue Nov  9 14:57:37 UTC 2021 - Scott Bradnick <scott.bradn...@suse.com> - 
1.0.24
+
+- Update to upstream release 1.0.24:
+  * Changed: Collection ordering
+  * Fixed: Restore all escape seq mouse modes on exit
+  * Fixed: SIGINT not cleaning up on exit
+
+- Update to upstream relaese 1.0.23:
+  * Fixed: Config parser missing first value when not including version header
+  * Fixed: Vim keys menu lists selection
+  * Fixed: Stall when clearing input queue on exit and queue is >1
+  * Fixed: Inconsistent behaviour of "q" key in the menus
+
+-------------------------------------------------------------------

Old:
----
  v1.0.22.tar.gz

New:
----
  v1.0.24.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ btop.spec ++++++
--- /var/tmp/diff_new_pack.3uZWJb/_old  2021-11-09 23:55:30.959980311 +0100
+++ /var/tmp/diff_new_pack.3uZWJb/_new  2021-11-09 23:55:30.959980311 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           btop
-Version:        1.0.22
+Version:        1.0.24
 Release:        0
 Summary:        Usage and stats for processor, memory, disks, network and 
processes
 License:        Apache-2.0

++++++ v1.0.22.tar.gz -> v1.0.24.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.0.22/CHANGELOG.md new/btop-1.0.24/CHANGELOG.md
--- old/btop-1.0.22/CHANGELOG.md        2021-11-03 22:11:31.000000000 +0100
+++ new/btop-1.0.24/CHANGELOG.md        2021-11-09 10:03:37.000000000 +0100
@@ -1,3 +1,21 @@
+## v1.0.24
+
+* Changed: Collection ordering
+
+* Fixed: Restore all escape seq mouse modes on exit
+
+* Fixed: SIGINT not cleaning up on exit
+
+## v1.0.23
+
+* Fixed: Config parser missing first value when not including version header
+
+* Fixed: Vim keys menu lists selection
+
+* Fixed: Stall when clearing input queue on exit and queue is >1
+
+* Fixed: Inconsistent behaviour of "q" key in the menus
+
 ## v1.0.22
 
 * Fixed: Bad values for disks and network on 32-bit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.0.22/src/btop.cpp new/btop-1.0.24/src/btop.cpp
--- old/btop-1.0.22/src/btop.cpp        2021-11-03 22:11:31.000000000 +0100
+++ new/btop-1.0.24/src/btop.cpp        2021-11-09 10:03:37.000000000 +0100
@@ -53,7 +53,7 @@
                {"#801414", "????????????????????????   ?????????   
????????????????????????????????????        ?????????    ?????????"},
                {"#000000", "?????????????????????    ?????????    
????????????????????? ?????????"},
        };
-       const string Version = "1.0.22";
+       const string Version = "1.0.24";
 
        int coreCount;
        string overlay;
@@ -79,6 +79,8 @@
 
        atomic<bool> resized (false);
        atomic<bool> quitting (false);
+       atomic<bool> should_quit (false);
+       atomic<bool> should_sleep (false);
        atomic<bool> _runner_started (false);
 
        bool arg_tty = false;
@@ -208,7 +210,6 @@
        }
 
        Config::write();
-       Input::clear();
 
        //? Wait for any remaining Tools::atomic_lock destructors to finish for 
max 1000ms
        for (int i = 0; Tools::active_locks > 0 and i < 100; i++) {
@@ -216,6 +217,7 @@
        }
 
        if (Term::initialized) {
+               Input::clear();
                Term::restore();
        }
 
@@ -254,10 +256,24 @@
 void _signal_handler(const int sig) {
        switch (sig) {
                case SIGINT:
-                       clean_quit(0);
+                       if (Runner::active) {
+                               Global::should_quit = true;
+                               Runner::stopping = true;
+                               Input::interrupt = true;
+                       }
+                       else {
+                               clean_quit(0);
+                       }
                        break;
                case SIGTSTP:
-                       _sleep();
+                       if (Runner::active) {
+                               Global::should_sleep = true;
+                               Runner::stopping = true;
+                               Input::interrupt = true;
+                       }
+                       else {
+                               _sleep();
+                       }
                        break;
                case SIGCONT:
                        _resume();
@@ -363,10 +379,10 @@
        //? ------------------------------- Secondary thread: async launcher 
and drawing ----------------------------------
        void * _runner(void * _) {
                (void)_;
-               //? Block all signals in this thread to avoid deadlock from any 
signal handlers trying to stop this thread
+               //? Block some signals in this thread to avoid deadlock from 
any signal handlers trying to stop this thread
                sigemptyset(&mask);
-               sigaddset(&mask, SIGINT);
-               sigaddset(&mask, SIGTSTP);
+               // sigaddset(&mask, SIGINT);
+               // sigaddset(&mask, SIGTSTP);
                sigaddset(&mask, SIGWINCH);
                sigaddset(&mask, SIGTERM);
                pthread_sigmask(SIG_BLOCK, &mask, NULL);
@@ -414,84 +430,83 @@
 
                        //* Run collection and draw functions for all boxes
                        try {
-                               //? PROC
-                               if (v_contains(conf.boxes, "proc")) {
+                               //? CPU
+                               if (v_contains(conf.boxes, "cpu")) {
                                        try {
-                                               if (Global::debug) 
debug_timer("proc", collect_begin);
+                                               if (Global::debug) 
debug_timer("cpu", collect_begin);
 
                                                //? Start collect
-                                               auto proc = 
Proc::collect(conf.no_update);
+                                               auto cpu = 
Cpu::collect(conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("proc", draw_begin);
+                                               if (Global::debug) 
debug_timer("cpu", draw_begin);
 
                                                //? Draw box
-                                               if (not pause_output) output += 
Proc::draw(proc, conf.force_redraw, conf.no_update);
+                                               if (not pause_output) output += 
Cpu::draw(cpu, conf.force_redraw, conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("proc", draw_done);
+                                               if (Global::debug) 
debug_timer("cpu", draw_done);
                                        }
                                        catch (const std::exception& e) {
-                                               throw 
std::runtime_error("Proc:: -> " + (string)e.what());
+                                               throw std::runtime_error("Cpu:: 
-> " + (string)e.what());
                                        }
                                }
 
-
-                               //? NET
-                               if (v_contains(conf.boxes, "net")) {
+                               //? MEM
+                               if (v_contains(conf.boxes, "mem")) {
                                        try {
-                                               if (Global::debug) 
debug_timer("net", collect_begin);
+                                               if (Global::debug) 
debug_timer("mem", collect_begin);
 
                                                //? Start collect
-                                               auto net = 
Net::collect(conf.no_update);
+                                               auto mem = 
Mem::collect(conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("net", draw_begin);
+                                               if (Global::debug) 
debug_timer("mem", draw_begin);
 
                                                //? Draw box
-                                               if (not pause_output) output += 
Net::draw(net, conf.force_redraw, conf.no_update);
+                                               if (not pause_output) output += 
Mem::draw(mem, conf.force_redraw, conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("net", draw_done);
+                                               if (Global::debug) 
debug_timer("mem", draw_done);
                                        }
                                        catch (const std::exception& e) {
-                                               throw std::runtime_error("Net:: 
-> " + (string)e.what());
+                                               throw std::runtime_error("Mem:: 
-> " + (string)e.what());
                                        }
                                }
 
-                               //? MEM
-                               if (v_contains(conf.boxes, "mem")) {
+                               //? NET
+                               if (v_contains(conf.boxes, "net")) {
                                        try {
-                                               if (Global::debug) 
debug_timer("mem", collect_begin);
+                                               if (Global::debug) 
debug_timer("net", collect_begin);
 
                                                //? Start collect
-                                               auto mem = 
Mem::collect(conf.no_update);
+                                               auto net = 
Net::collect(conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("mem", draw_begin);
+                                               if (Global::debug) 
debug_timer("net", draw_begin);
 
                                                //? Draw box
-                                               if (not pause_output) output += 
Mem::draw(mem, conf.force_redraw, conf.no_update);
+                                               if (not pause_output) output += 
Net::draw(net, conf.force_redraw, conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("mem", draw_done);
+                                               if (Global::debug) 
debug_timer("net", draw_done);
                                        }
                                        catch (const std::exception& e) {
-                                               throw std::runtime_error("Mem:: 
-> " + (string)e.what());
+                                               throw std::runtime_error("Net:: 
-> " + (string)e.what());
                                        }
                                }
 
-                               //? CPU
-                               if (v_contains(conf.boxes, "cpu")) {
+                               //? PROC
+                               if (v_contains(conf.boxes, "proc")) {
                                        try {
-                                               if (Global::debug) 
debug_timer("cpu", collect_begin);
+                                               if (Global::debug) 
debug_timer("proc", collect_begin);
 
                                                //? Start collect
-                                               auto cpu = 
Cpu::collect(conf.no_update);
+                                               auto proc = 
Proc::collect(conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("cpu", draw_begin);
+                                               if (Global::debug) 
debug_timer("proc", draw_begin);
 
                                                //? Draw box
-                                               if (not pause_output) output += 
Cpu::draw(cpu, conf.force_redraw, conf.no_update);
+                                               if (not pause_output) output += 
Proc::draw(proc, conf.force_redraw, conf.no_update);
 
-                                               if (Global::debug) 
debug_timer("cpu", draw_done);
+                                               if (Global::debug) 
debug_timer("proc", draw_done);
                                        }
                                        catch (const std::exception& e) {
-                                               throw std::runtime_error("Cpu:: 
-> " + (string)e.what());
+                                               throw 
std::runtime_error("Proc:: -> " + (string)e.what());
                                        }
                                }
                        }
@@ -843,6 +858,8 @@
                while (not true not_eq not false) {
                        //? Check for exceptions in secondary thread and exit 
with fail signal if true
                        if (Global::thread_exception) exit(1);
+                       else if (Global::should_quit) exit(0);
+                       else if (Global::should_sleep) { Global::should_sleep = 
false; _sleep(); }
 
                        //? Make sure terminal size hasn't changed (in case of 
SIGWINCH not working properly)
                        term_resize();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.0.22/src/btop_config.cpp 
new/btop-1.0.24/src/btop_config.cpp
--- old/btop-1.0.22/src/btop_config.cpp 2021-11-03 22:11:31.000000000 +0100
+++ new/btop-1.0.24/src/btop_config.cpp 2021-11-09 10:03:37.000000000 +0100
@@ -530,9 +530,8 @@
                        vector<string> valid_names;
                        for (auto &n : descriptions)
                                valid_names.push_back(n[0]);
-                       string v_string;
-                       getline(cread, v_string, '\n');
-                       if (not s_contains(v_string, Global::Version))
+                       
+                       if (string v_string; cread.peek() != '#' or 
(getline(cread, v_string, '\n') and not s_contains(v_string, Global::Version)))
                                write_new = true;
                        while (not cread.eof()) {
                                cread >> std::ws;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.0.22/src/btop_input.cpp 
new/btop-1.0.24/src/btop_input.cpp
--- old/btop-1.0.22/src/btop_input.cpp  2021-11-03 22:11:31.000000000 +0100
+++ new/btop-1.0.24/src/btop_input.cpp  2021-11-09 10:03:37.000000000 +0100
@@ -95,7 +95,7 @@
        string get() {
                string key;
                while (cin.rdbuf()->in_avail() > 0 and key.size() < 100) key += 
cin.get();
-               if (cin.rdbuf()->in_avail() > 0) 
cin.ignore(cin.rdbuf()->in_avail());
+               if (cin.rdbuf()->in_avail() > 0) clear();
                if (not key.empty()) {
                        //? Remove escape code prefix if present
                        if (key.substr(0, 2) == Fx::e) {
@@ -175,7 +175,11 @@
        }
 
        void clear() {
-               if (cin.rdbuf()->in_avail() > 0) cin.ignore(SSmax);
+               auto first_num = cin.rdbuf()->in_avail();
+               while (cin.rdbuf()->in_avail() == first_num) {
+                       if (first_num-- == 0) break;
+                       cin.ignore(1);
+               }
        }
 
        void process(const string& key) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.0.22/src/btop_menu.cpp 
new/btop-1.0.24/src/btop_menu.cpp
--- old/btop-1.0.22/src/btop_menu.cpp   2021-11-03 22:11:31.000000000 +0100
+++ new/btop-1.0.24/src/btop_menu.cpp   2021-11-09 10:03:37.000000000 +0100
@@ -892,10 +892,7 @@
                                };
                        }
                }
-               else if (key == "q") {
-                       exit(0);
-               }
-               else if (is_in(key, "escape", "m", "mouse_click")) {
+               else if (is_in(key, "escape", "q", "m", "mouse_click")) {
                        return Closed;
                }
                else if (key.starts_with("button_")) {
@@ -1142,8 +1139,8 @@
                                auto& optList = optionsList.at(option).get();
                                int i = v_index(optList, Config::getS(option));
 
-                               if (key == "right" and ++i >= 
(int)optList.size()) i = 0;
-                               else if (key == "left" and --i < 0) i = 
optList.size() - 1;
+                               if ((key == "right" or (vim_keys and key == 
"l")) and ++i >= (int)optList.size()) i = 0;
+                               else if ((key == "left" or (vim_keys and key == 
"h")) and --i < 0) i = optList.size() - 1;
                                Config::set(option, optList.at(i));
 
                                if (option == "color_theme")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.0.22/src/btop_tools.hpp 
new/btop-1.0.24/src/btop_tools.hpp
--- old/btop-1.0.22/src/btop_tools.hpp  2021-11-03 22:11:31.000000000 +0100
+++ new/btop-1.0.24/src/btop_tools.hpp  2021-11-09 10:03:37.000000000 +0100
@@ -100,7 +100,7 @@
        const string clear_end = Fx::e + "0J";
        const string clear_begin = Fx::e + "1J";
        const string mouse_on = Fx::e + "?1002h" + Fx::e + "?1015h" + Fx::e + 
"?1006h"; //? Enable reporting of mouse position on click and release
-       const string mouse_off = Fx::e + "?1002l";
+       const string mouse_off = Fx::e + "?1002l" + Fx::e + "?1015l" + Fx::e + 
"?1006l";
        const string mouse_direct_on = Fx::e + "?1003h"; //? Enable reporting 
of mouse position at any movement
        const string mouse_direct_off = Fx::e + "?1003l";
        const string sync_start = Fx::e + "?2026h"; //? Start of terminal 
synchronized output

Reply via email to