Package re-install loop on console after upgrade - package reinstall take ages on serial console
In fact, this is not an actual loop.... it's rather an innefiency in update_output_window() when $pkg_interface == "console".
The text is being output to the console, but the variable $static_output is still accumulating text, so update_output_window only prints repeated text, with some additions on every calls. That simply square the amount of character being sent to the console. On a 9600 link... reinstalling squid/squidguard packages takes more than an hour!
My fix is simple, but very ackward on the programming style. I added $static_output as a global variable, and then I clear its content after the "echo":