Yast UI
YPackageSelector Class Reference

Complete software package selectionOptional Argument: string floppyDevice Non-standard Opt() arguments: youMode start in YOU (YaST Online Update) mode Non-standard Opt() arguments: updateMode start in update mode Non-standard Opt() arguments: searchMode start with the "search" filter view Non-standard Opt() arguments: summaryMode start with the "installation summary" filter view Non-standard Opt() arguments: repoMode start with the "repositories" filter view Non-standard Opt() arguments: repoMgr enable "Repository Manager" menu item Non-standard Opt() arguments: confirmUnsupported user has to confirm all unsupported (non-L3) packages. More...

Detailed Description

Complete software package selection

Optional Argument: string floppyDevice Non-standard Opt() arguments: youMode start in YOU (YaST Online Update) mode Non-standard Opt() arguments: updateMode start in update mode Non-standard Opt() arguments: searchMode start with the "search" filter view Non-standard Opt() arguments: summaryMode start with the "installation summary" filter view Non-standard Opt() arguments: repoMode start with the "repositories" filter view Non-standard Opt() arguments: repoMgr enable "Repository Manager" menu item Non-standard Opt() arguments: confirmUnsupported user has to confirm all unsupported (non-L3) packages.

Following widget variants exist: PackageSelector Example:

# encoding: utf-8
# Package Selector example
module Yast
class PackageSelectorClient < Client
def main
Yast.import "UI"
Yast.import "Pkg"
# Pkg::SourceCreate( "http://dist.suse.de/install/SLP/SUSE-10.1-Beta7/i386/CD1/", "" );
# Pkg::SourceCreate( "http://dist.suse.de/install/SLP/SUSE-10.0-RC4/i386/CD1/", "" );
# Pkg::SourceCreate( "file:/srv/10.1-i386/CD1/", "" );
Pkg.SourceCreate("file:/srv/10.1-i386/DVD1/", "")
# Pkg::SourceCreate( "file:/srv/sles-10-i386/CD1/", "" );
if true
Pkg.TargetInit(
"/", # installed system
false
) # don't create a new RPM database
end
UI.OpenDialog(
Opt(:defaultsize),
PackageSelector(Id(:selector), "/dev/fd0")
)
@input = UI.RunPkgSelection(Id(:selector))
UI.CloseDialog
Builtins.y2milestone("Input: %1", @input)
nil
end
end
end
Yast::PackageSelectorClient.new.main

A very complex widget that handles software package selection completely transparently. Set up the package manager (the backend) before creating this widget and let the package manager and the package selector handle all the rest. The result of all this are the data stored in the package manager.

Use UI::RunPkgSelection() after creating a dialog with this widget. The result of UI::UserInput() in a dialog with such a widget is undefined - it may or may not return.

This widget gets the (best) floppy device as a parameter since the UI has no general way of finding out by itself what device can be used for saving or loading pacakge lists etc. - this is best done outside and passed here as a parameter.


The documentation for this class was generated from the following file: