summaryrefslogtreecommitdiff
path: root/apt-private/private-output.cc
Commit message (Collapse)AuthorAgeFilesLines
* support COLUMNS environment variable in apt toolsDavid Kalnischkies2017-11-191-2/+18
| | | | | | | apt usually gets the width of the window from the terminal or failing that has a default value, but especially for testing it can be handy to control the size as you can't be sure that variable sized content will always be linebreaked as expected in the testcases.
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-11/+11
| | | | | | | | | | | | | 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.
* Drop cacheiterators.h includeJulian Andres Klode2017-07-121-1/+0
| | | | | Including cacheiterators.h before pkgcache.h fails because pkgcache.h depends on cacheiterators.h.
* ask for releaseinfo change interactively in aptDavid Kalnischkies2017-06-281-11/+15
| | | | | | | If we have a user sitting around we can let 'apt' ask the user for a confirmation rather than print errors at the end and require the user to figure out which commandline flags are needed to confirm the changes non-interactively.
* fix various typos reported by spellintianDavid Kalnischkies2017-01-191-3/+3
| | | | | | | | Most of them in (old) code comments. The two instances of user visible string changes the po files of the manpages are fixed up as well. Gbp-Dch: Ignore Reported-By: spellintian
* show globalerrors before asking for confirmationDavid Kalnischkies2016-05-161-4/+23
| | | | | | | | | | | | | | Errors cause a kind of automatic no already, but warnings and notices are only displayed at the end of the apt execution even through they could effect the choice of saying yes/no to questions: E.g. if a configuration (file) was ignored you wanted to have an effect or if an external solver you used generated warnings suggesting that the solution might be valid, but bogus non-the-less and similar things. Note that this only moves those messages up to the question if the answer is interactive – not if e.g. -y is used or no question is asked at all so this has an effect only on interactive usage of apt(-get), not script who might be parsing apt output.
* Try avoiding loading long package descriptionAdrian Wielgosik2016-02-021-1/+2
| | | | | | | | | | | It's a fairly expensive call and it's called on every package, even though it's usually only used when we're interested in a small number of packages. Long description is currently only shown by this function when using `apt search X --full`. On my PC, this patch speeds up `apt list` by roughly 20% and `apt list --installed` by 1-2%.
* show or-groups in not-installed recommends and suggests listsDavid Kalnischkies2015-08-101-60/+0
| | | | | | | | Further abstracting our new ShowList allows to use it for containers of strings as well giving us the option to implement an or-groups display for the recommends and suggests lists which is a nice trick given that it also helps with migrating the last remaining other cases of old ShowList.
* implement a more generic ShowList methodDavid Kalnischkies2015-08-101-136/+127
| | | | | | | | | | | | | | | apt-get is displaying various lists of package names, which until now it was building as a string before passing it to ShowList, which inserted linebreaks at fitting points and showed a title if needed, but it never really understood what it was working with. With the help of C++11 the new generic knows not only what it works with, but generates the list on the fly rather than asking for it and potentially discarding parts of the input (= the non-default verbose display). It also doubles as a test for how usable the CacheSets are with C++11. (Not all callers are adapted yet.) Git-Dch: Ignore
* fix memory leaks reported by -fsanitizeDavid Kalnischkies2015-08-101-9/+14
| | | | | | | | Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
* use the same code to detect quiet setting in all toolsDavid Kalnischkies2014-11-091-4/+4
| | | | Git-Dch: Ignore
* implement --full in apt searchDavid Kalnischkies2014-09-071-14/+31
|
* use a format string in ListSingleVersionDavid Kalnischkies2014-09-071-72/+75
| | | | | | | | The method already deals with a format string, but had an else path doing a hardcoded format as well. This is changed now to use the same code for both - the format in the second case is still fixed though. Git-Dch: Ignore
* Ensure we have a Policy in CacheFile.BuildDepCache()Michael Vogt2014-09-051-4/+1
| | | | | | This partly reverts d059cc2 and fixes bug #753297 in a more general way by ensuring that CacheFile.BuildDepCache() builds a pkgPolicy if there isn't one already.
* Fix incorrect upgradable listing in "apt list" (thanks to Michael Musenbrock)Michael Vogt2014-09-051-1/+4
| | | | | | | | | | The "apt list" command was using only the pkgDepCache but not the pkgPolicy to figure out if a package is upgradable. This lead to incorrect display of upgradable package when the user used the policy to pin-down packages. Thanks to Michael Musenbrock for the initial patch. Closes: #753297
* Avoid yielding blank lines with APT::Cmd::use-format=trueAndreas Oberritter2014-09-021-1/+1
|
* Only show packages as upgradable if the have a CandidateVer != 0Michael Vogt2014-07-081-2/+3
| | | | Closes: #753297
* show our broken packages message in 'apt' solverDavid Kalnischkies2014-06-181-96/+108
|
* apt-private/private-output.cc: fix cppcheck outputMichael Vogt2014-06-101-1/+1
|
* fix screen width detection for apt/apt-get listsSebastian Schmidt2014-05-221-0/+1
| | | | | | | 3163087b moved SigWinch(int) from apt-get.cc to private-output.cc without moving #include <sys/ioctl.h>, making SigWinch a nop. Closes: 748430, 747942
* Fix missing ScreenWidth check in apt.ccMichael Vogt2014-04-281-0/+21
|
* fix apt list output for pkgs in dpkg ^rc stateMichael Vogt2014-04-081-0/+4
| | | | | | Packages in the "deinstall ok config-file" have no candidate or instaleld version. So they must be special cased in the apt list generation.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-4/+10
| | | | | | | | 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-3/+3
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-131-8/+8
| | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
* move isatty() check into InitOutput()Michael Vogt2014-02-051-0/+3
|
* show "status" in apt list lastMichael Vogt2014-01-311-25/+24
|
* do not crash if VF.File()/VF.File().Archive() is NULLMichael Vogt2014-01-301-2/+4
|
* add missing integration test for "apt list"Michael Vogt2014-01-171-3/+5
|
* do not show summary in "apt list"Michael Vogt2013-11-251-4/+8
|
* fix vim-style foldmarkerDavid Kalnischkies2013-09-031-20/+18
| | | | Git-Dch: Ignore
* squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-121-0/+753
experimental