Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#860931: apt: disable dpkg "Reading database" progress indicator under unattended-upgrades

146 views
Skip to first unread message

Paul Wise

unread,
Apr 22, 2017, 3:10:03 AM4/22/17
to
Package: apt
Version: 1.4
Severity: wishlist

I have unattended-upgrades enabled, with the report emailed to me. I
also have Unattended-Upgrade::MinimalSteps enabled, which means apt is
run many times for each unattended-upgrades run. Each run of apt within
the unattended-upgrades report prints a 22-line dpkg progress
indicator. The progress indicator multiplied by each apt run gives many
many lines of output to wade through. It would be great if apt would
make dpkg only print the first half of last line before starting to
read and the 2nd half of the last line after the database is read.
AFAICT, this is caused by apt's Dpkg::Use-Pty config option defaulting
to true, instead of checking if stdout is a terminal and only turning
the option on if it is.

(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 123456 files and directories currently installed.)

-- System Information:
Debian Release: 9.0
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (860, 'testing-proposed-updates'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  adduser                 3.115
ii  debian-archive-keyring  2014.3
ii  gpgv                    2.1.18-6
ii  init-system-helpers     1.47
ii  libapt-pkg5.0           1.4
ii  libc6                   2.24-9
ii  libgcc1                 1:6.3.0-12
ii  libstdc++6              6.3.0-12

Versions of packages apt recommends:
ii  gnupg   2.1.18-6
ii  gnupg1  1.4.21-2
ii  gnupg2  2.1.18-6

Versions of packages apt suggests:
pn  apt-doc         <none>
ii  aptitude        0.8.6-1
ii  dpkg-dev        1.18.23
ii  powermgmt-base  1.31+nmu1
ii  python-apt      1.4.0~beta2

-- no debconf information

--
bye,
pabs

https://wiki.debian.org/PaulWise
signature.asc

David Kalnischkies

unread,
Apr 22, 2017, 5:10:02 AM4/22/17
to
On Sat, Apr 22, 2017 at 03:06:47PM +0800, Paul Wise wrote:
> AFAICT, this is caused by apt's Dpkg::Use-Pty config option defaulting
> to true, instead of checking if stdout is a terminal and only turning
> the option on if it is.

Note that if you disable this option no terminal output is logged.
The logfile in question is /var/log/apt/term.log .


Best regards

David Kalnischkies
signature.asc

Paul Wise

unread,
Apr 22, 2017, 5:40:02 AM4/22/17
to
On Sat, 2017-04-22 at 10:58 +0200, David Kalnischkies wrote:

> Note that if you disable this option no terminal output is logged.
> The logfile in question is /var/log/apt/term.log .

Hmm, that definitely isn't what I want to happen.
signature.asc

Alexandre Detiste

unread,
Feb 24, 2023, 9:40:05 AM2/24/23
to
Hi,

I had to write a workaround for this at work, because we use Buster.

But it seams to be gone from Bookworm.

Can you check again ?
0 new messages