On 2017-03-28 15:06 +0100, Ian Jackson wrote: > Craig Francis writes ("Line ending issue when "Reading database""): >> When running `apt-get upgrade` via a cron job, there is a "Reading database" >> section. >> >> In the email this appears as: > ... >> It's not a major issue, as it just breaks DKIM signing of emails; >> where the "\ r" is changed to a "\r\n" after the DKIM signature has >> been added. >> >> I've been informed by Julian Klode that this relates to `dpkg`: > > I think that these \r-terminated progress messages should be printed > only when the destination is a tty.
One problem here is that there is currently no option for dpkg to suppress the output entirely, see bug #539617[1]. The other one is that apt always runs dpkg in a tty, unless an undocumented option is used[2]. Adding "-o Dpkg::Use-Pty=0" to apt-get's commandline should at least get rid of the of the \r line breaks. Cheers, Sven 1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539617 2. https://sources.debian.net/src/apt/1.4~rc2/apt-pkg/deb/dpkgpm.cc/?hl=1222#L1222