Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923178 - app-portage/gentoolkit-0.6.3-r1: "equery check" output is unusable when redirected to file
Summary: app-portage/gentoolkit-0.6.3-r1: "equery check" output is unusable when redir...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-29 01:33 UTC by John Hardin
Modified: 2024-01-29 16:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Hardin 2024-01-29 01:33:54 UTC
"equery check" is used to check the integrity of installed packages.

When this command is run interactively, the output looks wonderful, colorized with information clearly collated per-package.

But if the output is redirected to a file the formatting is stripped and the relationships between packages and results is lost.

It should be possible to run (e.g.) "equery check '*' > /tmp/equery_check.txt" and get usable results.



Reproducible: Always

Steps to Reproduce:
1. run "equery check '*' > /tmp/equery_check.txt"
2. Try to figure out what's broken from the contents of /tmp/equery_check.txt
Comment 1 Greg Kubaryk 2024-01-29 01:50:43 UTC
This doesn't appear to be a bug; if you don't want pipe detection, use -N/--no-pipe.
Comment 2 John Hardin 2024-01-29 16:00:46 UTC
That helps some, but the information is still presented out-of-order/uncollated:

davinci ~ # equery -N check 'app-admin/*' 2>&1 | tee eq.txt
!!! /etc/logrotate.conf has incorrect MD5sum
!!! /etc/sudoers has incorrect MD5sum
!!! /etc/logrotate.d/syslog-ng has incorrect MD5sum
* Checking app-admin/apache-tools-2.4.58 ...
* Checking app-admin/eselect-1.4.27-r1 ...
* Checking app-admin/gnome-system-log-3.9.90 ...
* Checking app-admin/keepassxc-2.7.6 ...
* Checking app-admin/logrotate-3.21.0 ...
* Checking app-admin/openrc-settingsd-1.4.0 ...
* Checking app-admin/perl-cleaner-2.31 ...
* Checking app-admin/sudo-1.9.15_p5 ...
* Checking app-admin/syslog-ng-4.2.0 ...
* Checking app-admin/system-config-printer-1.5.18-r1 ...
   35 out of 35 files passed

   64 out of 64 files passed

   68 out of 68 files passed

   84 out of 84 files passed

   23 out of 24 files passed

   35 out of 35 files passed

   7 out of 7 files passed

   78 out of 79 files passed

   497 out of 498 files passed

   167 out of 167 files passed


Without the -N it's even worse:

davinci ~ # equery check 'app-admin/*' 2>&1 | tee eq.txt
app-admin/apache-tools-2.4.58: app-admin/eselect-1.4.27-r1: app-admin/gnome-system-log-3.9.90: app-admin/keepassxc-2.7.6: app-admin/logrotate-3.21.0: app-admin/openrc-settingsd-1.4.0: app-admin/perl-cleaner-2.31: app-admin/sudo-1.9.15_p5: app-admin/syslog-ng-4.2.0: app-admin/system-config-printer-1.5.18-r1: failed(0)
failed(0)
failed(0)
failed(0)
failed(1)
failed(0)
failed(0)
failed(1)
failed(1)
failed(0)


What I'd expect absent output customization options is for the file to contain the same output as when it's run interactively:

davinci ~ # equery check 'app-admin/*'
* Checking app-admin/apache-tools-2.4.58 ...
   35 out of 35 files passed

* Checking app-admin/eselect-1.4.27-r1 ...
   64 out of 64 files passed

* Checking app-admin/gnome-system-log-3.9.90 ...
   68 out of 68 files passed

* Checking app-admin/keepassxc-2.7.6 ...
   84 out of 84 files passed

!!! /etc/logrotate.conf has incorrect MD5sum
* Checking app-admin/logrotate-3.21.0 ...
   23 out of 24 files passed

* Checking app-admin/openrc-settingsd-1.4.0 ...
   35 out of 35 files passed

* Checking app-admin/perl-cleaner-2.31 ...
   7 out of 7 files passed

!!! /etc/sudoers has incorrect MD5sum
* Checking app-admin/sudo-1.9.15_p5 ...
   78 out of 79 files passed

!!! /etc/logrotate.d/syslog-ng has incorrect MD5sum
* Checking app-admin/syslog-ng-4.2.0 ...
   497 out of 498 files passed

* Checking app-admin/system-config-printer-1.5.18-r1 ...
   167 out of 167 files passed