apt-get -o quiet=1 dist-upgrade isn't quiet anymore

Bug #1448917 reported by Arne Bockholdt on 2015-04-27
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Undecided
Unassigned
dpkg (Ubuntu)
Undecided
Unassigned

Bug Description

Description: Ubuntu 15.04
Release: 15.04

apt:
  Installed: 1.0.9.7ubuntu4
  Candidate: 1.0.9.7ubuntu4
  Version table:
 *** 1.0.9.7ubuntu4 0
        500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status

Current:

Until updating from Utopic to Vivid apt-get with command line parameter "-o quiet 1" did not output the progress as formatted text. Since the update the progress is written to stdout as formatted text. This breaks a lot of scripts, e.g. the cron-apt package with mail send enabled. The attached text is no longer text only and will be encoded as binary, so the mail is unreadable.

Expected:

Same behaviour as with version from Utopic, no progress output

David Kalnischkies (donkult) wrote :

About what progress reporting are we talking here? (apt has a gazillion steps which have independent progress reporting, so "progress report" is a tat too unspecific).

If we are talking about the "(Reading database" in the output you attached, this isn't even coming from apt – this is coming from dpkg [and apt never controlled the (non-)quietness of dpkg], so in that case you want to talk to them instead.

Oops, no need for such a (kind of) rude answer =(

Yes, I mean the "(Reading database..." messages and I have not looked into the code of apt to tell where they come from. All I know is that the call to apt-get with quiet option isn't quiet anymore, the behaviourof apt-get from a user point of view has changed from Utopic to Vivid, so this is a valid bug report for this package and the version mentioned. It is a real life problem as it breaks at least the package cron-apt as I mentioned in the bug report above.

The maintainer of it should now decide how to proceed with it...

David Kalnischkies (donkult) wrote :

Sorry if my previous comment came across as rude, it wasn't intended as such. It was just meant as a quick reply (I was in a hurry) to clear up what is the topic of this bug as incomplete reports aren't actionable.

(An incomplete bug isn't necessarily the fault of the bugreporter as someone can hardly think of everything and/or an important fact to know for upstream isn't obvious to someone who isn't deeply involved with the package in question. So, no critic meant either.)

So, with my apt upstream hat, I am reassigning to dpkg even through I know that this is caused by a change in apt, but the problem is that dpkg has a non-overrideable check for terminal output or not (and because as mentioned apt quiet option never influenced dpkg. Otherwise quiet=2 wouldn't have output at all, but what it does is in fact reduce the output to mostly just dpkg output).

The apt change in question is that dpkg is properly called in (most) cases in a pseudo-terminal, so it's looking always like dpkg is running in a terminal. We need this in apt to be able to log the output (term.log) as well as show the output of dpkg (and subsequently programs called by it like debconf) correctly. See e.g. debbug #765687. The 1.0.9.x versions contain various fixes (and fixes of fixes) in this regard.
You can tell apt to not use a pseudo-terminal for dpkg with -o Dpkg::Use-Pty=0 , but that carries all the disadvantages I mentioned earlier and more and is therefore not advised.

affects: apt (Ubuntu) → dpkg (Ubuntu)
Mike Pontillo (mpontillo) wrote :

This bug also affects MAAS, since it clutters our hardware testing output with things like:

    (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ..

Changed in dpkg (Ubuntu):
status: New → Confirmed
Changed in maas:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers