<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/install-progress.cc, branch 2.5.2</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.5.2</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.5.2'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2021-12-19T08:24:47Z</updated>
<entry>
<title>Fix incorrect SIGWINCH handling</title>
<updated>2021-12-19T08:24:47Z</updated>
<author>
<name>Zhang Boyang</name>
<email>zhangboyang.id@gmail.com</email>
</author>
<published>2021-12-01T16:21:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ec27853181d898f738ad20fed00f37a00d1d09c3'/>
<id>urn:sha1:ec27853181d898f738ad20fed00f37a00d1d09c3</id>
<content type='text'>
Previously, status line is redrawn in signal handler. However, the
drawing code make heavy use of std::string and other syscalls, which may
not be async-signal-safe. This will cause deadlock, overwritten errno,
even silent memory corruption.

This patch implemented Anders Kaseorg's idea. The signal handler will
only set a flag, which is async-signal-safe, and actual redrawing will
be deferred to PackageManagerFancy::Pulse().

Note that the virtual function PackageManagerFancy::Pulse() already
exists in base class but newly overridden in PackageManagerFancy, so the
ABI compatibility should be OK. However, existing compiled programs may
not aware of this new function and continue to use old Pulse() if
compiler had done heavy optimization. Fortunately this is not too
harmful because this will only cause status line not redrawing, which
may consider acceptable.

Closes: #852757
</content>
</entry>
<entry>
<title>Fix progress bar width for multibyte charsets</title>
<updated>2019-11-25T16:03:10Z</updated>
<author>
<name>Алексей Шилин</name>
<email>rootlexx@mail.ru</email>
</author>
<published>2019-11-22T22:04:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2497198e9599a6a8d4d0ad08627bcfc7ea49c644'/>
<id>urn:sha1:2497198e9599a6a8d4d0ad08627bcfc7ea49c644</id>
<content type='text'>
When using locale in which symbols occupy more than 1 byte (for example,
ru_RU.UTF-8), the progress bar width was calculated incorrectly because
std::string::size() returns the number of bytes rather than the number of
actual characters. Use the newly introduced APT::String::DisplayLength()
to calculate the width instead.
</content>
</entry>
<entry>
<title>Avoid implicitly promotion of float to double</title>
<updated>2018-05-04T22:34:22Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2018-05-04T17:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5f9c05db78926dfb063fdd0493ecc6b8e12c2e02'/>
<id>urn:sha1:5f9c05db78926dfb063fdd0493ecc6b8e12c2e02</id>
<content type='text'>
Reported-By: gcc -Wdouble-promotion
Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>remove pointless APT_PURE from void functions</title>
<updated>2017-12-14T20:55:34Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-12-14T20:44:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a6c7b262212d56a4ad37e6475f96152296ab1d0c'/>
<id>urn:sha1:a6c7b262212d56a4ad37e6475f96152296ab1d0c</id>
<content type='text'>
Earlier gcc versions used to complain that you should add them althrough
there isn't a lot of point to it if you think about it, but now gcc (&gt;= 8)
complains about the attribute being present.

warning: ‘pure’ attribute on function returning ‘void’ [-Wattributes]

Reported-By: gcc -Wattributes
Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>deal with floats without old-style cast</title>
<updated>2017-12-13T22:53:48Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-12-13T20:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0b5e329a8ba2461ccb7017d3adfc972f9dccd830'/>
<id>urn:sha1:0b5e329a8ba2461ccb7017d3adfc972f9dccd830</id>
<content type='text'>
We have no speed problem with handling floats/doubles in our progress
handling, but that shouldn't prevent us from cleaning up the handling
slightly to avoid unclean casting to ints.

Reported-By: gcc -Wdouble-promotion -Wold-style-cast
</content>
</entry>
<entry>
<title>Replace APT_CONST with APT_PURE everywhere</title>
<updated>2017-08-24T14:56:52Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-08-24T14:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0e4ac8334d02ea256f750ad61689f28ff1ebdf6c'/>
<id>urn:sha1:0e4ac8334d02ea256f750ad61689f28ff1ebdf6c</id>
<content type='text'>
As a follow up to the last commit, let's replace APT_CONST
with APT_PURE everywhere to clean stuff up.
</content>
</entry>
<entry>
<title>Reformat and sort all includes with clang-format</title>
<updated>2017-07-12T11:57:51Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-07-12T11:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=87274d0f22e1dfd99b2e5200e2fe75c1b804eac3'/>
<id>urn:sha1:87274d0f22e1dfd99b2e5200e2fe75c1b804eac3</id>
<content type='text'>
This makes it easier to see which headers includes what.

The changes were done by running

    git grep -l '#\s*include'  \
        | grep -E '.(cc|h)$' \
        | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/'

To modify all include lines by adding a space, and then running
./git-clang-format.sh.
</content>
</entry>
<entry>
<title>Use C locale instead of C.UTF-8 for protocol strings</title>
<updated>2016-08-26T20:17:13Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-08-23T18:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0fb16c3e678044d6d06ba8a6199b1e96487ee0d8'/>
<id>urn:sha1:0fb16c3e678044d6d06ba8a6199b1e96487ee0d8</id>
<content type='text'>
The C.UTF-8 locale is not portable, so we need to use C, otherwise
we crash on other systems. We can use std::locale::classic() for
that, which might also be a bit cheaper than using locale("C").
</content>
</entry>
<entry>
<title>prevent C++ locale number formatting in text APIs (try 3)</title>
<updated>2016-08-23T13:11:20Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-08-23T13:11:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0919f1df552ddf022ce4508cbf40e04eae5ef896'/>
<id>urn:sha1:0919f1df552ddf022ce4508cbf40e04eae5ef896</id>
<content type='text'>
This time it is the formatting of floating numbers in progress
reporting with a radix charater potentially not being dot.

Followup of 7303e11ff28f920a6277c159aa46f80c007350bb. Regression of
b58e2c7c56b1416a343e81f9f80cb1f02c128e25 in so far as it exchanging
very effected with slightly less effected code.

LP: 1611010
</content>
</entry>
<entry>
<title>don't perform int&lt;float in progress bar drawing</title>
<updated>2016-08-12T09:12:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-08-12T07:07:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1cb047079aa2c26a8159d100348b7e69a49bc117'/>
<id>urn:sha1:1cb047079aa2c26a8159d100348b7e69a49bc117</id>
<content type='text'>
Comparing floating numbers is always fun and in this instance a 9 &lt; 9.0
is "somehow" true on hurd-i386 letting the tests fail by reporting that
too much progress achieved. A bit mysterious, but with some rework we
can use code which avoids dealing with the floats in this way entirely
and make our testcases happy.
</content>
</entry>
</feed>
