Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 51781

Summary: ufed blows up after receiving dialog output that contains the use flags and errors from gpm.
Product: Gentoo Linux Reporter: Brandon Edens <brandon>
Component: Current packagesAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.