FS#20683 - Output of pacman -Suq should be quieter
Attached to Project:
Pacman
Opened by Chris van Dijk (quigybo) - Tuesday, 31 August 2010, 13:31 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Tuesday, 31 August 2010, 22:26 GMT
Opened by Chris van Dijk (quigybo) - Tuesday, 31 August 2010, 13:31 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Tuesday, 31 August 2010, 22:26 GMT
|
Details
Description:
Even when using --quiet with pacman -Su, pacman outputs the following line(s): :: Starting full system upgrade... there is nothing to do As -Su is useful in combination with --print to get information on outdated packages for scripting purposes, the above lines are not needed. Additional info: pacman 3.4.0-2 Steps to reproduce: pacman -Su --quiet --print |
This task depends upon
It's an easy workaround but a '--really-quiet' option would be fine too :-)
pacman -Qu | cut -d " " -f 2
or some similar awking?
Also, -Qu will only give already installed packages that need to be upgraded, while -Su will show all packages that will be installed upon --sysupgrade. This therefore includes new packages that could be installed if a currently installed package has any new dependencies upon upgrade.
A trivial example is shown in a thread started by Karol (https://bbs.archlinux.org/viewtopic.php?id=103714) where a simple script shows the upgradeable packages and their versions. While similar functionality can be achieved using -Qu instead of -Su, in post #18 I mention the issue of new dependencies.
A non-trivial example is where a user would want to use an external download accelerator such as aria2 to download the packages for an upgrade with:
# pacman -Sup --print-format "%l" | aria2c -i - -d "$CACHEDIR" && pacman -Su
In this case aria queues and concurrently downloads several packages at once, thus similar functionality can not be achieved with XferCommand in pacman.conf.
Note that currently the aforementioned ":: Starting full system upgrade..." lines need to be filtered out before aria.
In this example listing the new dependencies is much more critical than in the first example, and thus highlights the need to use -Su over -Qu.
# pacman -Suq 2>/dev/null
:: Starting full system upgrade...
there is nothing to do
# pacman -Su
:: Starting full system upgrade...
there is nothing to do
and
# pacman -Suq
:: Starting full system upgrade...
there is nothing to do
It would be nice if the '-q' switch magically kept pacman quiet by not printing these lines.
FS#41223exposes one difference. (-Su respects the pacman config while -Qu does not.)