defoma-hints sends interactive output to stdout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
defoma (Debian) |
Fix Released
|
Unknown
|
|||
defoma (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Automatically imported from Debian bug report #263270 http://
Debian Bug Importer (debzilla) wrote : | #1 |
Debian Bug Importer (debzilla) wrote : | #2 |
Message-Id: <20040803154023
Date: Tue, 03 Aug 2004 11:40:23 -0400
From: Ambrose Li <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: defoma-hints sends interactive output to stdout
Package: defoma
Version: 0.11.8
Severity: grave
Justification: renders package unusable
The defoma-hints in sid is for some reason sending its interactive output to
stdout instead of stderr. Since the normal usage for defoma-hints requires
its stdout to be redirected to the hints file, this causes defoma-hints to be
practically unusable:
$ defoma-hints -c type1 foo.pfb > foo.hints
Wait for second...
<nothing happens after a really line time>
It is not possible to interrupt defoma-hints, and it is necessary to press the
Enter key blindly. If I look at the hints file, I find that the output contains
both the ncurses interface and the hints data, like this:
category type1
ESC[
[...more control codes skipped...]
lbegin /path/to/foo.pfb
FontName = foo
Charset = font-specific
Family = foo
GeneralFamily = Roman
Weight = Medium
Width = Variable
Shape = Upright
Priority = 20
AFM = /path/to/foo.afm
end
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-ow1
Locale: LANG=C, LC_CTYPE=C
Versions of packages defoma depends on:
ii dialog 1.0-20040721-1 Displays user-friendly dialog boxe
ii file 4.09-1 Determines file type using "magic"
ii perl 5.8.4-2 Larry Wall's Practical Extraction
ii whiptail 0.51.6-9 Displays user-friendly dialog boxe
-- no debconf information
Matt Zimmerman (mdz) wrote : | #3 |
Anyone know about defoma? I've never had cause to use defoma-hints, so clearly
it doesn't make the package unusable. downgrading.
In Debian Bug tracker #263270, Jurij Smakov (jurij) wrote : Patch for defoma problem in sid | #4 |
tags 263270 + patch
thanks
Hello,
The patch below takes care of the defoma-hints problem. Whiptail/dialog
output their GUI to stdout, so the only way to prevent GUI from ending
up in the hints file is to redirect it to stderr. However stderr is used
by default to output the user's choice. The patch forces the user's choice
output to go to fd 3 (using --output-fd 3 option to whiptail), which is
dup2'ed to the child's pipe end and gets returned to the parent, while
child's stout and stderr get discarded. With the patch it appears to work
as expected.
-------
--- defoma-
+++ defoma-
@@ -1,3 +1,5 @@
+use POSIX;
+
my $dialog = '/usr/bin/
$dialog = '/usr/bin/dialog' unless (-x $dialog);
@@ -7,7 +9,8 @@
my $pid = fork();
if ($pid == 0) {
close(
- open(STDERR, ">&CHILD_WRITER");
+ dup2(fileno(
+ open(STDOUT, ">&STDERR");
exec(@_);
die("exec failure: $_[0]");
}
@@ -83,7 +86,7 @@
# my $item=$output;
# chomp $item; # For gdialog, which returns strings with newlines.
- my $item = safe_redirect(
+ my $item = safe_redirect(
$title, @options, $type, $text, $height, 80, @vars);
$result = ($result >> 8);
-------
Best regards,
Jurij Smakov <email address hidden>
Key: http://
In Debian Bug tracker #263270, Jurij Smakov (jurij) wrote : Tagging patch | #5 |
tags 263270 patch
thanks
Jurij Smakov <email address hidden>
Key: http://
Debian Bug Importer (debzilla) wrote : | #6 |
Message-ID: <Pine.LNX.
Date: Sat, 14 Aug 2004 01:05:22 -0400 (EDT)
From: Jurij Smakov <email address hidden>
To: <email address hidden>
cc: Ambrose Li <email address hidden>
Subject: Patch for defoma problem in sid
tags 263270 + patch
thanks
Hello,
The patch below takes care of the defoma-hints problem. Whiptail/dialog
output their GUI to stdout, so the only way to prevent GUI from ending
up in the hints file is to redirect it to stderr. However stderr is used
by default to output the user's choice. The patch forces the user's choice
output to go to fd 3 (using --output-fd 3 option to whiptail), which is
dup2'ed to the child's pipe end and gets returned to the parent, while
child's stout and stderr get discarded. With the patch it appears to work
as expected.
-------
--- defoma-
+++ defoma-
@@ -1,3 +1,5 @@
+use POSIX;
+
my $dialog = '/usr/bin/
$dialog = '/usr/bin/dialog' unless (-x $dialog);
@@ -7,7 +9,8 @@
my $pid = fork();
if ($pid == 0) {
close(
- open(STDERR, ">&CHILD_WRITER");
+ dup2(fileno(
+ open(STDOUT, ">&STDERR");
exec(@_);
die("exec failure: $_[0]");
}
@@ -83,7 +86,7 @@
# my $item=$output;
# chomp $item; # For gdialog, which returns strings with newlines.
- my $item = safe_redirect(
+ my $item = safe_redirect(
$title, @options, $type, $text, $height, 80, @vars);
$result = ($result >> 8);
-------
Best regards,
Jurij Smakov <email address hidden>
Key: http://
Debian Bug Importer (debzilla) wrote : | #7 |
Message-ID: <Pine.LNX.
Date: Sat, 14 Aug 2004 01:17:34 -0400 (EDT)
From: Jurij Smakov <email address hidden>
To: <email address hidden>
Subject: Tagging patch
tags 263270 patch
thanks
Jurij Smakov <email address hidden>
Key: http://
In Debian Bug tracker #263270, Frank Lichtenheld (djpig) wrote : Fixed in NMU of defoma 0.11.8-0.1 | #8 |
tag 263270 + fixed
quit
This message was generated automatically in response to a
non-maintainer upload. The .changes file follows.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sat, 21 Aug 2004 19:27:43 +0200
Source: defoma
Binary: defoma dfontmgr defoma-doc psfontmgr
Architecture: source all
Version: 0.11.8-0.1
Distribution: unstable
Urgency: high
Maintainer: Angus Lees <email address hidden>
Changed-By: Frank Lichtenheld <email address hidden>
Description:
defoma - Debian Font Manager -- automatic font configuration framework
defoma-doc - Debian Font Manager documentation
dfontmgr - GUI frontend for Defoma, DEbian FOnt MAnager
psfontmgr - PostScript font manager -- part of Defoma, Debian Font Manager
Closes: 263270
Changes:
defoma (0.11.8-0.1) unstable; urgency=high
.
* NMU
* Apply patch by Jurij Smakov to fix redirecting the output
streams (Closes: #263270)
Files:
bd7b3c0d90160e
16089981074efd
d11d7b51189fd8
2320d7cd7a2637
82d87f3940cc02
15d1426217e3e5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBJ5URQbn
tXEfsdWdkYEoDRS
=O4fm
-----END PGP SIGNATURE-----
Debian Bug Importer (debzilla) wrote : | #9 |
Message-Id: <email address hidden>
Date: Sat, 21 Aug 2004 14:47:15 -0400
From: Frank Lichtenheld <email address hidden>
To: <email address hidden>
Cc: Frank Lichtenheld <email address hidden>, Angus Lees <email address hidden>
Subject: Fixed in NMU of defoma 0.11.8-0.1
tag 263270 + fixed
quit
This message was generated automatically in response to a
non-maintainer upload. The .changes file follows.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sat, 21 Aug 2004 19:27:43 +0200
Source: defoma
Binary: defoma dfontmgr defoma-doc psfontmgr
Architecture: source all
Version: 0.11.8-0.1
Distribution: unstable
Urgency: high
Maintainer: Angus Lees <email address hidden>
Changed-By: Frank Lichtenheld <email address hidden>
Description:
defoma - Debian Font Manager -- automatic font configuration framework
defoma-doc - Debian Font Manager documentation
dfontmgr - GUI frontend for Defoma, DEbian FOnt MAnager
psfontmgr - PostScript font manager -- part of Defoma, Debian Font Manager
Closes: 263270
Changes:
defoma (0.11.8-0.1) unstable; urgency=high
.
* NMU
* Apply patch by Jurij Smakov to fix redirecting the output
streams (Closes: #263270)
Files:
bd7b3c0d90160e
16089981074efd
d11d7b51189fd8
2320d7cd7a2637
82d87f3940cc02
15d1426217e3e5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBJ5URQbn
tXEfsdWdkYEoDRS
=O4fm
-----END PGP SIGNATURE-----
In Debian Bug tracker #263270, Frank Lichtenheld (djpig) wrote : Re: Bug#263270: Patch for defoma problem in sid | #10 |
> child's stout and stderr get discarded. With the patch it appears to work
> as expected.
I verified the patch and uploaded a NMU with the following final
patch.
diff -Naur defoma-
--- defoma-
+++ defoma-
@@ -1,3 +1,11 @@
+defoma (0.11.8-0.1) unstable; urgency=high
+
+ * NMU
+ * Apply patch by Jurij Smakov to fix redirecting the output
+ streams (Closes: #263270)
+
+ -- Frank Lichtenheld <email address hidden> Sat, 21 Aug 2004 19:27:43 +0200
+
defoma (0.11.8) unstable; urgency=low
* Fix some typos and engrish in dfontmgr.1, closes: #234329.
diff -Naur defoma-
--- defoma-
+++ defoma-
@@ -1,3 +1,5 @@
+use POSIX;
+
my $dialog = '/usr/bin/
$dialog = '/usr/bin/dialog' unless (-x $dialog);
@@ -7,7 +9,8 @@
my $pid = fork();
if ($pid == 0) {
close(
- open(STDERR, ">&CHILD_WRITER");
+ dup2(fileno(
+ open(STDOUT, ">&STDERR");
exec(@_);
die("exec failure: $_[0]");
}
@@ -83,7 +86,7 @@
# my $item=$output;
# chomp $item; # For gdialog, which returns strings with newlines.
- my $item = safe_redirect(
+ my $item = safe_redirect(
$title, @options, $type, $text, $height, 80, @vars);
$result = ($result >> 8);
Gruesse,
--
Frank Lichtenheld <email address hidden>
www: http://
Debian Bug Importer (debzilla) wrote : | #11 |
Message-ID: <email address hidden>
Date: Sat, 21 Aug 2004 23:25:17 +0200
From: Frank Lichtenheld <email address hidden>
To: <email address hidden>, <email address hidden>
Cc: Ambrose Li <email address hidden>
Subject: Re: Bug#263270: Patch for defoma problem in sid
> child's stout and stderr get discarded. With the patch it appears to work
> as expected.
I verified the patch and uploaded a NMU with the following final
patch.
diff -Naur defoma-
--- defoma-
+++ defoma-
@@ -1,3 +1,11 @@
+defoma (0.11.8-0.1) unstable; urgency=high
+
+ * NMU
+ * Apply patch by Jurij Smakov to fix redirecting the output
+ streams (Closes: #263270)
+
+ -- Frank Lichtenheld <email address hidden> Sat, 21 Aug 2004 19:27:43 +0200
+
defoma (0.11.8) unstable; urgency=low
* Fix some typos and engrish in dfontmgr.1, closes: #234329.
diff -Naur defoma-
--- defoma-
+++ defoma-
@@ -1,3 +1,5 @@
+use POSIX;
+
my $dialog = '/usr/bin/
$dialog = '/usr/bin/dialog' unless (-x $dialog);
@@ -7,7 +9,8 @@
my $pid = fork();
if ($pid == 0) {
close(
- open(STDERR, ">&CHILD_WRITER");
+ dup2(fileno(
+ open(STDOUT, ">&STDERR");
exec(@_);
die("exec failure: $_[0]");
}
@@ -83,7 +86,7 @@
# my $item=$output;
# chomp $item; # For gdialog, which returns strings with newlines.
- my $item = safe_redirect(
+ my $item = safe_redirect(
$title, @options, $type, $text, $height, 80, @vars);
$result = ($result >> 8);
Gruesse,
--
Frank Lichtenheld <email address hidden>
www: http://
Thom May (thombot) wrote : | #12 |
defoma (0.11.8ubuntu1) warty; urgency=low
.
* Apply patch by Jurij Smakov to fix redirecting the output
streams (Closes Warty #532)
In Debian Bug tracker #263270, Angus Lees (gus) wrote : severity of 217652 is grave, merging 217652 263270 | #13 |
# Automatically generated email from bts, devscripts version 2.8.5
severity 217652 grave
merge 217652 263270
Debian Bug Importer (debzilla) wrote : | #14 |
Message-Id: <email address hidden>
Date: Sun, 5 Dec 2004 10:08:09 +1100
From: Angus Lees <email address hidden>
To: <email address hidden>
Subject: severity of 217652 is grave, merging 217652 263270
# Automatically generated email from bts, devscripts version 2.8.5
severity 217652 grave
merge 217652 263270
In Debian Bug tracker #263270, Angus Lees (gus) wrote : Bug#263270: fixed in defoma 0.11.9 | #15 |
Source: defoma
Source-Version: 0.11.9
We believe that the bug you reported is fixed in the latest version of
defoma, which is due to be installed in the Debian FTP archive:
defoma-
to pool/main/
defoma_0.11.9.dsc
to pool/main/
defoma_
to pool/main/
defoma_
to pool/main/
dfontmgr_
to pool/main/
psfontmgr_
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Angus Lees <email address hidden> (supplier of updated defoma package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 22 Jun 2006 22:29:34 +0100
Source: defoma
Binary: defoma dfontmgr defoma-doc psfontmgr
Architecture: source all
Version: 0.11.9
Distribution: unstable
Urgency: low
Maintainer: Angus Lees <email address hidden>
Changed-By: Angus Lees <email address hidden>
Description:
defoma - Debian Font Manager -- automatic font configuration framework
defoma-doc - Debian Font Manager documentation
dfontmgr - GUI frontend for Defoma, DEbian FOnt MAnager
psfontmgr - PostScript font manager -- part of Defoma, Debian Font Manager
Closes: 257777 263270 269035 273502 274434 281722 290219 300278 307305 316138 325466 365954 368609 368611
Changes:
defoma (0.11.9) unstable; urgency=low
.
* Use the word "License" instead of "Copyright" in
debian/
* Fix spelling errors in /etc/defoma/
eyes of Andrew T. Young (Closes: #316138).
* Acknowledge NMU, thanks (Closes: #263270).
- FIXME: adapt it so it doesn't assume fd 3 is available
* Improve a few defoma-doc.doc-base files, closes: #281722.
* Bug fix: "defoma: formatting error in the Defoma::Common.3pm man
page", thanks to Nicolas François (Closes: #274434).
* Bug fix: "example in manual page for defoma-hints", thanks to Martin
Kourim (Closes: #257777).
* Use dh_installman to install mangpages, closes: #273502.
* Move debhelper from Build-Depends-Indep to Build-Depends, since its
used in the 'clean' target.
* Rejig binary-{arch,indep} split, so binary-arch does nothing.
* Update to Standards-Version 3.6.2.0.
* Adjust debhelper files to only run defoma commands if they exist.
This should allow packages to downgrade dependencies on defoma safely.
Closes: #300278
* Bug fix: "Hints generator default width initializer checks wrong
variable", thanks to Tyson Whitehead (Closes: #368609).
* Bug fix: "Type1 hints generator roman family does not default to
serif", th...
Changed in defoma: | |
status: | Fix Committed → Fix Released |
Automatically imported from Debian bug report #263270 http:// bugs.debian. org/263270