Bug 211392

Summary: Better error message instead of "the ncurses frontend is installed but does not work"
Product: [openSUSE] openSUSE 10.3 Reporter: Andreas Hanke <andreas.hanke>
Component: YaST2Assignee: Martin Vidner <mvidner>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: casualprogrammer, kkaempf, snwint
Version: Beta 2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Demonstration patch
Maybe nicer
yast2-ui.diff

Description Andreas Hanke 2006-10-10 17:58:16 UTC
If parts of yast2 or its dependencies are not correctly installed, yast2 currently reports:

warning: the ncurses frontend is installed but does not work
You need to install yast2-ncurses to use the YaST2 text mode interface

This is misleading because

- The message "does not work" is not detailed enough
- "You need to install yast2-ncurses" is not always correct because yast2-ncurses might be installed just fine

Suggestions:

- The script uses ldconfig to determine if the frontend is correctly installed, show the ldconfig errors in addition to the "does not work" text

- Change the message "You need to install yast2-ncurses" to something like "You need to install yast2-ncurses and its dependencies" or "You need to verify yast2-ncurses" or give a hint about "rpm -V yast2-ncurses"
Comment 1 Andreas Hanke 2006-10-10 20:48:42 UTC
To reproduce:

% rm /usr/lib*/libyui.so.2
% yast2
warning: the qt frontend is installed but does not work
warning: the ncurses frontend is installed but does not work
You need to install yast2-ncurses to use the YaST2 text mode interface



I would prefer a message like:

% rm /usr/lib*/libyui.so.2
% yast2
warning: the qt frontend is installed but does not work
        libyui.so.2 => not found
warning: the ncurses frontend is installed but does not work
        libyui.so.2 => not found
You need to install yast2-ncurses to use the YaST2 text mode interface



The attached patch implements that - in a ruther ugly way, it is meant to demonstrate what I mean.

The reason is, with the current implementation, the user never reaches a point where he can see what's wrong.
Comment 2 Andreas Hanke 2006-10-10 20:49:13 UTC
Created attachment 101167 [details]
Demonstration patch
Comment 3 Andreas Hanke 2006-10-11 02:09:42 UTC
Created attachment 101183 [details]
Maybe nicer
Comment 4 Andreas Hanke 2006-10-11 05:49:35 UTC
The other part is the message in /sbin/yast2, line 189.

The current message "You need to install yast2-ncurses to use the YaST2 text mode interface" is appropriate under the assumption that the user can only reach this point if he is in text mode and yast2-ncurses does not work.

But that assumption is not correct, the user can as well reach this point if he is in graphical mode and none of either yast2-ncurses or yast2-qt works.
Comment 5 Lukas Ocilka 2006-10-16 08:15:13 UTC
rpm -qf /usr/lib/YaST2/bin/yast2-funcs
   -> yast2

mvidner did the very last entry there :)
Comment 6 Martin Vidner 2006-10-16 09:26:32 UTC
Comment 3: good idea, applied.

Comment 4: I'd like to redirect the output of the entire script to xmessage in such situations, but I haven't found out how exactly
Comment 7 Martin Vidner 2006-10-25 14:08:54 UTC
OK, the key is "exec &> >(xmessage)", but it doesnt seem to work with kdesu/gnomesu.
Comment 8 Martin Vidner 2007-04-12 14:40:55 UTC
Anyway, submitted in yast2-2.15.27.
Comment 9 Klaus Kämpf 2007-08-30 09:31:40 UTC
*** Bug 265263 has been marked as a duplicate of this bug. ***
Comment 10 Klaus Kämpf 2007-08-30 09:32:57 UTC
Apparently, its not completely fixed since xmessage popups are shown too often (see bug 265263 for the full thread)
Comment 11 Steffen Winterfeldt 2007-08-30 09:41:22 UTC
Nice try, Klaus. :-) Adjusting severity to match bug 265263.
Comment 12 Aaron Bockover 2007-08-30 16:08:58 UTC
This bug is not a dup of bug 265263. That bug is much more broad and there are other issues with it that need to be discussed separately (on that bug).
Comment 13 Martin Vidner 2007-09-02 20:25:01 UTC
Created attachment 161388 [details]
yast2-ui.diff

Even though Klaus reopened this bug for a wrong reason...

(In reply to comment #0 from Andreas Hanke)
> - Change the message "You need to install yast2-ncurses" to something like "You
> need to install yast2-ncurses and its dependencies" or "You need to verify
> yast2-ncurses" or give a hint about "rpm -V yast2-ncurses"

I overlooked that originally. This patch should be better.
Comment 14 Martin Vidner 2007-09-03 07:16:29 UTC
Submitted in yast2-2.15.52.