Your message dated Sun, 22 Nov 2009 11:56:43 +0100
with message-id <[email protected]>
and subject line Re: squashfs-tools: don't display progress if !isatty(1)
has caused the Debian Bug report #520946,
regarding squashfs-tools: don't display progress if !isatty(1)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
520946: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520946
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: squashfs-tools
Version: 1:3.3-7
Severity: normal
Tags: patch
Hi,
it doesn't really make sense to display a progress bar if stdout is not
a tty, so check for that.
Cheers,
Julien
--- squashfs-3.3.orig/squashfs-tools/mksquashfs.c
+++ squashfs-3.3/squashfs-tools/mksquashfs.c
@@ -3708,6 +3708,11 @@
block_offset = check_data ? 3 : 2;
+ if(progress && !isatty(STDOUT_FILENO)) {
+ printf("standard output is not a tty, disabling progress
bar\n");
+ progress = FALSE;
+ }
+
if(progress) {
if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
printf("TIOCGWINZ ioctl failed, defaulting to 80
columns\n");
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.28-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- End Message ---
--- Begin Message ---
Version: 4.0-1
this has been fixed upstream, closing.
--
Address: Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email: [email protected]
Internet: http://people.panthera-systems.net/~daniel-baumann/
--- End Message ---