|
Bugzilla – Full Text Bug Listing |
| Summary: | UI::RunInTerminal not available from commandline mode. | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.0 | Reporter: | Benjamin Weber <benji> |
| Component: | YaST2 | Assignee: | Katarina Machalkova <kmachalkova> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Alpha 2 | ||
| Target Milestone: | Alpha 2 | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
Test Case
Patch for testcase in comment #1 |
||
|
Description
Benjamin Weber
2008-02-12 11:21:35 UTC
Created attachment 194424 [details]
Test Case
From IRC:
(12:40:01) bubli: benJIman: Strange, it 'somehow' works for me ... but you have to run '/sbin/yast', not '/sbin/YaST2'
(12:40:36) benJIman: bubli: Well then it'll be using ncurses instead of Qt which might help.
(12:40:36) bubli: as 'YaST2' tries to initialize GUI, which does not implement RunInTerminal builtin
(12:41:30) bubli: But yet, the return value of system("echo hello") is 256, which is weird
RunInTerminal builtin uses system() to execute interactive command, which runs '/bin/sh -c echo hello'. It means that 'echo hello' returned 1 for some reason. Let me try strace ...
yast2-ncurses in openSUSE 10.3 does not implement file descriptor saving and restoring, it has been introduced later with enabled thread support in 11.0 (in fact, the code is there in 10.3 already, check for 'FIXME: enable these with thread support' comments, but it is commented out) Yast grabs stdout and stderr for itself and redirects it to y2log, so even if it leaves ncurses mode in UI::RunInTerminal temporarily, it still holds stdout and stderr. Newly launched ncurses app (e.g. shell) cannot write to terminal and exits with the above strange error code. This is already fixed in yast2-ncurses 2.16.10 Created attachment 194502 [details] Patch for testcase in comment #1 The commandline code is missing "guihandler". No clue what it is ;-) but it needs to be present to make CommandLine module happy. It may be just some dummy function returning YCP symbol (as in this case) I suppose we can close this one as fixed. Not for 10.3, but certainly for 11.0 |