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 <package status and progress file descriptor>: 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?
apt-get
revealsAPT::Status-Fd
config option. I think I can write my own answer based on what I found. Stand by! – Toby Speight Feb 22 '23 at 15:28