Pacman

Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
Tasklist

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
Task Type Feature Request
Category General
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version 3.4.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 3
Private No

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

Comment by Karol Błażewicz (karol) - Friday, 03 September 2010, 05:28 GMT
pacman -Su --quiet --print | sed 1,2d

It's an easy workaround but a '--really-quiet' option would be fine too :-)
Comment by Dan McGee (toofishes) - Sunday, 12 September 2010, 22:21 GMT
Why would you be using -Su and not -Qu?
Comment by Karol Błażewicz (karol) - Sunday, 12 September 2010, 22:28 GMT
-Su is better for scripting. Is there a way to show just the version numbers with 'pacman -Q' other than

pacman -Qu | cut -d " " -f 2

or some similar awking?
Comment by Chris van Dijk (quigybo) - Monday, 13 September 2010, 06:14 GMT
As Karol hinted at, --print-format does not work with -Qu - actually it does not work with -Q at all, maybe this should be a separate bug?

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.
Comment by Chris van Dijk (quigybo) - Monday, 13 September 2010, 07:07 GMT
To elaborate a little on some possible use cases;

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.
Comment by Tony (grai) - Sunday, 27 March 2011, 00:24 GMT
I think it would suffice to print the messages to stderr rather than stdout. Scripts could redirect them to /dev/null.
Comment by Devin J. Pohly (djpohly) - Sunday, 27 March 2011, 15:10 GMT
+1 for stderr. That would make a lot of sense when using pacman for scripting. For example, it would also allow the important messages from install scripts to be redirected separately from "(1/10) upgrading foo" and emailed to a sysadmin.
Comment by Karol Błażewicz (karol) - Tuesday, 31 January 2012, 12:40 GMT
Status?
Comment by Chris van Dijk (quigybo) - Wednesday, 01 February 2012, 14:46 GMT
pacman 4.0.1 is still pretty chatty:

# pacman -Suq 2>/dev/null
:: Starting full system upgrade...
there is nothing to do
Comment by Allan McRae (Allan) - Saturday, 04 August 2012, 08:20 GMT
Non error output will not be printed to stderr, so a different approach will be needed.
Comment by Karol Błażewicz (karol) - Saturday, 04 August 2012, 14:59 GMT
There's no difference between
# 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.
Comment by Allan McRae (Allan) - Saturday, 04 August 2012, 21:08 GMT
Thanks for restating the bug report. We would be entirely lost without your helpful comment...
Comment by Kyle Keen (keenerd) - Wednesday, 19 November 2014, 14:34 GMT
Just to expand on "Why would you be using -Su and not -Qu?", because they are different.  FS#41223  exposes one difference. (-Su respects the pacman config while -Qu does not.)
Comment by Allan McRae (Allan) - Wednesday, 19 November 2014, 14:46 GMT
-Qu now print [Ignored] beside ignored updated.

Loading...