Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#76614 - [pacman] undocumented output to standard error - or - optional dependencies not saved to pacman.log
Attached to Project:
Arch Linux
Opened by James (thx1138) - Friday, 18 November 2022, 03:33 GMT
Last edited by Toolybird (Toolybird) - Friday, 18 November 2022, 05:47 GMT
Opened by James (thx1138) - Friday, 18 November 2022, 03:33 GMT
Last edited by Toolybird (Toolybird) - Friday, 18 November 2022, 05:47 GMT
|
Detailspacman 6.0.2-5
$ pacman -Q pacman notInstlledPackage pacman 6.0.2-5 error: package 'notInstalledPackage' was not found $ pacman -Q notInstalledPackage | grep error error: package 'notInstalledPackage' was not found $ pacman -Q pacman notInstalledPackage | grep error | sed "s/[^']*'\([^']*\)'[^']*/\1/" error: package 'notInstalledPackage' was not found !!! pacman errors are output to standard error, not to standard output, AND, this behavior is not documented. "grepping" for packages which are not installed will produce an empty list unless, for instance, in bash, "2>&1" is explicitly specified. Maybe there is some other way to identify from a list, packages which have not been installed - specifically, those packages which are listed as optional dependencies to installed packages? Notably, "expac" does not disclose whether an optional dependency has, or has not, been installed. So, documenting this unexpected use of standard error by pacman would be courteous and helpful. This issue might not otherwise be a problem, except that "When installing a package, pacman will list a package's optional dependencies, but they will not be found in pacman.log." |
This task depends upon
Closed by Toolybird (Toolybird)
Friday, 18 November 2022, 05:47 GMT
Reason for closing: None
Additional comments about closing: See comments
Friday, 18 November 2022, 05:47 GMT
Reason for closing: None
Additional comments about closing: See comments
How in the world do you figure that errors being in stderr would be unexpected? It's literally part of the name.
The manpage for "pacman -T" says "return a list of dependencies that are not currently satisfied on the system", but this does *not* include optional dependencies. For instance, try "pacman -T tesseract". The tesseract package has many optional dependencies, but nothing will be shown.
The 2nd part is just a scripting exercise. Combining I/O redirection, exit status, and output from either `expac' or `pacman -Qi ...' will get you what you want. Please take any further discussion to the proper support channels (forum/IRC/etc).