Bug#776753: unattended-upgrades: dpkg log extraneously include progress indicator

2015-02-04 Thread Alexandre Detiste
 probably involves some poking at the dpkg source code
 to figure out if there is a config switch or a
 environment variable to stop dpkg from showing this progress.

dpkg just does isatty(1), nothing fancy
http://anonscm.debian.org/cgit/dpkg/dpkg.git/tree/lib/dpkg/progress.c

 That sounds plausible, if systemd-cron runs the jobs inside a
 pty that explains what you see.

systemd-run unattended-upgrades will show the same behaviour,
without needing to install systemd-cron. (this create a one-time service)

I tried various tests, and isatty(1) allways returned the expected value.

I can't find why isatty(1) doesn't work when called from u-u.

#include unistd.h
#include stdio.h
int main()
{
  printf(isatty(stdout) = %d\n, isatty(1));
  fprintf(stderr, isatty(stderr) = %d\n, isatty(1));
  return 0;
}

root@antec:/home/tchet# ./a.out 
isatty(stdout) = 1
isatty(stderr) = 1
root@antec:/home/tchet# ./a.out  /dev/null 
isatty(stderr) = 0
root@antec:/home/tchet# ./a.out | cat
isatty(stdout) = 0
isatty(stdout) = 0


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#776753: unattended-upgrades: dpkg log extraneously include progress indicator

2015-02-04 Thread Michael Vogt
On Wed, Feb 04, 2015 at 02:09:01PM +0100, Alexandre Detiste wrote:
  I can not reproduce this on my workstation, I don't have a raspi here
  right now to test it against that. Do you see this on a normal sid
  also or is this specific to the package set for the raspi?
 
 This is not Raspi specific at all.
 The only think modified by their patch is the default configuration file.
 
 I thought it was because of 'Dpkg::Progress-Fancy 1;'
 as advertised, but it doesn't seem to be the case.
 
 Maybe it's because I use systemd-cron instead of cron
 and the tty or environment is not set the same way
 and then dpkg or it's python wrapper doesn't know it
 shouldn't display a progress bar.

Thanks! That sounds plausible, if systemd-cron runs the jobs inside a
pty that explains what you see. Is this the case? If so I will have to
think a bit what can be done, probably involves some poking at the
dpkg source code to figure out if there is a config switch or a
environment variable to stop dpkg from showing this progress.

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#539617: Bug#776753: unattended-upgrades: dpkg log extraneously include progress indicator

2015-02-04 Thread Alexandre Detiste
Ok, 776753 is the same bug as this one:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539617


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#776753: unattended-upgrades: dpkg log extraneously include progress indicator

2015-02-04 Thread Michael Vogt
On Sun, Feb 01, 2015 at 12:09:25PM +0100, Alexandre Detiste wrote:
 Package: unattended-upgrades
 Version: 0.81+rpi1
 Severity: minor

Thanks for your bugreport.
 
[..]
 I have found a way to get rid of those lines;
 but this is not a proper fix;
 and only work with my current locale:
 
  if stanza_start = install_start_time:
  found_start = True
 -if found_start:
 +if found_start and not line.startswith('(Lecture de la base de 
 données...'):
  content.append(line)
 
 problem also found on 0.83.3, but hidden by other bug #776752
[..]

I can not reproduce this on my workstation, I don't have a raspi here
right now to test it against that. Do you see this on a normal sid
also or is this specific to the package set for the raspi?

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#776753: unattended-upgrades: dpkg log extraneously include progress indicator

2015-02-04 Thread Alexandre Detiste

 I can not reproduce this on my workstation, I don't have a raspi here
 right now to test it against that. Do you see this on a normal sid
 also or is this specific to the package set for the raspi?

This is not Raspi specific at all.
The only think modified by their patch is the default configuration file.

I thought it was because of 'Dpkg::Progress-Fancy 1;'
as advertised, but it doesn't seem to be the case.

Maybe it's because I use systemd-cron instead of cron
and the tty or environment is not set the same way
and then dpkg or it's python wrapper doesn't know it
shouldn't display a progress bar.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#776753: unattended-upgrades: dpkg log extraneously include progress indicator

2015-02-01 Thread Alexandre Detiste
Package: unattended-upgrades
Version: 0.81+rpi1
Severity: minor

Dear Maintainer,

dpkg log erroneously include dpkg progress indicator;
this is maybe a bug in python3-apt.

I have found a way to get rid of those lines;
but this is not a proper fix;
and only work with my current locale:

 if stanza_start = install_start_time:
 found_start = True
-if found_start:
+if found_start and not line.startswith('(Lecture de la base de 
données...'):
 content.append(line)

problem also found on 0.83.3, but hidden by other bug #776752

-

Journal d'installation du paquet :
Log started: 2015-01-25  06:23:23
(Lecture de la base de données... 
(Lecture de la base de données... 5%
(Lecture de la base de données... 10%
(Lecture de la base de données... 15%
(Lecture de la base de données... 20%
(Lecture de la base de données... 25%
(Lecture de la base de données... 30%
(Lecture de la base de données... 35%
(Lecture de la base de données... 40%
(Lecture de la base de données... 45%
(Lecture de la base de données... 50%
(Lecture de la base de données... 55%
(Lecture de la base de données... 60%
(Lecture de la base de données... 65%
(Lecture de la base de données... 70%
(Lecture de la base de données... 75%
(Lecture de la base de données... 80%
(Lecture de la base de données... 85%
(Lecture de la base de données... 90%
(Lecture de la base de données... 95%
(Lecture de la base de données... 100%
(Lecture de la base de données... 52655 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../libicu52_52.1-7_armhf.deb ...

-- System Information:
Distributor ID: Raspbian
Description:Raspbian GNU/Linux 8.0 (jessie)
Release:8.0
Codename:   jessie
Architecture: armv6l

Kernel: Linux 3.12.28+ (PREEMPT)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org