summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/progress.cc
Commit message (Collapse)AuthorAgeFilesLines
* typecast time_t and suseconds_t from std::chronoKhem Raj2022-09-161-1/+1
| | | | | | | | This fixes build on some architectures like mips progress.cc:125:31: error: non-constant-expression cannot be narrowed from type 'std::chrono::duration<long long>::rep' (aka 'long long') to '__time_t' (aka 'long') in initializer list [-Wc++11-narrowing] struct timeval NowTime = { Now_sec.count(), Now_usec.count() }; Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Show absolute time while waiting for lock instead of %, rework messageJulian Andres Klode2020-03-061-4/+12
| | | | | | | | | | | | | | | | | | | | | Showing a percentage for a timeout is pretty non-standard. Rework the progress class so it can show an absolute progress (currently hardcoded to use seconds as a unit). If there is a timeout (aka if it's not the maximum long long unsigned -1llu), then show the timeout, otherwise just count up seconds, e.g. Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 33842 (apt)... 1/120s or Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 33842 (apt)... 1s Also improve the error message to use "Waiting for cache lock: %s" instead of "... (%s)", as having multiple sentences inside parenthesis is super weird, as is having two closing parens. We pass the information via _config, as that's reasonably easy and avoids ABI hackage. It also provides an interesting debugging tool for other kinds of progress.
* Fix remaining usec vs sec time-delta calculation typosDavid Kalnischkies2020-02-061-1/+1
| | | | | | | | | | | | | | | | | | | While moving to a more stable clock in 79b61ae I typoed the microsecond calculation part and copied it all over the place… Julian fixed the first two instances in 089e6271 and Trent reported the apt-ftparchive instances leaving one instance in progress (invisible for user though). A bit ironic that in an attempt to stop "confusing (and amusing) users" I managed to hide a typo for close to two years doing just that… Sadly we can't really test this as while "apt-ftparchive generate /dev/null" is a great interactive test, it is hard to teach our test framework that the output is "reasonably below an hour" (usually 0s, but on busy test systems it is perhaps longer…). Thanks: Trent W. Buck for initial patch Closes: #950776 References: 79b61ae7673eb6213493e2cb202f0d70c390932d, 089e627153781ae7c320a5a0724c6c70d684b689
* Use a steady clock source for progress reportingDavid Kalnischkies2018-05-281-5/+12
| | | | | | Clock changes while apt is running can result in strange reports confusing (and amusing) users. Sadly, to keep the ABI for now the code is a bit more ugly than it would need to be.
* Remove obsolete RCS keywordsGuillem Jover2018-05-071-1/+0
| | | | Prompted-by: Jakub Wilk <jwilk@debian.org>
* Avoid implicitly promotion of float to doubleDavid Kalnischkies2018-05-051-1/+1
| | | | | Reported-By: gcc -Wdouble-promotion Gbp-Dch: Ignore
* deal with floats without old-style castDavid Kalnischkies2017-12-131-2/+3
| | | | | | | | 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
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-5/+5
| | | | | | | | | | | | | 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.
* new quiet level -qq for apt to hide progress outputDavid Kalnischkies2015-11-041-1/+1
| | | | | | | | | -q is for logging and -qqq (old -qq) basically kills every output expect errors, so there should be a way of declaring a middleground in which the output of e.g. 'update' isn't as verbose, but still shows some things. The test framework was actually making use of by accident as it ignored the quiet level in output setup for apt before. Eventually we should figure out some better quiet levels for all tools…
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+2
| | | | | | | | 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: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-6/+6
| | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
* include two missing patches to really fix bug #696225, thanks toMichael Vogt2013-03-011-1/+1
| | | Guillem Jover
* * apt-pkg/contrib/progress.cc:Michael Vogt2013-01-091-2/+2
| | | | | | - Make "..." translatable to fix inconsistencies in the output of e.g. apt-get update. While this adds new translatable strings, not having translations for them will not break anything. Thanks to Guillem Jover. Closes: #696225
* Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-4/+4
| | | | size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
* reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-2/+4
|
* fix SubProgress to accept a Percent parameter to update the CurrentDavid Kalnischkies2011-05-101-18/+9
| | | | with the text as otherwise the update will be ignored
* add the possibility to disable only the progress reporting stuff as theDavid Kalnischkies2010-11-301-1/+1
| | | | | quiet level 1 does this, but also disables other stuff we might want to test against in a testcase
* * make apt build with g++ 4.3Michael Vogt2007-09-101-0/+1
|
* * Removed the more leftover #pragma interface/implementationMichael Vogt2007-06-081-3/+0
|\ | | | | closes: #306937 (thanks to Andreas Henriksson for the patch)
| * * remove all the remaining #pragma implementationMichael Vogt2007-06-081-3/+0
| |
* | * apt-pkg/contrib/progress.ccMichael Vogt2006-12-071-1/+2
|/ | | | | | | | | | | | | - only check time on precent boundaries (seems to make a real difference on ARM, see debian #398381) * apt-pkg/contrib/sha256.cc: - added #pragma interface * apt-pkg/contrib/sha256.h: - remove unneeded stdint.h include * apt-pkg/vendorlist.cc: - fix qualifier to make it build with -O0 * po/: - make update-po
* * applied parts of the string speedup patch from debian #319377 (ABI change)Michael Vogt2005-11-231-2/+2
|
* Remove \r escape sequence for the sake of gettextArch Librarian2004-09-201-3/+3
| | | | | | Author: jgg Date: 2003-01-11 07:17:04 GMT Remove \r escape sequence for the sake of gettext
* G++3 fixes from RandolphArch Librarian2004-09-201-2/+5
| | | | | | Author: jgg Date: 2001-05-07 05:25:13 GMT G++3 fixes from Randolph
* Join with aliencodeArch Librarian2004-09-201-4/+10
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* Floating point error. Bug #64394Arch Librarian2004-09-201-5/+17
| | | | | | Author: jgg Date: 2000-06-05 04:22:25 GMT Floating point error. Bug #64394
* SyncArch Librarian2004-09-201-3/+29
| | | | | | Author: jgg Date: 1998-10-02 04:39:42 GMT Sync
* SyncArch Librarian2004-09-201-2/+4
| | | | | | Author: jgg Date: 1998-09-07 05:28:32 GMT Sync
* More progress updatesArch Librarian2004-09-201-1/+11
| | | | | | Author: jgg Date: 1998-08-26 04:52:23 GMT More progress updates
* Big changesArch Librarian2004-09-201-2/+8
| | | | | | Author: jgg Date: 1998-08-23 03:52:22 GMT Big changes
* Progress and combined cache generatorArch Librarian2004-09-201-2/+3
| | | | | | Author: jgg Date: 1998-07-26 04:51:45 GMT Progress and combined cache generator
* Progress and combined cache generatorArch Librarian2004-09-201-3/+6
| | | | | | Author: jgg Date: 1998-07-26 04:49:26 GMT Progress and combined cache generator
* Fixed some display glitchesArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1998-07-22 01:45:38 GMT Fixed some display glitches
* Generic progress meterArch Librarian2004-09-201-0/+151
Author: jgg Date: 1998-07-21 05:33:18 GMT Generic progress meter