Sample Header Ad - 728x90

How do I get progress output from Aptitude?

1 vote
1 answer
386 views
I'm upgrading some packages using Aptitude, and I want to get some program-readable status updates. I thought I could direct dpkg --status-fd to a file I open in advance (regular file for this experiment, but ultimately a named pipe), like this:
aptitude -o 'Dpkg::Options::=--status-fd=3' install 3>dpkg-status-log
But it seems that Aptitude closes my file descriptor before it runs dpkg:
dpkg: error: unable to read filedescriptor flags for : Bad file descriptor
E: Sub-process /usr/bin/dpkg returned an error code (2)
Is there an alternative way to get some progress feedback, short of trying to parse standard output?
Asked by Toby Speight (9244 rep)
Feb 22, 2023, 02:48 PM
Last activity: Feb 22, 2023, 03:49 PM