summaryrefslogtreecommitdiff
path: root/apt-pkg/install-progress.cc
Commit message (Collapse)AuthorAgeFilesLines
* Avoid implicitly promotion of float to doubleDavid Kalnischkies2018-05-051-1/+1
| | | | | Reported-By: gcc -Wdouble-promotion Gbp-Dch: Ignore
* remove pointless APT_PURE from void functionsDavid Kalnischkies2017-12-141-2/+2
| | | | | | | | | | | 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 (>= 8) complains about the attribute being present. warning: ‘pure’ attribute on function returning ‘void’ [-Wattributes] Reported-By: gcc -Wattributes Gbp-Dch: Ignore
* deal with floats without old-style castDavid Kalnischkies2017-12-131-4/+4
| | | | | | | | 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
* Replace APT_CONST with APT_PURE everywhereJulian Andres Klode2017-08-241-2/+2
| | | | | As a follow up to the last commit, let's replace APT_CONST with APT_PURE everywhere to clean stuff up.
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-7/+7
| | | | | | | | | | | | | 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.
* Use C locale instead of C.UTF-8 for protocol stringsJulian Andres Klode2016-08-261-2/+2
| | | | | | 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").
* prevent C++ locale number formatting in text APIs (try 3)David Kalnischkies2016-08-231-34/+39
| | | | | | | | | | | 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
* don't perform int<float in progress bar drawingDavid Kalnischkies2016-08-121-12/+8
| | | | | | | | Comparing floating numbers is always fun and in this instance a 9 < 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.
* prevent C++ locale number formatting in text APIsDavid Kalnischkies2016-05-271-55/+34
| | | | | | | | | | | Setting the C++ locale via std::locale::global(std::locale("")); which would otherwise default to the default C locale (aka: unaffected by setlocale) effects the formatting of numeric types in IO streams, which for output for humans is perfectly sensible, but breaks our many text interfaces used and parsed by us and others without expecting the numbers to be formatted. Closes: #825396
* flush line-clearing on progress stop before post-invokeDavid Kalnischkies2016-03-141-0/+1
| | | | | | | | | All other interactions with std::cout are flushed directly, just in the stop case we hadn't done it – no problem expect if there is still output coming after apt is done like in the case of a post-invoke script producing output. Closes: 793672
* Fix all the wrong removals of includes that iwyu got wrongMichael Vogt2015-08-171-0/+1
| | | | Git-Dch: ignore
* Cleanup includes after running iwyuMichael Vogt2015-08-171-2/+0
|
* Use terminfo's typical save_cursor/restore_cursor sequencesJames McCoy2015-08-161-4/+4
| | | | | | | | Not all terminals understand DOS' escape sequences for save/restore cursor, so use the more typical sequences from terminfo. Closes: #772521 Signed-off-by: James McCoy <jamessan@debian.org>
* make all d-pointer * const pointersDavid Kalnischkies2015-08-101-4/+4
| | | | | | | | | | | | | | Doing this disables the implicit copy assignment operator (among others) which would cause hovac if used on the classes as it would just copy the pointer, not the data the d-pointer points to. For most of the classes we don't need a copy assignment operator anyway and in many classes it was broken before as many contain a pointer of some sort. Only for our Cacheset Container interfaces we define an explicit copy assignment operator which could later be implemented to copy the data from one d-pointer to the other if we need it. Git-Dch: Ignore
* add d-pointer, virtual destructors and de-inline de/constructorsDavid Kalnischkies2015-06-161-0/+6
| | | | | | | | To have a chance to keep the ABI for a while we need all three to team up. One of them missing and we might loose, so ensuring that they are available is a very tedious but needed task once in a while. Git-Dch: Ignore
* fix another instance of warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-09-301-2/+2
| | | | Git-Dch: Ignore
* fix: Member variable 'X' is not initialized in the constructor.David Kalnischkies2014-09-271-0/+2
| | | | | Reported-By: cppcheck Git-Dch: Ignore
* force fancy progressbar redraw on window size changeDavid Kalnischkies2014-04-141-12/+23
| | | | | | | | | | | We always reacted on the size change, but the bar is only redraw if the precentage changes, which can take quiet a while in big upgrades, so with a bit of refactoring we can now call for a redraw immediate to fix this. This refactor also helps in avoiding obscure pitfalls clangs static analyser was complaining about (namely failure of ioctl resulting in garbage values in the struct).
* Add progressbar to "Dpkg::Progress-Fancy"Michael Vogt2014-03-271-11/+52
| | | | | | A text progressbar is now displayed in the Dpkg::Progress-Fancy mode. It can be turned off via the apt option Dpkg::Progress-Fancy::Progress-Bar=false
* make fancy-progress fg/bg color configurableMichael Vogt2014-03-271-2/+6
| | | | | Add two new options: Dpkg::Progress-Fancy::Progress-{fg,bg} that allows customizing the colors in the dpkg fancy progress output.
* follow method attribute suggestions by gccDavid Kalnischkies2014-03-131-2/+2
| | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-12/+18
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-2/+2
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-2/+2
| | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
* correct some style/performance/warnings from cppcheckDavid Kalnischkies2014-01-161-1/+1
| | | | | | | | The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
* Merge branch 'debian/sid' into bugfix/bts731738-fancy-progessMichael Vogt2013-12-281-0/+1
|\ | | | | | | | | Conflicts: apt-pkg/install-progress.cc
| * Fix conffile prompt regression (LP: #1260297)Michael Vogt2013-12-121-1/+1
| | | | | | | | | | This fixes a regression in the conffile prompt for the progress-fd and adds a testcase to ensure this does not regress again.
* | Merge remote-tracking branch 'origin/bugfix/bts731738-fancy-progess' into ↵Michael Vogt2013-12-281-2/+0
|\ \ | | | | | | | | | | | | | | | | | | bugfix/bts731738-fancy-progess Conflicts: apt-pkg/install-progress.cc
| * | first proof-of-concept for a fix for #731738Michael Vogt2013-12-221-1/+8
| |/
* | properly handle SIGWINCH in PackageManagerFancy againMichael Vogt2013-12-281-23/+42
| |
* | first proof-of-concept for a fix for #731738Michael Vogt2013-12-221-1/+8
|/
* Handle SIGWINCH in APT::Progress-Fancy=1Michael Vogt2013-12-061-7/+25
|
* small documentation updatesMichael Vogt2013-11-011-0/+4
|
* setup LINES in apt-pkg/install-progress.ccMichael Vogt2013-10-311-0/+5
|
* use StartDpkg() in PackageManagerProgressDeb822Fd as wellMichael Vogt2013-10-311-1/+1
|
* add new pid_t ExecFork(std::set<int> KeepFDs) to get rid of the super ugly ↵Michael Vogt2013-10-311-5/+1
| | | | APT::Keep-Fds hack and also add a new PackageManagerProgressFd::StartDpkg() progress state
* restore ABI and prepare next ABI via #if (APT_PKG_MAJOR >= 4 && ↵Michael Vogt2013-10-311-0/+22
| | | | APT_PKG_MINOR >= 13)
* fix install-progress locationMichael Vogt2013-10-221-2/+1
|
* move install-progress.{cc,h} to apt-pkgMichael Vogt2013-10-221-0/+306