Bug 330467

Summary: Broken Pattern List in GTK
Product: [openSUSE] openSUSE 10.3 Reporter: Forgotten User 9sGKlWEzYV <forgotten_9sGKlWEzYV>
Component: YaST2Assignee: Michael Meeks <mmeeks>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: forgotten_h13THG8RK1, lslezak, ma
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Package list for section Xen with Qt-Yast2 (top), Ncurses-Yast (lower left) and GTK-Yast2 (lower right)

Description Forgotten User 9sGKlWEzYV 2007-10-03 16:45:27 UTC
Created attachment 176170 [details]
Package list for section Xen with Qt-Yast2 (top), Ncurses-Yast (lower left) and GTK-Yast2 (lower right)

Observation:
When trying to add software via Yast2 software management module "Software installieren oder löschen", many (required) packages are not listed by Qt-Yast2 or Ncurses-Yast while they are listed and can be installed with GTK-Yast2.

Side Effect:
When installing Xen with Qt- or Ncurses-Yast and trying to install the hypervisor and the modules with the Yast-module "Hypervisor und Werkzeuge einrichten" afterwards, several xen-packages will be installed automatically before.

Workaround:
Use GTK-Yast2 for all software installations, requires GNOME installed.

System environment:
OpenSuse 10.3 (GoldenMaster from 2007-09-28), using German as language (others not verified), default installation with KDE selected as desktop environment, no additional packages manually selected. Tried on four very different computers (Notebook up to Server) with various processors (AMD/Intel), 32 Bit. Also tried installation on 2007-10-03 with configuring/using online update repositories during installation -- same effect.

Always reproducible:
Yes, in all cases. Tested >10 installations on four different computers.

How to reproduce:
A: with Qt-Yast2
1) Boot machine, due to default auto login KDE will start.
2) Press the geeko (start button), left in the KDE bar. Select the register "Computer", there "Systemeinstellungen/Yast". Enter root-password when prompted.
3) In section "Software", klick on "Software installieren oder löschen". The software management module opens a new window.
4) Select Filter "Schemata" (paterns)
5) In section "Serverfunktionen", select "Hostserver für Xen Virtual Machine"
6) Yast will select all packages of this section and list them on the right side of the window. See attachement. There are only eleven packages displayed for this section instead of several dozend. E.g. the most important packages kernel-xen and kernel-xenpae are missing and they're not going to be installed.

B: with Ncurses-Yast
1) Boot machine, due to default auto login KDE will start.
2) Start a terminal and log in as root.
3) Call "yast -i" to start the software management module of Yast on the command line.
4) Select as Filter "Patterns", in the list of patterns select "Hostserver für Xen Virtual Machine".
5) Yast will show the same eleven packages as Qt-Yast2 did. Again, kernel-xen, kernel-xenpae and many other packages are not shown and are not installed. (See attachement, lower left)

C: with GTK-Yast2
1) Follow steps 1) to 4) of description A:
2) Add the sections "GNOME Desktop-Umgebung", automatically "GNOME Basissystem" will be selected.
3) Install the selected and automatically added packages.
4) Close QT-Yast2 and log out from KDE.
5) Select GNOME for next session, log in again.
6) Klick on "Computer" in the lower left GNOME bar and start "Kontrollzentrum".
7) In section System, start Yast and enter root-password when prompted.
8) Klick on "Software installieren ode..." to start the software management module
9) Select "Zeige Pakete: in Schemata" in the software management module
10) Open section "Serverfunktionen" and there "Hostserver für Xen Virt...".
11) Yast shows in the left side of the window more than a dozend packages for this section, also the packages kernel-xen and kernel-xenpae (see attachement, lower right).

Notes:
Due to limitation to one attachemend I shrinked the three screenshots to one picture. You can download the full resolution screenshots here:
http://www.mirko-doelle.de/linux/yast-paketauswahl-qt.png
http://www.mirko-doelle.de/linux/yast-paketauswahl-ncurses.png
http://www.mirko-doelle.de/linux/yast-paketauswahl-gtk.png
Comment 2 Stephan Kulow 2007-10-10 12:06:57 UTC
Michael, how come the gtk yast invents packages? Neither kernel-* nor kiwi are listed as part of the xen pattern.
Comment 3 Ladislav Slezák 2007-10-10 12:55:10 UTC
Hm, that's strange...

Anyway, you should use a different way to install Xen:
Yast -> Virtualization -> Install Hypervisor and Tools

The problem is that the Xen pattern cannot contain "kernel-xen" package because the installed package depends on the target machine. There is problem "kernel-xen" vs. "kernel-xenpae".

And the pattern should cannot contain both Xen kernels - only one of them would be used so the second boot entry would confuse users. And in addition to this PAE Xen doesn't work on a CPU without PAE extension...
Comment 4 Forgotten User h13THG8RK1 2007-10-10 13:09:46 UTC
I for one welcome our new sapient yast-gtk overlords. :/

The thing is that libzypp lists the packages that belong to a pattern as strings (as in the pattern spec), so we do the mapping to the packages objects ourselves. Surely, yast-gtk is the one doing it wrongly -- though we blame libzypp's API for the mistake. :P
Comment 5 Michael Andres 2007-10-10 14:56:34 UTC
It appears to me as if the names are treated as a globing pattern. 'xen_server' pattern requires package 'xen', so GTK lists all packages with a 'xen' in their name; for example 'xengine' (see the topmost package in the GTK screen shot).

Even more obvious if you look at the 'dhcp_dns_server' pattern. It requires package 'bind', and the list shows all sorts of bindings: kdebindings3*, yast2-*-bindings, ...

Qt/Ncurses use zypp::ui::PatternContents to get a list of package names. This also evaluates the patterns includes/extends relation. It returns a list of package names (yes, as strings).
Comment 6 Forgotten User h13THG8RK1 2007-10-10 14:59:41 UTC
Okay, overlooked yast-qt's contains() test as meaning a sub-match between strings, where actually a set and a string was being passed and it meant to do a full-match between the string and everything in the set. yast-gtk should list the same thing now.
Comment 7 Forgotten User 9sGKlWEzYV 2007-10-12 15:28:44 UTC
(In reply to comment #3 from Ladislav Slezak)
> Anyway, you should use a different way to install Xen:
> Yast -> Virtualization -> Install Hypervisor and Tools
If you install KDE, there is no section "Virtualization" in Yast after default installation. Perhaps a missing dependency or so?

Mirko
Comment 8 Ladislav Slezák 2007-10-12 16:12:56 UTC
You have to install yast2-vm package (or the Xen pattern). Not a nice solution, we have to add support for HW dependency to solve it properly...
Comment 9 Forgotten User h13THG8RK1 2008-05-28 19:36:27 UTC
*** Bug 297430 has been marked as a duplicate of this bug. ***