Bug 621848

Summary: YaST2 module list from command line invocation
Product: [openSUSE] openSUSE 11.3 Reporter: Andrea Turrini <andrea.turrini>
Component: YaST2Assignee: Jiri Srain <jsrain>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P5 - None CC: andrea, aschnell, dvaleev, jdelvare, msvec
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard: maint:released:11.3:38094
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 540627    
Deadline: 2011-01-24   
Attachments: suggested patch for fix the bug

Description Andrea Turrini 2010-07-13 10:36:27 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.5 Firefox/3.6.6

I have just upgraded my openSUSE 11.2 to 11.3 using online repositories and "zypper dup".

Now I have the following problem: if I open a terminal, type (as root) yast2 and push the tab twice to get the list of available yast modules, then the list is incomplete. For instance, the sw_single module is not shown, but it is surely installed since I can use it.

From a message in the oS-factory mailing list, the cause should be: Some of the desktop files have "Exec=/sbin/yast ..." while other have "Exec=xdg-su -c
/sbin/yast2 ...". Only the first once are shown. The script must be adapted.


Reproducible: Always

Steps to Reproduce:
1. upgrade to openSUSE 11.3
2. install some yast2 module packages
3. check availability of modules at command line



List of installed modules:
ori@orodruin:~> rpm -qa yast*
yast2-irda-2.19.1-3.2.noarch
yast2-bootloader-2.19.15-1.7.x86_64
yast2-qt-2.19.1-1.9.x86_64
yast2-profile-manager-2.18.2-2.2.x86_64
yast2-packager-webpin-2.19.7-1.5.x86_64
yast2-theme-openSUSE-2.19.2-1.3.noarch
yast2-packager-2.19.7-1.5.x86_64
yast2-registration-2.19.2-1.8.noarch
yast2-online-update-frontend-2.19.2-3.2.noarch
yast2-x11-2.18.0-2.1.noarch
yast2-libyui-2.19.0-3.1.x86_64
yast2-perl-bindings-2.19.1-3.2.x86_64
yast2-pkg-bindings-2.19.1-1.11.x86_64
yast2-ldap-2.17.3-12.2.x86_64
yast2-pam-2.19.1-3.2.noarch
yast2-kerberos-client-2.19.0-3.2.noarch
yast2-qt-graph-2.19.0-1.12.x86_64
yast2-backup-2.19.0-3.2.noarch
yast2-repair-2.18.3-2.4.noarch
yast2-trans-stats-2.19.0-1.12.noarch
yast2-transfer-2.18.0-6.2.x86_64
yast2-ncurses-pkg-2.19.3-1.4.x86_64
yast2-2.19.13-1.7.x86_64
yast2-mouse-2.18.2-5.2.x86_64
yast2-runlevel-2.19.0-3.2.noarch
yast2-ldap-client-2.19.2-1.4.noarch
yast2-control-center-qt-2.19.1-3.2.x86_64
yast2-mail-2.18.5-1.7.noarch
yast2-ycp-ui-bindings-2.18.5-5.1.x86_64
yast2-core-2.19.2-3.1.x86_64
yast2-sound-2.19.1-3.2.x86_64
yast2-nfs-client-2.19.3-1.4.noarch
yast2-samba-client-2.19.6-1.4.noarch
yast2-update-2.19.1-1.6.x86_64
yast2-ncurses-2.19.5-1.6.x86_64
yast2-nfs-common-2.18.1-5.2.noarch
yast2-storage-2.19.15-1.4.x86_64
yast2-ntp-client-2.18.1-3.4.noarch
yast2-iscsi-client-2.19.5-1.7.noarch
yast2-qt-pkg-2.19.2-1.10.x86_64
yast2-inetd-2.17.3-6.2.noarch
yast2-control-center-2.19.1-3.2.x86_64
yast2-country-data-2.19.17-1.4.x86_64
yast2-theme-openSUSE-Oxygen-2.19.2-1.3.noarch
yast2-printer-2.19.13-1.4.x86_64
yast2-firewall-2.19.1-1.7.noarch
yast2-security-2.19.1-3.2.noarch
yast2-registration-branding-openSUSE-2.19.2-1.8.noarch
yast2-xml-2.16.1-59.1.x86_64
yast2-nis-client-2.18.2-5.2.x86_64
yast2-users-2.19.14-1.6.x86_64
yast2-samba-server-2.18.3-3.2.noarch
yast2-scanner-2.19.2-1.11.x86_64
yast2-tv-2.19.3-1.40.noarch
yast2-restore-2.19.0-3.2.noarch
yast2-add-on-2.18.3-5.2.noarch
yast2-trans-en_US-2.19.0-15.1.noarch
yast2-hardware-detection-2.17.1-5.2.x86_64
yast2-dbus-client-2.18.0-5.1.x86_64
yast2-network-2.19.33-1.4.x86_64
yast2-sysconfig-2.17.0-59.2.noarch
yast2-online-update-2.19.2-3.2.noarch
yast2-installation-2.19.20-1.5.noarch
yast2-slp-2.16.0-86.2.x86_64
yast2-branding-openSUSE-2.18.0-5.1.noarch
yast2-country-2.19.17-1.4.x86_64
yast2-tune-2.18.1-5.2.x86_64
yast2-sudo-2.18.2-5.2.noarch
yast2-vm-2.16.10-6.2.x86_64

List of available modules:
orodruin:/home/ori # yast2 
add-on              inetd               joystick            online_update       sudo                view_anymsg         
backup              inst_release_notes  ldap_browser        profile-manager     sysconfig           xen                 
checkmedia          inst_suse_register  mouse               restore             system_settings     
hwinfo              irda                nis                 sound               vendor
Comment 1 andrea florio 2010-07-13 11:18:53 UTC
all .desktop files should have

xdg-su -c

because of bug#540627

i don't really know how the tab completition works, but that need to be fixed not the .desktop files (actually we have to identify witch ones miss xdg-su and add it)
Comment 2 andrea florio 2010-07-13 11:20:25 UTC
giving a look to the script this is the function that need to be fixed:

listmodules()
{
    list=`/bin/ls -1 $YAST_PREFIX/share/applications/YaST2/*.desktop 2>/dev/null`

    if [ -z "$list" ] ; then
        echo "No modules installed"
    else
        echo "Available modules:"
        echo
        grep -h "Exec=/sbin/yast2 " $list | \
            sed 's|Exec=/sbin/yast2 \([^ ]\+\)\( .*\)\?|\1|' | \
            sort -u
    fi
}
Comment 3 andrea florio 2010-07-13 11:22:56 UTC
sorry for spamming, i had to write everything in one txt,

i really believe that instead to check "Exec" we should check

X-SuSE-YaST-Call=

now the "broken" script can be used to find .desktop files that miss xdg-su call and fix them
Comment 5 andrea florio 2010-07-13 14:02:54 UTC
Created attachment 375586 [details]
suggested patch for fix the bug

attached suggested patch to fix the issue, as you can see use "X-SuSE-YaST-Call="

instead of the exec. this is imho a most intelligent way to work, because it is not effected by changes in exec command (that in the future may be different) and instead use a line that is always supposed to be there.

the add-on module for example have the line:

X-SuSE-YaST-Call=add-on

sw_single has

X-SuSE-YaST-Call=sw_single

and so on
Comment 6 Arvin Schnell 2010-07-16 07:27:36 UTC
*** Bug 622855 has been marked as a duplicate of this bug. ***
Comment 7 Michal Zugec 2010-07-19 12:55:20 UTC
re comment#4: no, it wasn't me. But I can commit suggested patch (seems it works fine on my machine)
Comment 8 Michal Zugec 2010-07-19 13:02:39 UTC
patch applied into factory
thanks to Andrea Florio
Comment 9 andrea florio 2010-07-19 13:31:35 UTC
any possibility to have it into the 11.3 as an update?
Comment 10 Michal Zugec 2010-07-19 14:09:00 UTC
reopen for maintenance update
Comment 11 Michal Zugec 2010-07-19 14:18:26 UTC
submitted in request id 43371
Comment 12 Arvin Schnell 2010-09-13 12:16:58 UTC
*** Bug 636622 has been marked as a duplicate of this bug. ***
Comment 13 andrea florio 2010-09-18 09:03:38 UTC
the fix never arrived to 11.3 because it didn't followed maintenance process... beginning it now.
Comment 14 Dirk Mueller 2010-12-27 14:26:44 UTC
Jiri, could you please submit a fixed yast2 package to openSUSE:11.3:Update:Test?
Comment 15 Swamp Workflow Management 2010-12-27 14:27:24 UTC
The SWAMPID for this issue is 37957.
This issue was rated as low.
Please submit fixed packages until 2011-01-24.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/37957
Comment 16 Jiri Srain 2011-01-07 08:46:27 UTC
Created submit request id 57284
Comment 20 Swamp Workflow Management 2011-01-13 11:28:39 UTC
Update released for: yast2, yast2-devel-doc
Products:
openSUSE 11.3 (i586, x86_64)
Comment 21 Bernhard Wiedemann 2016-04-15 12:01:02 UTC
This is an autogenerated message for OBS integration:
This bug (621848) was mentioned in
https://build.opensuse.org/request/show/43324 Factory / yast2
https://build.opensuse.org/request/show/57284 11.3:Test / yast2