Bug 148683

Summary: YaST2 modules are not run as separate processes from ncurses control centre
Product: [openSUSE] SUSE Linux 10.1 Reporter: Martin Vidner <mvidner>
Component: YaST2Assignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: nine
Version: Beta 3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: 148683-nonfix.patch
Patch for libyui
Patch for ncurses UI
Patch for menu.ycp and /sbin/yast script

Description Martin Vidner 2006-02-07 13:27:06 UTC
Timo reports:

Network Devices -> Network Card
-> Network Setup Method
alt-u / alt-n to switch to user controlled with NM
enter
same again: Network Devices -> Network Card (already there) -> Network Setup Method
alt-t / alt-n to switch to ifup
alt-n to accept
at this point we have a divergence between GUI and config file
yast shows: Traditional Mathod with ifup if you enter -> Network Card again
but: sysconfig/network/config has NETWORKMANAGER="yes"
it works with qt

The ncurses cc differs in keeping the yast modules from the previous run.
(It uses WFM::CallFunction instead of spawning a new y2base like qt does.) Perhaps I should change that because the behavior is then subtly different like in your case and it gets almost no testing.
Comment 1 Martin Vidner 2006-02-07 18:43:56 UTC
Created attachment 66861 [details]
148683-nonfix.patch

So I have tried this patch but it does not work in an unexpected way:
The module is run but the display is missing accented characters and it does not respond to keypresses (tried in Konsole).
Comment 2 Matthias Fruehauf 2006-05-03 15:59:58 UTC
Martin, can you update this bug?
Comment 3 Martin Vidner 2006-08-22 13:06:42 UTC
The problem is that we could not run a curses program while using yast2-ncurses. That is a different bug (to be looked up). But we may have made some progress on in because of w3m for the registration.
Comment 4 Martin Vidner 2006-08-22 13:11:59 UTC
Reassigning to the new maintainer of yast2-ncurses.
Comment 5 Katarina Machalkova 2006-11-21 15:22:43 UTC
*** Bug 221254 has been marked as a duplicate of this bug. ***
Comment 6 Katarina Machalkova 2006-12-04 16:06:24 UTC
Does anyone want to test the fix? You will need patched yast2-ncurses, yast2-core and yast2 itself.
It is pretty complex fix and it may break something else. That's why I'm asking for some test effort :-)
Comment 7 Martin Vidner 2006-12-04 16:09:50 UTC
Broken yast, yay, gimme gimme!
Comment 8 Bernhard Walle 2006-12-04 16:12:22 UTC
Are there pre-built RPMs for x86_64? Then yes :)
Comment 9 Katarina Machalkova 2006-12-05 14:25:26 UTC
Go ahead:
yast2-core: /work/built/mbuild/bragg-kmachalkova-3642
yast2: /work/built/mbuild/bragg-kmachalkova-3644
yast2-ncurses: /work/built/mbuild/bragg-kmachalkova-3648 (no i386, I'm sorry)

Hope that it won't crash ;-) 
What bothers me a bit is that I don't know how ncurses menu would react to patch restarting yast 
Comment 10 Katarina Machalkova 2006-12-06 14:11:54 UTC
Created attachment 108513 [details]
Patch for libyui
Comment 11 Katarina Machalkova 2006-12-06 14:13:37 UTC
Created attachment 108514 [details]
Patch for ncurses UI
Comment 12 Katarina Machalkova 2006-12-06 14:16:50 UTC
Created attachment 108515 [details]
Patch for menu.ycp and /sbin/yast script

Besides adjusting menu.ycp, I've somehow changed locale handling in YaST start script. The change is commented in the patch
Comment 13 Katarina Machalkova 2006-12-06 17:08:14 UTC
The fixed packages are yast2-2.15.0, yast2-ncurses-2.15.1 and yast2-core-2.15.1.

The only thing that needs to be settled is that UI::RunInTerminal builtin now returns integer (return code of system() call) at all times, while this condition from /sbin/yast:

if ((function == "online_update" && ret == -42) || ret == `restart_menu)

expect it to return symbol under certain circumstances. The place where it is used now is yast2 inst_source only. 
Reassigning to Lada for evaluating possible risk. If it is not a problem, feel free to close as fixed then :-)
Comment 14 Ladislav Slezák 2006-12-07 14:39:13 UTC
Symbol `restart_menu is not needed anymore, the reason was to restart ncurses menu to have a fresh package manager.

Removed in SVN (will be included in yast2-2.15.1, yast2-packager-2.15.2)
Comment 15 Katarina Machalkova 2007-03-23 14:54:56 UTC
*** Bug 252302 has been marked as a duplicate of this bug. ***