Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51781 - ufed blows up after receiving dialog output that contains the use flags and errors from gpm.
Summary: ufed blows up after receiving dialog output that contains the use flags and e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-22 18:56 UTC by Brandon Edens
Modified: 2004-12-08 20:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Edens 2004-05-22 18:56:48 UTC
On a recently installed Gentoo 2004.1 box, my ufed began to malfunction with the following error,
Nested quantifiers in regex; marked by <-- HERE in m/ ** <-- HERE * err [lib/liblow.c(329)]: / at /usr/sbin/ufed line 570.

Problem is that ncurses was linked against gpm. gpm was not in use/had not been setup. Attempts by ncurses to use gpm were sending messages to stderr which is also the discriptor that dialog spits out its results. So gpm's errors were embedded in dialog's stderr output (ie the flags listing). Solution was to open a file descriptor and have dialog dump its results to that file descriptor instead of stderr. ufed was modified to load its tempfile from that new discriptor instead of stderr. Major credit goes to Kevin Bryan for the file descriptor magick.

Here is the patch to ufed.
--- ufed.pl      2004-05-21 20:53:12.000000000 +0000
+++ ufed.pl        2004-05-21 20:54:12.000000000 +0000
@@ -284,8 +284,8 @@
       $items .= '"' . %use_desc_flags->{$flag} . '" ';
    }
 
-   $rc = system('DIALOG_ESC="" dialog 2>'
-               . $tempfile
+   $rc = system('exec 3> ' . $tempfile . ' ; DIALOG_ESC="" dialog '
+               . ' --output-fd 3'
                . ' --separate-output '
                . '--no-shadow --backtitle "Gentoo Linux USE flags editor '
                . $version . '" '

On a side note, noticed that GPM use flag had been yanked from ncurses as others must've seen results similar to what i witnessed with ncurses linked to gpm and gpm not enabled. So here's one ncurses+gpm problem fixed. 
Enjoy.
Brandon Edens

Reproducible: Didn't try
Steps to Reproduce:
1. Build ncurses with gpm support
2. disable gpm
3. execute ufed
4. Make changes to flags
5. Save
Actual Results:  
Nested quantifiers in regex; marked by <-- HERE in m/ ** <-- HERE * err
[lib/liblow.c(329)]: / at /usr/sbin/ufed line 570.

Expected Results:  
No error message should've been reported and the use flags should've been changed.

Unavailable.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 20:30:56 UTC
fixed in 0.35-r2.