[RFC] [PATCH newui] Rework software selection to be driven by comps metadata

Bill Nottingham notting at redhat.com
Wed Jul 18 19:56:18 UTC 2012


This series of patches changes how the software selection in anaconda works so
that it is completely driven by new metadata in comps.

HOW IT'S SUPPOSED TO WORK
-------------------------

The metadata in comps is of the form:

  <installclass>
    <id>gnome-desktop</id>
    <name>GNOME Desktop</name>
    <description>GNOME is a desktop.</description>
    <display_order>10</display_order>
    <grouplist>
        <groupid>base-x</groupid>
        <groupid>base</groupid>
        <groupid>core</groupid>
        <groupid>fonts</groupid>
...
    </grouplist>
    <optionlist>
        <groupid>sound-and-video</groupid>
        <groupid>office</groupid>
        <groupid>eclipse</groupid>
        <groupid>games</groupid>
        <groupid>design-suite</groupid>
        <groupid>electronic-lab</groupid>
    </optionlist>
  </installclass>
  <installclass>
    <id>minimal</id>
    <name>Minimal installation</name>
    <description>A bare-bones shell environment, useful for building your own custom system.</description>
    <display_order>05</display_order>
    <grouplist>
        <groupid>core</groupid>
    </grouplist>
    <optionlist>
        <groupid>cloud-infrastructure</groupid>
        <groupid>clustering</groupid>
        <groupid>directory-server</groupid>
        <groupid>dns-server</groupid>
...
    </optionlist>
  </installclass>

For any interactive installation, the user will first pick an installclass
from the left column. Once they've done that, the right column will populate
with the combination of:
1) any groupids from the 'optionlist' for that install class
2) any groups in comps that are marked as 'uservisible'
and the user can select any of these to add onto their installation.

The second of these is for some level of backwards compatibility with existing
third-party repositories.

TESTING/FUTURE WORK
-------------------

Tested via qemu via a test repository with a modified comps file:
  (http://notting.fedorapeople.org/foorepo)
This repo has no packages, so not tested for full installation, but should work
as a demonstration. Full deployment of this feature would likely involve some
more drastic changes to the comps file once this format is agreed upon.

This has not been wired into:
- pykickstart/kickstart files

Should be doable; need to pick a reasonable character to use as a signifier. ('^'?
'$'?)

- yum via commands (there is no 'yum installclass-install minimal', for example.)

CAVEATS
-------

If we go this route, we would need to land, in order:
- yum changes
- comps changes
- anaconda changes

Derived distributions would have to adopt the new metadata in comps to work with
anaconda.

COMMENTS?
---------

Please, comment away.

yum changes:
 comps.py |  197 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 197 insertions(+)

anaconda changes:
 packaging/__init__.py     |   21 +++++++++
 packaging/yumpayload.py   |  102 +++++++++++++++++++++++++++++++++++++++++++++-
 ui/gui/spokes/software.py |   93 ++++++++++++++++++++---------------------
 ui/gui/spokes/software.ui |   22 +++++----
 4 files changed, 178 insertions(+), 60 deletions(-)



More information about the anaconda-patches mailing list