[Bug 633719] New: y2base always returns code 020 at exit
https://bugzilla.novell.com/show_bug.cgi?id=633719 https://bugzilla.novell.com/show_bug.cgi?id=633719#c0 Summary: y2base always returns code 020 at exit Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: P5 - None Component: YaST2 AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: rpmcruz@alunos.dcc.fc.up.pt QAContact: jsrain@novell.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Ant.com Toolbar 2.0.1 Firefox/3.6.8 y2base always returns code non-zero even when exiting successfully. Code 020 to be precise. You can tell by running it through gdb. That's of course heterodox behavior, and presumably that was not always how it behaved, because /sbin/yast2 checks whether y2base returns 0 or not (see exit_trap()). Such check is obviously unnecessary now. It is annoying because any little error message is displayed by /sbin/yast2 as if it crashed (see bug 629020). Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c
yang xiaoyu
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c1
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c2
Martin Vidner
y2base always returns code non-zero even when exiting successfully. Code 020 to be precise.
1) gdb says "Program exited with code 020." which is in octal (wonderful! thanks gdb!) and means 16. That is returned by y2base when the YCP script returns false to mean failure. 2) Also, /sbin/yast2 has exit_trap() { # handily, exit_code is set to $? of y2base. # If there was an error and there is anything to display, pop up. if [ $exit_code != 0 -a -s $ERRLOG ]; then display_error_file $ERRLOG fi rm -f $ERRLOG } 3) And yast2-gtk spills many warnings (contrary to yast2-qt). All this contributes to the annoying popup. I think we should tune the condition above, maybe to if [ $exit_code -gt 128 ] to catch only signals. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c3
Ricardo Cruz
3) And yast2-gtk spills many warnings (contrary to yast2-qt).
The bug report I referenced to (bug 629020) is a yast2-qt issue. That user had changed WANTED_GUI to "qt" and was experiencing that warning message in 11.3. As it turns out, all Qt programs are printing warning message when running in Gnome (when using the now default QGtkStyle). Any gtk warning in yast2-gtk is directed to the y2log channel, not stdout. If you have seen errors in the stdout or the yast logs whose line starts by "[gtk]", please fill up a report that I will have a look. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c4
--- Comment #4 from Ricardo Cruz
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c5
--- Comment #5 from Ricardo Cruz
Exit code of y2base is normally 0 on my system. Please provide YaST log.
Okay. I generalized too quickly. Apparently, some tools exit cleanly. Here are a few I've tried. Exit cleanly: network, timezone, disk Exit 020: sw_single, online_update, users, firewall, bootloader, sysconfig, runlevel Also, tried out the y2base (ncurses) in a 11.2 Gnome LiveCD and I can already see this happening there. (though, again, not for 11.0) Important note: I now see they only exit 020 when I start and exit them by pressing cancel. If I run the procedure through, they do return 0. That suggests the behavior is intentional. So, probably we should go with Martin's suggestion (comment 2). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c6
Ricardo Cruz
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c7
Ricardo Cruz
https://bugzilla.novell.com/show_bug.cgi?id=633719
https://bugzilla.novell.com/show_bug.cgi?id=633719#c8
Martin Vidner
participants (1)
-
bugzilla_noreply@novell.com