Bug 266892 - several yast modules do not understand "help" option
Summary: several yast modules do not understand "help" option
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 10.2
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: Jiri Srain
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-22 14:04 UTC by Christian Boltz
Modified: 2008-04-20 21:34 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Boltz 2007-04-22 14:04:42 UTC
It seems to be common practise that   yast <modulename> help   prints available options - at least the bash autocompletion in /etc/bash_completion.d/yast2-completion.sh thinks so ;-)

Unfortunately, several modules don't support the help option and therefore provides a funny way to start the module. Example:
    yast sw_single <tab><tab>
starts YaST ;-)

The following modules start up instead of showing the help:
- yast add-on
- yast autoyast
- yast bootfloppy
- yast controller
- yast dirinstall
- yast dsl
- yast GenProf
- yast hwinfo
- yast inst_source
- yast inst_release_notes
- yast isdn
- yast joistick
- yast kerberos-client
- yast ldap_browser
- yast LogProf
- yast modem
- yast online_update
- yast online_update_setup
- yast powertweak
- yast SD_AddProfile
- yast SD_DeleteProfile
- yast SD_EditProfile
- yast SD_Report
- yast subdomain
- yast support
- yast sw_single
- yast sysconfig
- yast update
- yast vendor
- yast view_anymsg
- yast xen

The other 51 yast modules on my system support the help option.

test script to list all modules not understanding the "help" option:
yast -l |sed '1d' |while read line ; do 
    xterm -e "/sbin/yast $line help"
done

expected result for testscript:
- several xterms flashing up and closing instantly
- no xterm should stay open

actual result: 
- modules that do not support   yast <modulename> help   start up
  (and leave the xterm open)


Sidenotes:
- please fix this by adding the help option to the mentioned modules,
  NOT by removing the bash_completion script
- if you need separate reports for each module, just ask
Comment 1 Jiri Srain 2007-04-26 14:09:55 UTC
Yes, separate reports would be wellcome, handling that long list would be quite problematic and I'm sure we would miss some of them.

Please, omit powertweak, bootfloppy (both dropped from 10.3) and inst_release_notes (it is an installation-only client, should not be used in running system).
Comment 2 Christian Boltz 2007-04-29 22:01:07 UTC
(In reply to comment #1)
> Yes, separate reports would be wellcome, handling that long list would be 
> quite problematic and I'm sure we would miss some of them.

OK, I just flooded bugzilla - 30 reports in 10 minutes isn't that bad ;-)
-> bugs 269886 to 269914

> Please, omit powertweak, bootfloppy (both dropped from 10.3) and

OK.

> inst_release_notes (it is an installation-only client, should not be used in
> running system).

It is listed by yast -l, which means it is also affected by the bash completion sideeffect. Therefore it should support the help parameter also ;-)
(Before you ask: I opened a bug for it.)


A last note: please reassign this bug to the autobuild team. I'd like to see a check for the help option at packaging time in some weeks ;-)
Comment 3 Christian Boltz 2007-04-30 00:13:21 UTC
Test script, to be run on a machine with all YaST modules installed:
(root permissions *not* needed, nor recommended)

for module in `/sbin/yast -l |grep -v "Available modules"` ; do       
    echo "testing yast $module..." >> yasttest.log
    /sbin/yast $module help &>/dev/null &
    sleep 10 && jobs |grep yast >/dev/null && \
    echo "*** $module still running ***" >>yasttest.log && kill $!
    killall yast ; killall y2base  # needed sometimes :-(
    sleep 2
    fg  # let the backgrounded job fetch its kill signal
done &>/dev/null
grep "still running" yasttest.log

Every module listed as "still running"
a) does not support the help option   -or-
b) (shouldn't happen) needs more than 10s to display the help, which would be
   a performance bug ;-)
Comment 4 Jiri Srain 2007-05-03 07:39:46 UTC
We already have an internal package which performs some tests on the YaST modules (yast2-build-test), I think that it is a better idea. Rudi, what do you think?
Comment 5 Christian Boltz 2007-05-03 20:19:00 UTC
I'm not Rudi, but IMHO including it in the yast2-build-test package sounds like the better solution. My point simply is that it has to be checked _somewhere_ ;-)

BTW: Is the source/spec file of this yast2-build-test public available? (Just a question, I admit that I didn't check myself.)
Comment 6 Ruediger Oertel 2007-07-19 15:43:13 UTC
yast2-build-test is currently flagged as an internal package, no I don't think
there is any reason why.

yes, I agree that integrating this check in yast2-build-test seems like a good
approach.
Comment 7 Jiri Srain 2007-08-09 15:56:12 UTC
@#5: Check SVN: http://svn.opensuse.org/svn/yast/trunk/build-test/

I have added it in SVN. Test run showed that there are some packages failing, I filed bugreport. After it gets fixed, I will submit new yast2-build-test.
Comment 8 Christian Boltz 2008-04-20 21:34:59 UTC
Hmm, it seems the test isn't active :-(

There are still some YaST modules that don't support the help option, and some even broke again in 11.0.
(Bugreports filed or reopened for all - if you want a summary, search for bugs with "yast help" in the summary.)