YaST2 Documentation

SUSE Linux AG

YaST2 Team

SUSE Linux AG

This document is not to be construed as a promise by any participating company to develop, deliver, or market a feature or a product.

SUSE LINUX AG makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness or any particular purpose. Further, SUSE LINUX AG reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes.

You are allowed to distribute unchanged copies of this document.


Table of Contents

Preface
1. What's Inside
2. Style Conventions
1. Introduction
2. YaST - The Big Picture
2.1. Overview
2.1.1. Access To The System
2.1.2. Reasonable Suggestions
2.1.3. Workflows
2.1.4. Modules And The YCP-Language
2.1.5. User Interface
2.1.6. Summary
2.2. YaST Architecture
2.2.1. The SCR (System Configuration Repository)
2.2.2. The UI (User Interface)
2.2.3. YaST Core Engine
2.2.4. External Programs
3. The YaST Language - YCP
3.1. The First YCP Program
3.1.1. YCP Source
3.1.2. The YCP compiler
3.1.3. Running YCP
3.2. YCP Data Types
3.2.1. Data Type void (nil)
3.2.2. Data Type symbol
3.2.3. Data Type boolean
3.2.4. Data Type integer
3.2.5. Data Type float
3.2.6. Data Type string
3.2.7. Data Type byteblock
3.2.8. Data Type list
3.2.9. Data Type map
3.2.10. Data Type path
3.2.11. Data Type term
3.2.12. Data Type any
3.3. More YCP types
3.3.1. Data Type block
3.4. YCP Type System
3.4.1. Data Type any And Type Checking
3.5. YCP Expression Evaluation
3.5.1. Evaluation Of Blocks
3.5.2. Evaluation Of Basic Data Types
3.6. YCP Operators
3.6.1. Comparison Operators
3.6.2. Boolean Operators
3.6.3. Bit Operators
3.6.4. Math Operators
3.6.5. Triple Operator
3.6.6. Operators Precedence
3.6.7. The bracket operator
3.6.7.1. Introduction
3.6.7.2. Access variant
3.6.7.2.1. Accessing lists
3.6.7.2.2. Accessing maps
3.6.7.2.3. Mixed map/list access
3.6.7.3. Assign variant
3.7. Data Type locale
3.8. YCP Program Structure
3.8.1. Comments
3.8.2. Variable Declaration
3.8.3. Variable Assignment
3.8.4. Conditional Branch
3.8.5. while() Loop
3.8.6. do..while() Loop
3.8.7. repeat..until() Loop
3.8.8. break Statement
3.8.9. continue Statement
3.8.10. return Statement
3.8.11. Function definition
3.8.12. Function declaration
3.8.13. include Statement
3.8.14. import Statement
3.8.15. Variable Scopes and blocks
3.8.16. Applying Expressions To Lists And Maps
3.8.16.1. foreach() Statement
3.8.16.2. listmap() Statement
3.8.16.3. maplist() Statement
3.8.16.4. mapmap() Statement
3.9. Controlling The User Interface
3.10. The YaST Wizard
4. Running y2base Stand-Alone
5. SCR Details
5.1. SCR Agents
5.2. SCR Tree
5.3. Accessing SCR
5.4. Using SCR From Within YCP
5.5. Using SCR From The Command Line
5.6. Useful SCR Agents
6. YaST Modules
6.1. YCP Modules Overview
6.2. True YCP Modules
6.2.1. Included Modules
6.2.2. True Modules (Imported Modules)
6.2.3. True Modules And Constructors
6.3. Some Rules
6.3.1. Usability
6.4. Module Layout
6.4.1. Module Skeleton
6.4.2. Module Example
7. YaST2 UI Layout and Events
7.1. YaST2 Layout
7.1.1. Summary: What's This All About?
7.1.2. Basics and Terms
7.1.2.1. The UI
7.1.2.2. Widgets
7.1.2.3. UI Independence and the libyui
7.1.2.4. The Nice Size
7.1.2.5. Initial Dialog Sizes
7.1.2.6. Full Screen Dialogs: `opt(`defaultsize)
7.1.3. Layout Building Blocks
7.1.3.1. Layout Boxes: HBox and VBox
7.1.3.2. Specifying Proportions: HWeight and VWeight
7.1.3.3. Rubber Bands: HStretch and VStretch
7.1.3.4. Making Common Widgets Stretchable: `opt(`hstretch) and `opt(`vstretch)
7.1.3.5. Spacings: HSpacing and VSpacing
7.1.3.6. Alignments: Left, Right, HCenter, Top, Bottom, VCenter, HVCenter
7.1.3.7. Compressing Excess Space: HSquash, VSquash, HVSquash
7.1.3.8. Optical Grouping: Frame
7.1.3.9. Grouping RadioButtons: RadioButtonGroup
7.1.3.10. The Esoterics: ReplacePoint
7.1.3.11. Obsolete: Split
7.1.4. Common Layout Techniques
7.1.4.1. Creating Widgets of Equal Size
7.1.4.2. Creating Widgets of Equal Size that don't Grow
7.1.4.3. Creating Widgets of Equal Size that don't Grow - with Spacings in between
7.1.4.4. Specifying the Size of Scrollable Widgets
7.1.5. Hints and Tips
7.1.5.1. Debugging Aids: The Log File
7.1.5.2. Keep it Simple - Do not Overcrowd Dialogs!
7.1.5.3. Always Keep Other UIs in Mind - What does it Look Like with NCurses?
7.1.5.4. Do not Neglect Mouseless Users - Always Provide Keyboard Shortcuts!
7.1.6. The Layout Algorithm - How the Layout Engine Works Internally
7.1.6.1. Primary and Secondary Dimensions
7.1.6.2. Calculating the Nice Size
7.1.6.2.1. Secondary Nice Size
7.1.6.2.2. Primary Nice Size
7.1.6.3. Setting the Size of a Layout - SetSize()
7.1.6.3.1. Running out of Space - the Pathological Cases
7.1.6.3.2. Centering in the Secondary Dimension
7.2. UI Events
7.2.1. Introduction
7.2.1.1. The YaST2 Event Model
7.2.1.1.1. Classic GUI Event Loops
7.2.1.1.2. The YaST2 Approach
7.2.1.1.3. Simplicity vs. Features
7.2.1.1.4. The notify Option
7.2.1.1.5. Downsides and Discussions
7.2.1.1.6. Design Alternatives
7.2.1.2. Event Delivery
7.2.1.2.1. Event Queues vs. One Single Pending Event
7.2.1.2.2. Event Reliability
7.2.1.2.3. Defensive Programming
7.2.2. Event-related UI Builtin Functions
7.2.3. Event Reference
7.2.3.1. Event Maps in General
7.2.3.2. Event Types
7.2.3.2.1. WidgetEvent
7.2.3.2.2. Activated WidgetEvent
7.2.3.2.3. ValueChanged WidgetEvent
7.2.3.2.4. SelectionChanged WidgetEvent
7.2.3.2.5. MenuEvent
7.2.3.2.6. TimeoutEvent
7.2.3.2.7. CancelEvent
7.2.3.2.8. KeyEvent
7.2.3.2.9. DebugEvent
8. Modules and Libraries
8.1. Packages Manipulation
8.1.1. Modules
8.1.2. Functions
8.1.2.1. Package Installation (GUI)
8.1.2.2. Package Installation (GUI, custom message)
8.1.2.3. Conditional Package Installation
8.1.2.4. Packages Installation (No GUI)
8.1.2.5. Testing
8.1.2.6. Other
8.2. Using the package manager
8.2.1. Introduction
8.2.2. Implementation
8.2.3. Querying the package manager
8.2.3.1. Checking an installed package
8.2.3.2. Checking the installation sources
8.2.3.3. Deleting a package
8.2.3.4. Installing a package
8.2.3.5. Solving dependencies
8.2.3.6. Committing the changes
8.2.4. Example code
8.3. Common Popup Dialogs
8.3.1. Simple and Expert Version
8.3.2. Headlines, Yes or No?
8.3.3. Predefined Messages
8.3.4. When to use what Popup
8.3.4.1. Decision Popups - two buttons, return true or false
8.3.4.2. Info Popups - just an "OK" button
8.4. Advanced YaST2 command line parsing
8.4.1. Important features
8.4.2. Basic usage of module CommandLine
8.4.3. Internally handled commands
8.4.4. Specification of the supported commands in YaST module
8.4.5. Advanced API
8.4.6. Example usage in YaST module
8.5. Runlevel editor library
8.5.1. Enabling/disabling service
8.5.2. Specifying runlevels for service
8.5.3. Init script actions
8.5.4. Service info
8.5.5. Is service enabled?
8.5.6. Example of usage
8.5.7. What should you know?
9. Installation Frameworks and Installation Process
9.1. Product Installation Control
9.1.1. Functionality
9.1.2. Implementation
9.1.3. Configuration
9.1.3.1. workflows
9.1.3.2. Proposals
9.1.3.3. Installation and Product Variables
9.1.3.4. Software
9.1.3.5. Partitioning
9.1.3.5.1. Algorithm for space allocation
9.1.3.5.2. Configuration Options
9.1.3.6. Hooks
9.2. Firstboot Configuration
9.2.1. Enabling Firstboot
9.2.2. Customizing YaST Firstboot
9.2.2.1. Customizing Messages
9.2.2.2. License Action
9.2.2.3. Release Notes
9.2.2.4. Customizing Workflow Components
9.2.3. Scripting
9.3. API for YaST2 installation proposal
9.3.1. Motivation
9.3.2. Overview
9.3.3. The Dispatcher Interface
9.3.4. API functions
9.3.5. Dummy Proposal
10. YaST Development And Tools
10.1. YaST2 Development Tools
10.1.1. Quick Start
10.1.2. What is it?
10.1.3. Migration
10.1.4. Translation (po) Modules)
10.1.5. create-spec: Automatic creation of the .spec file
10.1.6. Overview of Paths
10.1.7. Toplevel make Targets in Detail
10.1.7.1. make package-local
10.1.7.2. make package
10.1.7.3. make check-tagversion
10.1.7.4. make check-cvs-up-to-date
10.1.7.5. make checkin-stable
10.1.7.6. make stable
10.2. YaST2 Logging
10.2.1. Introduction
10.2.2. Quick start
10.2.3. Logging levels
10.2.4. Logging functions
10.2.5. Additional functions
10.2.5.1. Setting the logfile name
10.2.5.2. Universal logging functions:
10.2.6. Components
10.2.7. Logfiles
10.2.8. Log entries
10.2.9. Logging control
10.2.10. Environment control
10.3. Coding In YCP
10.3.1. Coding Rules
10.3.1.1. The file header
10.3.1.2. Indendation
10.3.1.3. Whitespace
10.3.1.4. Naming of variables
10.3.1.5. Naming of functions
10.3.1.6. Blocks and Braces
10.3.1.7. if-then-else, while, etc.
10.3.1.8. Comments
10.3.1.9. Other habits
10.3.2. Examples of bad code
10.4. Check YCP Syntax
10.4.1. Quick Start
10.4.2. Why this Document?
10.4.3. Header Comment Checks
10.4.4. Filename Check
10.4.5. Author / Maintainer Entry Check
10.4.6. CVS Id: Marker Check
10.4.7. Translatable Messages Checks
10.4.7.1. textdomain Check
10.4.8. RichText / HTML Sanity Check
10.4.8.1. Completeness of <p> / </p> Paragraph Tags
10.4.8.2. Text Before, After, Between Paragraphs
10.4.8.3. No More Than One Paragraph per Message
10.4.8.4. Excess Forced Line Breaks <br> after Paragraphs
10.4.9. Widget / UI Function Parameter Checks
10.4.9.1. Keyboard Shortcut Check
10.4.9.2. Translatable Messages Check
10.4.10. Standardized Lib Function Checks
10.4.10.1. Duplicate Definitions of Wizard Lib Functions
10.4.10.2. Definitions and Usage of Obsolete Functions
10.4.10.3. Usage of Predefined Messages
10.4.11. Alternative Variable Declarations
10.4.12. Checking YCP Examples
10.4.13. check_ycp and Emacs
10.4.14. Extending check_ycp
10.4.14.1. Adding new Widgets / UI Functions
10.4.14.2. Other Extensions
10.5. The YaST2 Macro Recorder
10.5.1. Introduction
10.5.2. Quick Start
10.5.3. Purpose
10.5.4. What it is not
10.5.5. Quirks and Limitations
10.5.6. Anatomy of a Macro
I. YCP Reference
I. WFM Builtins
SCROpen - Create a new scr instance.
SCRClose - Close a scr instance.
SCRGetName - Get the name of a scr instance.
SCRSetDefault - Set's the default scr instance.
SCRGetDefault - Get's the default scr instance.
Args - Returns the arguments with which the module was called.
GetLanguage - Returns the current language code (without modifiers !)
GetEncoding - Returns the current encoding code
GetEnvironmentEncoding - Returns the encoding code of the environment where yast is started
SetLanguage - Selects the language for translate()
Read - Special interface to the system agent. Not for general use.
Write - Special interface to the system agent. Not for general use.
Execute - Special interface to the system agent. Not for general use.
call - Executes a YCP client or a Y2 client component.
II. YCP Byteblock Builtins
tobyteblock - Converts a value to a byteblock.
size - Returns a size of a byteblock in bytes.
III. YCP Float Builtins
tostring - Converts a floating point number to a string
tofloat - Converts a value to a floating point number.
IV. YCP Integer Builtins
tointeger - Converts a value to an integer.
V. YCP List Builtins
find - Search for a certain element in a list
prepend - Prepend a list with a new element
contains - Check if a list contains an element
setcontains - Check if a sorted list contains an element
union - Union of lists
merge - Merge two lists into one
filter - Filter a List
maplist - Maps an operation onto all elements of a list and thus creates a new list.
listmap - Maps an operation onto all elements of a list and thus creates a map.
flatten - Flatten List
toset - Sort list and remove duplicates
sort - Sort A List according to the YCP builtin predicate >
sort - Sort list using an expression
splitstring - Split a string
change - Change a list
add - Create a new list with a new element
size - Return size of list
remove - Remove element from a list
select - Selet a list element
foreach - Process the content of a list
tolist - Converts a value to a list.
VI. Map Builtins
haskey - Check if map has a certain key
filter - Filter a Map
mapmap - Maps an operation onto all key/value pairs of a map
maplist - Maps an operation onto all elements key/value and create a list
union - Union of 2 maps
add - Add a key/value pair to a map
change - Change element pair in a map
size - Size of a map
foreach - Process the content of a map
tomap - Converts a value to a map.
remove - Remove key/value pair from a map
lookup - Select a map element
VII. Miscellaneous YCP Builtins
time - Return the number of seconds since 1.1.1970.
sleep - Sleeps a number of milliseconds.
random - Random number generator.
srandom - Initialize random number generator
srandom - Initialize random number generator.
eval - Evaluate a YCP value.
sformat - Format a String
y2debug - Log a message to the y2log.
y2milestone - Log a milestone to the y2log.
y2warning - Log a warning to the y2log.
y2error - Log an error to the y2log.
y2security - Log a security message to the y2log.
y2internal - Log an internal message to the y2log.
VIII. YCP Path Builtins
size - Returns the number of path elements
add - Add a path element to existing path
topath - Converts a value to a path.
IX. YCP String Builtins
size - Returns the number of characters of the string s
issubstring - searches for a specific string within another string
tohexstring - Converts a integer to a hexadecimal string.
substring - Return part of a string
substring - Extract a substring
find - Return position of a substring
tolower - Make a string lowercase
toupper - Make a string uppercase
toascii - FIXME
deletechars - Delete charachters from a string (FIXME)
filterchars - Filter charachters out of a String
mergestring - Join list elements with a string
findfirstnotof - Search string for first non matching chars
findfirstof - Find position of first matching charachters in string
findlastof - Searches string for the last match
findlastnotof - Searches the last element of string that doesn't match
regexpmatch - Searches a string for a POSIX Extended Regular Expression match.
regexppos - Returns a pair with position and length of the first match.
regexpsub - Regex Substitution
regexptokenize - Regex tokenize
tostring - Converts a value to a string.
timestring - Return time string
crypt - Encrypt a string
cryptmd5 - Encrypt a string using md5
cryptbigcrypt - Encrypt a string using bigcrypt
cryptblowfish - Encrypt a string with blowfish
dgettext - Translates the text using the given text domain
dngettext - Translates the text using a locale-aware plural form handling
X. YCP Term Builtins
size - Returns the number of arguments of the term t.
add - Add value to term
symbolof - Returns the symbol of the term t.
select - Select item from term
toterm - Converts a value to a term.
remove - Remove item from term
argsof - Returns the arguments of a term.
II. User Interface Reference
XI. Event-related UI Builtin Functions
UI::UserInput - Waits for user input and returns a widget ID.
UI::PollInput - Checks for pending user input. Does not wait. Returns a widget ID or nil if no input is available.
UI::TimeoutUserInput - Waits for user input and returns a widget ID. Returns ID `timeout if no input is available for timeout milliseconds.
UI::WaitForEvent - Waits for user input and returns an event map. Returns ID `timeout if no input is available for timeout milliseconds.
XII. UI builtin commands
UI::SetModulename - Set Module Name
UI::GetModulename - Get the name of a Module
UI::SetLanguage - Set the language of the UI
UI::GetProductName - Get Product Name
UI::SetProductName - set Product Name
UI::SetConsoleFont - Set Console Font
UI::SetKeyboard - Set Keyboard
UI::GetLanguage - Get Language
UI::UserInput - User Input
UI::PollInput - Poll Input
UI::TimeoutUserInput - User Input with Timeout
UI::WaitForEvent - Wait for Event
UI::OpenDialog - Opens a new dialog.
UI::OpenDialog - Open a Dialog with options
UI::CloseDialog() - Close an open dialog
UI::ChangeWidget - Change widget contents
UI::QueryWidget - Query Widget contents
UI::ReplaceWidget -
UI::WizardCommand - Run a wizard command
UI::SetFocus - Set Focus to the specified widget
UI::BusyCursor - Sets the mouse cursor to the busy curso
UI::RedrawScreen - Redraws the screen
UI::NormalCursor - Sets the mouse cursor to the normal cursor
UI::MakeScreenShot - Make Screen Shot
UI::DumpWidgetTree - Debugging function
UI::RecordMacro - Record Macro into a file
UI::StopRecordingMacro - Stop recording macro
UI::PlayMacro - Play a recorded macro
UI::FakeUserInput - Fake User Input
UI::Glyph - Return a special character ( a 'glyph' )
UI::GetDisplayInfo - Get Display Info
UI::RecalcLayout - Racalculate Layout
UI::PostponeShortcutCheck - Postpone Shortcut Check
UI::CheckShortcuts - Perform an explicit shortcut check after postponing shortcut checks.
UI::WidgetExists - Check whether or not a widget with the given ID currently exists
UI::RunPkgSelection - Initialize and run the PackageSelector widget
UI::AskForExistingDirectory - Open a directory selection box and prompt the user for an existing directory.
UI::AskForExistingFile - Open a file selection box and prompt the user for an existing file.
UI::AskForSaveFileName - Open a file selection box and prompt the user for a file to save data to.
UI::SetFunctionKeys - Set the ( default ) function keys for a number of buttons.
UI::WFM/SCR - callback
UI::Recode - Recode encoding of string from or to "UTF-8" encoding.
XIII. Standard (mandatory) widgets
AAA_All-Widgets - Generic options for all widgets
ReplacePoint - Pseudo widget to replace parts of a dialog
Empty - Stretchable space for layout
HSpacing - Fixed size empty space for layout
Left - Layout alignment
Frame - Frame with label
HSquash - Layout aid: Minimize widget to its nice size
HWeight - Control relative size of layouts
HBox - Generic layout: Arrange widgets horizontally or vertically
Label - Simple static text
RichText - Static text with HTML-like formatting
LogView - scrollable log lines like "tail -f"
PushButton - Perform action on click
MenuButton - Button with popup menu
CheckBox - Clickable on/off toggle button
RadioButton - Clickable on/off toggle button for radio boxes
RadioButtonGroup - Radio box - select one of many radio buttons
TextEntry - Input field
MultiLineEdit - multiple line text edit field
SelectionBox - Scrollable list selection
MultiSelectionBox - Selection box that allows selecton of multiple items
ComboBox - drop-down list selection ( optionally editable )
Tree - Scrollable tree selection
Table - Multicolumn table widget
ProgressBar - Graphical progress indicator
Image - Pixmap image
IntField - Numeric limited range input field
PackageSelector - Complete software package selection
PkgSpecial - Package selection special - DON'T USE IT
XIV. Special (optional) widgets
HasSpecialWidget - Checks for support of a special widget type.
BarGraph - Horizontal bar graph (optional widget)
ColoredLabel - Simple static text with specified background and foreground color
DownloadProgress - Self-polling file growth progress indicator (optional widget)
DumbTab - Simplistic tab widget that behaves like push buttons
VMultiProgressMeter - Progress bar with multiple segments (optional widget)
Slider - Numeric limited range input (optional widget)
PartitionSplitter - Hard disk partition splitter tool (optional widget)
Date - Date input field
Time - Time input field
Wizard - Wizard frame - not for general use, use the Wizard:: module instead!
III. Reference of Interface to YaST2 Package Manager
XV. Access to Installation Sources
Pkg::SourceSetRamCache - Allow/prevent InstSrces from caching package metadata on ramdisk
Pkg::SourceStartManager - Make sure the InstSrcManager is up and knows all available InstSrces.
Pkg::SourceStartCache - Make sure the InstSrcManager is up, and return the list of SrcIds.
Pkg::SourceGetCurrent - Return the list of all enabled InstSrc Ids.
Pkg::SourceFinishAll - Disable all InstSrces.
Pkg::SourceGeneralData - Get general data about the source
Pkg::SourceMediaData - Return media data about the source
Pkg::SourceProductData - Return Product data about the source
Pkg::SourceProduct - Get Product info
Pkg::SourceProvideFile - Make a file available at the local filesystem
Pkg::SourceProvideDir - make a directory available at the local filesystem
Pkg::SourceChangeUrl - Change Source URL
Pkg::SourceInstallOrder - Explicitly set an install order.
Pkg::SourceCacheCopyTo - Copy cache data of all installation sources to the target
Pkg::SourceScan - Scan a Source Media
Pkg::SourceCreate - Create a Source
Pkg::SourceSetEnabled - Set the default activation state of an InsrSrc.
Pkg::SourceFinish - Disable an Installation Source
Pkg::SourceDelete - Delete a Source
Pkg::SourceEditGet - Get state of Sources
Pkg::SourceEditSet - Rearange known InstSrces rank and default state
XVI. PkgModuleFunctions constructor, destructor and call handling
Pkg::InstSysMode - Set packagemanager to "inst-sys" mode
Pkg::SetLocale - Set Prefered Locale
Pkg::GetLocale - get the currently preferred locale
Pkg::SetAdditionalLocales - set list of additional locales
Pkg::GetAdditionalLocales - return list of additional locales
Pkg::LastError - get current error as string
Pkg::LastErrorDetails - get current error details as string
Pkg::LastErrorId - get current error as id string
XVII. Access to Package Selection Manager
Pkg::GetSelections - Return list of selections matching given status
Pkg::SelectionData - Get Selection Data
Pkg::SelectionContent - Get list of packages listed in a selection
Pkg::SetSelection - Set a new selection
Pkg::ClearSelection - Clear a selected selection
Pkg::ActivateSelections - Activate all selected selections
XVIII. Access to packagemanager
Pkg::PkgQueryProvides - List all package instances providing 'tag'
Pkg::PkgMediaNames - Return names of sources in installation order
Pkg::PkgMediaSizes - Return size of packages to be installed
Pkg::PkgMediaCount - Return number of packages to be installed
Pkg::IsProvided - returns 'true' if the tag is provided in the installed system
Pkg::IsSelected - returns a 'true' if the tag is selected for installation
Pkg::IsAvailable - Check if package (tag) is available
Pkg::DoProvide - Install a list of tags to the system
Pkg::DoRemove - Removes a list of tags from the system
Pkg::PkgSummary - Get summary (aka label) of a package
Pkg::PkgVersion - Get version (better: edition) of a package
Pkg::PkgSize - Get (installed) size of a package
Pkg::PkgGroup - Get rpm group of a package
Pkg::PkgProperties - Return information about a package
Pkg::PkgLocation - Get file location of a package in the source
Pkg::PkgGetFilelist - Get File List of a package
Pkg::SaveState - Save the current selection state
Pkg::RestoreState - Restore Saved state
Pkg::ClearSaveState - clear a saved state (to reduce memory consumption)
Pkg::IsManualSelection - Check Status of Selections and if they have changed
Pkg::PkgAnyToDelete - Check if there are any package to be deleted
Pkg::AnyToInstall - Check if there are any package to be installed
Pkg::FilterPackages - Get list of packages depending on how they were selected
Pkg::GetPackages - Get list of packages (installed, selected, available)
Pkg::PkgUpdateAll - Update Packages marked for installation
Pkg::PkgInstall - Select package for installation
Pkg::PkgSrcInstall - Select source of package for installation
Pkg::PkgDelete - Select package for deletion
Pkg::PkgTaboo - Set package to taboo
Pkg::PkgNeutral - Set package to neutral (drop install/delete flags)
Pkg::Reset - Reset most internal stuff on the package manager.
Pkg::PkgSolve - Solve current package dependencies
Pkg::PkgSolveCheckTargetOnly - Solve packages currently installed on target system.
Pkg::PkgSolveErrors - Returns number of fails
Pkg::PkgCommit - Commit package changes (actually install/delete packages)
Pkg::GetBackupPath - get current path for update backup of rpm config files
Pkg::SetBackupPath - set current path for update backup of rpm config files
Pkg::CreateBackups - whether to create package backups during install or removal
Pkg::PkgGetLicenseToConfirm - Return Licence Text
Pkg::PkgGetLicensesToConfirm - Return Licence Text of several packages
Pkg::RpmChecksig - Check signature of RPM
XIX. Access to Installation Target
Pkg::TargetInit - Initialize Target
Pkg::TargetFinish - finish target usage
Pkg::TargetInstall - install rpm package by filename
Pkg::TargetRemove - Install package by name
Pkg::TargetLogfile - init logfile for target
Pkg::TargetCapacity - return capacity of partition at directory
Pkg::TargetUsed - Return usage of partition at directory
Pkg::TargetBlockSize - Return block size of partition at directory
Pkg::TargetUpdateInf - Return content of update.inf (usually <destdir>/var/lib/YaST/update.inf)
Pkg::TargetProducts - Return list of maps of all installed products
Pkg::TargetRebuildDB - call "rpm --rebuilddb"
Pkg::TargetInitDU - Initialize Disk Usage Calculation
Pkg::TargetGetDU - return current DU calculations
Pkg::TargetFileHasOwner - returns the (first) package
XX. Access to Patch Manager
Pkg::YouStatus - get map with status information
Pkg::YouSetServer - Set server to be used for getting patches.
Pkg::YouGetUserPassword - Get username and password needed for access to server.
Pkg::YouSetUserPassword - Set username and password needed for access to server.
Pkg::YouGetServers - get urls of patch servers
Pkg::YouGetDirectory - retrieve directory file listing all available patches
Pkg::YouRetrievePatchInfo - retrieve patches
Pkg::YouProcessPatches - Download and install patches.
Pkg::YouSelectPatches - select patches based on types.
Pkg::YouRemovePackages - remove downloaded packages.
IV. Frameworks Reference
XXI. Proposal API Reference
MakeProposal - Make proposal for installation.
AskUser - Run an interactive workflow
Description - Return human readable titles both for the RichText (HTML) widget and for menuentries.
Write - Write the proposed (and probably modified) settings to the system.
V. YaST2 Library Reference
XXII. Address manipulation routines
Address::Check - Check syntax of a network address (IP address or hostname)
Address::Check4 - Check syntax of a network address (ip4 or name)
Address::Check6 - Check syntax of a network address (ip6 or name)
Address::Valid4 - Return a description of a valid address (ip4 or name)
XXIII. Confirmation routines
Confirm::Delete - Opens a popup yes/no confirmation.
Confirm::DeleteSelected - Opens a popup yes/no confirmation.
Confirm::Detection - Confirm hardware detection (only in manual installation)
Confirm::MustBeRoot - If we are running as root, return true. Otherwise ask the user whether we should continue even though things might not work
XXIV. Command line interface for YaST2 modules
CommandLine::Abort - Abort the command line handling
CommandLine::Aborted - User asked for abort (forgetting the changes)
CommandLine::Command - Get next user-given command
CommandLine::Done - Are there some commands to be processed?
CommandLine::Error - Print an Error Message
CommandLine::Init - Initialize Module
CommandLine::Interactive - Is module started in interactive command-line mode?
CommandLine::Parse - Parse a list of arguments.
CommandLine::PasswordInput - Read input from command line
CommandLine::Print - Print a String
CommandLine::Run - Parse the Command Line
CommandLine::Scan - Scan a command line from stdin, return it split into a list
CommandLine::StartGUI - Should module start UI?
CommandLine::UniqueOption - Check uniqueness of an option
CommandLine::UserInput - Read input from command line
XXV. Hostname manipulation routines
Hostname::Check - Check syntax of hostname entry (that is a domain name component, unqualified, without dots)
Hostname::CheckDomain - Check syntax of domain entry
Hostname::CheckFQ - Check syntax of fully qualified hostname
Hostname::MergeFQ - Merge short hostname and domain to full-qualified host name
Hostname::SplitFQ - Split FQ hostname to hostname and domain name
Hostname::ValidDomain - describe a valid domain name
Hostname::ValidFQ - describe a valid FQ host name
XXVI. Generic HTML formatting
HTML::Bold - Make a piece of HTML code bold
HTML::ColoredList - Make a HTML (unsorted) colored list from a list of strings
HTML::Colorize - Colorize a piece of HTML code
HTML::Heading - Make a HTML heading from a text
HTML::Link - Make a HTML link
HTML::List - Make a HTML (unsorted) list from a list of strings
HTML::ListEnd - End a HTML (unsorted) list
HTML::ListItem - Make a HTML list item
HTML::ListStart - Start a HTML (unsorted) list
HTML::Newline - Make a forced HTML line break
HTML::Newlines - Make a number of forced HTML line breaks
HTML::Para - Make a HTML paragraph from a text
XXVII. IP manipulation routines
IP::Check - Check syntax of IP address
IP::Check4 - Check syntax of IPv4 address
IP::Check6 - Check syntax of IPv6 address
IP::ComputeBroadcast - Compute IPv4 broadcast address from ip4 address and network mask.
IP::ComputeNetwork - Compute IPv4 network address from ip4 address and network mask.
IP::ToHex - Converts IPv4 address from string to hex format
IP::ToInteger - Convert IPv4 address from string to integer
IP::ToString - Convert IPv4 address from integer to string
IP::Valid4 - Describe a valid IPv4 address
XXVIII. Map manipulation routines
Map::CheckKeys - Check if a map contains all needed keys
Map::FromString - Convert string "var=val ..." to map $[val:var, ...]
Map::Keys - Return all keys from the map
Map::KeysToLower - Switch map keys to lower case
Map::KeysToUpper - Switch map keys to upper case
Map::ToString - Convert options map $[var:val, ...] to string "var=val ..."
Map::Values - Return all values from the map
XXIX. Netmask manipulation routines
Netmask::Check - Check the netmask
Netmask::Check4 - Check the IPv4 netmask Note that 0.0.0.0 is not a correct netmask.
Netmask::Check6 - Check the IPv6 netmask
Netmask::FromBits - Convert netmask in bits form (24) to netmask string (255.255.240.0)
Netmask::ToBits - Convert IPv4 netmask as string (255.255.240.0) to bits form (24)
XXX. Popup dialogs for browsing the local network
NetworkPopup::ChooseItem - Let the user choose one of a list of items
NetworkPopup::HostName - Give me one host name on the local network
NetworkPopup::NFSExport - Give me export path of selected server
NetworkPopup::NFSServer - Give me NFS server name on the local network
XXXI. Packages manipulation
Package::DoInstall - Install list of packages
Package::DoInstallAndRemove - Install and Remove list of packages in one go
Package::DoRemove - Remove list of packages
Package::AvailableAll - Are all of these packages available?
Package::AvailableAny - Is any of these packages available?
Package::InstallAllMsg - Install list of packages with a custom text message
Package::InstallMsg - Install a package with a custom text message
Package::InstalledAll - Are all of these packages installed?
Package::InstalledAny - Is any of these packages installed?
Package::LastOperationCanceled - Return result of the last operation Use immediately after calling any Package*:: function
Package::RemoveAllMsg - Remove a list of packages with a custom text message
Package::RemoveMsg - Remove a package with a custom text message
Package::RunSUSEconfig - Run SUSEconfig, create new wizard dialog before it, close after it is finished
XXXII. Progress bar
Progress::CloseSuperior - Replaces stages of superior progress by an empty help text.
Progress::Finish - Moves progress bar to the end and marks all stages as completed.
Progress::New - New complex progress bar with stages.
Progress::NextStage - Advance stage, advance step by 1 and set progress bar caption to that defined in New.
Progress::NextStageStep - Jumps to the next stage and sets step to st.
Progress::NextStep - Some people say it is the best operating system ever. But now to the function. Advances progress bar value by 1.
Progress::OpenSuperior - Creates a higher-level progress bar made of stages. Currently it is placed instead of help text.
Progress::Simple - Create simple progress bar with no stages, only with progress bar.
Progress::Stage - Go to stage st, change progress bar title to title and set progress bar step to step.
Progress::Step - Changes progress bar value to st.
Progress::StepSuperior - Make one step in a superior progress bar.
Progress::Title - Change progress bar title.
Progress::off - Turns progress bar off. All Progress:: calls return immediatelly.
Progress::on - Turns progress bar on after calling Progress::off.
XXXIII. Messages handling
Report::AnyQuestion - Question with headline and Yes/No Buttons
Report::ClearAll - Clear all stored messages (errors, messages and warnings)
Report::ClearErrors - Clear stored errors
Report::ClearMessages - Clear stored messages
Report::ClearWarnings - Clear stored warnings
Report::ClearYesNoMessages - Clear stored yes/no messages
Report::DisplayErrors - Error popup dialog can displayed immediately when new error is stored.
Report::DisplayMessages - Message popup dialog can be displayed immediately when a new message is stored.
Report::DisplayWarnings - Warning popup dialog can displayed immediately when new warningr is stored.
Report::DisplayYesNoMessages - Yes/No Message popup dialog can be displayed immediately when a new message is stored.
Report::Error - Store new error text
Report::Export - Dump the Report settings to a map, for autoinstallation use.
Report::GetMessages - Create rich text string from stored warning, message or error messages.
Report::GetModified - Functions which returns if the settings were modified
Report::Import - Get all the Report configuration from a map.
Report::LogErrors - Set warnings logging to .y2log file
Report::LogMessages - Set messages logging to .y2log file
Report::LogWarnings - Set warnings logging to .y2log file
Report::LogYesNoMessages - Set yes/no messages logging to .y2log file
Report::Message - Store new message text
Report::NumErrors - Return number of stored errors
Report::NumMessages - Return number of stored messages
Report::NumWarnings - Return number of stored warnings
Report::NumYesNoMessages - Return number of stored yes/no messages
Report::SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Report::ShowText - Store new message text
Report::Summary - Summary of current settings
Report::Warning - Store new warning text
XXXIV. Rich text manipulation routines
RichText::Rich2Plain - Convert a richtext string into a formatted plain text.
XXXV. Wizard Sequencer
Sequencer::Run - The Wizard Sequencer
Sequencer::WS_alias - Find an aliases in the aliases map
Sequencer::WS_check - Check correct types in maps and alias presence for sequence.
Sequencer::WS_error - Report error and return nil
Sequencer::WS_next - Find a next item in the sequence
Sequencer::WS_pop - Pop one item from the stack (remove an item and return the stack top item)
Sequencer::WS_push - Push one item to the stack
Sequencer::WS_run - Run a function from the aliases map
Sequencer::WS_special - Decide if an alias is special
Sequencer::WS_testall - Test (run) all dialogs in the aliases map
XXXVI. Service manipulation
Service::Adjust - Adjust runlevels in which the service runs.
Service::Disable - Disable service
Service::Enable - Enable service
Service::Enabled - Check if service is enabled
Service::Error - Error Message
Service::Finetune - Set service to run in selected runlevels.
Service::FullInfo - Get service info and find out whether service is running.
Service::Info - Get service info without peeking if service runs.
Service::Reload - Reload service
Service::Restart - Restart service
Service::RunInitScript - Run init script.
Service::RunInitScriptOutput - Run init script and return output
Service::Start - Start service
Service::Status - Get service status.
Service::Stop - Stop service
XXXVII. String manipulation routines
String::CAlnum -
String::CAlpha -
String::CDigit -
String::CGraph -
String::CLower -
String::CPrint -
String::CPunct -
String::CSpace -
String::CUpper -
String::CXdigit -
String::CutBlanks - Remove blanks at begin and end of input string.
String::CutRegexMatch - Remove first or every match of given regular expression from a string
String::CutZeros - Remove any leading zeros
String::EscapeTags - Function for escaping (replacing) (HTML|XML...) tags with their (HTML|XML...) meaning.
String::FirstChunk - Shorthand for select (splitstring (s, separators), 0, "") Useful now that the above produces a deprecation warning.
String::FormatSize - Return a pretty description of a byte count
String::FormatSizeWithPrecision - Return a pretty description of a byte count
String::Pad - Add spaces after the text to make it long enough
String::PadZeros - Add zeros before the text to make it long enough.
String::ParseOptions - Parse string of values
String::Quote - Quote a string with 's
String::UnQuote - Unquote a string with 's (quoted with quote)
String::ValidCharsFilename - Characters valid in a filename (not pathname). Naturally "/" is disallowed. Otherwise, the graphical ASCII characters are allowed.
XXXVIII. Support for summaries of the configured devices
Summary::AddHeader - Add a RichText section header to an existing summary.
Summary::AddLine - Add a line to an existing summary.
Summary::AddListItem - Add a list item to an existing summary. Requires a previous call to 'summaryOpenList()'.
Summary::AddNewLine - Add a newline to an existing summary.
Summary::AddSimpleSection - Add a simple section to an existing summary, consisting of a header and one single item.
Summary::CloseList - End a list within a summary.
Summary::Device - Function that creates description of one device.
Summary::DevicesList - Function that creates the whole final product. "Not detected" will be returned if the list is empty.
Summary::NotConfigured - Function that creates a 'Not configured.' message.
Summary::OpenList - Start a list within a summary.
XXXIX. Type repository for validation of user-defined types
TypeRepository::TypeRepository - Constructor, defines the known types.
TypeRepository::enum_validator - Generic enumerated type validator.
TypeRepository::is_a - Validate, that the given value is of given type.
TypeRepository::regex_validator - Generic regular expression validator.
XL. Manipulate and Parse URLs
URL::Build - Build URL from tokens as parsed with Parse
URL::Check - Check URL
URL::Parse - Tokenize URL
XLI. Wizard dialogs for hardware configuration
Wizard_hw::ConfiguredContent - Create the contents of screen with configured items.
Wizard_hw::DetectedContent - Create the content of the screen with the detected devices.
Wizard_hw::SizeAtLeast - Encloses the content into VBoxes and HBoxes
Wizard_hw::SpacingAround - Encloses the content into VBoxes and HBoxes with the appropriate spacings around it.
XLII. Wizard dialog
Wizard::AbortAcceptButtonBox - Returns a button box with buttons "Abort", "Accept"
Wizard::AbortApplyFinishButtonBox - Returns a button box with buttons "Abort", "Apply", "Finish"
Wizard::AbortInstallationAcceptButtonBox - Returns a button box with buttons "Abort Installation", "Accept"
Wizard::AcceptDialog - Returns a standard wizard dialog with buttons "Cancel", "Accept"
Wizard::AddMenu - Add Menu
Wizard::AddMenuEntry - Add Menu Entry
Wizard::AddSubMenu - Add Sub Menu
Wizard::AddTreeItem - Add Tree Item to tree enabled Wizard
Wizard::BackAbortInstallationNextButtonBox - Returns a button box with buttons "Back", "Abort Installation", "Next"
Wizard::BackAbortNextButtonBox - Returns a button box with buttons "Back", "Abort", "Next"
Wizard::BackNextButtonBox - Returns a button box with buttons "Back", "Next"
Wizard::CancelAcceptButtonBox - Returns a button box with buttons "Cancel", "Accept"
Wizard::ClearContents - Clear the wizard contents.
Wizard::ClearTitleIcon - Clear the wizard 'title' icon, i.e. replace it with nothing
Wizard::CloseDialog - Close a wizard dialog.
Wizard::CreateDialog - Create and open a typical installation wizard dialog.
Wizard::CreateMenu - Create the menu in the dialog
Wizard::CreateTree - Create the tree in the dialog, replaces helpspace with new tree widget
Wizard::CreateTreeDialog - Create and open a Tree wizard dialog.
Wizard::DeleteMenus - Delete Menu items
Wizard::DeleteTreeItems - Delete Tree items
Wizard::DisableAbortButton - Disable the wizard's "Abort" button.
Wizard::DisableBackButton - Disable the wizard's "Back" button.
Wizard::DisableCancelButton - Disable the wizard's "Cancel" button.
Wizard::DisableNextButton - Disable the wizard's "Next" (or "Accept") button.
Wizard::EnableAbortButton - Enable the wizard's "Abort" button.
Wizard::EnableBackButton - Enable the wizard's "Back" button.
Wizard::EnableCancelButton - Enable the wizard's "Cancel" button.
Wizard::EnableNextButton - Enable the wizard's "Next" (or "Accept") button.
Wizard::GenericDialog - Create a Generic Dialog
Wizard::HideAbortButton - Hide the Wizard's "Abort" button. Restore it later with RestoreAbortButton():
Wizard::HideBackButton - Hide the Wizard's "Back" button. Restore it later with RestoreBackButton():
Wizard::HideNextButton - Hide the Wizard's "Next" button. Restore it later with RestoreNextButton():
Wizard::IsWizardDialog - Check if the topmost dialog is a wizard dialog (i.e. has a widget with `id(`WizardDialog) )
Wizard::NextBackDialog - Returns a standard wizard dialog with buttons "Next", "Back", "Abort".
Wizard::OpenAbortApplyFinishDialog - Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".
Wizard::OpenAcceptAbortStepsDialog - Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
Wizard::OpenAcceptDialog - Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".
Wizard::OpenAcceptStepsDialog - Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
Wizard::OpenCustomDialog - Open a wizard dialog with simple layout
Wizard::OpenDialog - Open any wizard dialog.
Wizard::OpenNextBackDialog - Open a dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".
Wizard::OpenNextBackStepsDialog - Open a dialog with "Back", "Next", "Abort" that will also accept workflow steps.
Wizard::OpenTreeNextBackDialog - Open a Tree dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".
Wizard::QueryTreeItem - Query Tree Item
Wizard::ReplaceAbortButton - Replace the wizard 'abort' button with a custom widget. THIS FUNCTION IS DEPRECATED!
Wizard::ReplaceBackButton - Replace the wizard 'back' button with a custom widget. THIS FUNCTION IS DEPRECATED!
Wizard::ReplaceCustomHelp - Replace the help widget for dialogs opened with Wizard::OpenCustomDialog().
Wizard::ReplaceHelp - Replace the wizard help subwindow with a custom widget.
Wizard::ReplaceNextButton - Replace the wizard 'next' button with a custom widget. THIS FUNCTION IS DEPRECATED!
Wizard::RestoreAbortButton - Restore the wizard 'abort' button.
Wizard::RestoreBackButton - Restore the wizard 'back' button.
Wizard::RestoreHelp - Restore the wizard help subwindow.
Wizard::RestoreNextButton - Restore the wizard 'next' button.
Wizard::RestoreScreenShotName - Restore the screenshot name.
Wizard::RetranslateButtons - Retranslate the wizard buttons.
Wizard::SelectTreeItem - Select Tree item
Wizard::SetAbortButton - Set the dialog's "Abort" button with a new label and a new ID
Wizard::SetBackButton - Set the dialog's "Back" button with a new label and a new ID
Wizard::SetContents - Set the contents of a wizard dialog
Wizard::SetContentsButtons - Set contents and Buttons of wizard dialog
Wizard::SetDesktopIcon - Set Desktop Icon
Wizard::SetFocusToBackButton - Set the keyboard focus to the wizard's "Back" (or "Cancel") button.
Wizard::SetFocusToNextButton - Set the keyboard focus to the wizard's "Next" (or "Accept") button.
Wizard::SetHelpText - Set a new help text.
Wizard::SetNextButton - Set the dialog's "Next" button with a new label and a new ID
Wizard::SetProductName - Set the product name for UI
Wizard::SetScreenShotName - Declare a name for the current dialog
Wizard::SetTitleIcon - Set the wizard 'title' icon
Wizard::ShowHelp - Open a popup dialog that displays a help text (rich text format).
Wizard::UserInput - Substitute for UI::UserInput
XLIII. Commonly used popup dialogs
Popup::AnyMessage - Generic message popup
Popup::AnyQuestion - Generic question popup with two buttons.
Popup::AnyQuestion3 - Generic question popup with three buttons.
Popup::AnyQuestionRichText - Show a question that might need scrolling.
Popup::AnyTimedMessage - Generic message popup
Popup::ClearFeedback - Clear feedback message
Popup::ConfirmAbort - Confirmation for "Abort" button during installation.
Popup::ContinueCancel - Dialog which displays the "message" and has a <b>Continue</b> and a <b>Cancel</b> button.
Popup::ContinueCancelHeadline - Dialog which displays the "message" and has a <b>Continue</b> and a <b>Cancel</b> button.
Popup::Error - Show an error message and wait until user clicked "OK".
Popup::LongText - Show a long text that might need scrolling.
Popup::Message - Show a simple message and wait until user clicked "OK".
Popup::ModuleError - Special error popup for YCP modules that don't work.
Popup::NoHeadline - Indicator for empty headline for popups that can optionally have one
Popup::Notify - Show a notification message and wait until user clicked "OK".
Popup::ReallyAbort - Confirmation popup when user clicked "Abort".
Popup::ShowFeedback - Show popup with a headline and a message for feedback
Popup::ShowFile - Show the contents of an entire file in a popup.
Popup::ShowText - Show the contents of an entire file in a popup.
Popup::ShowTextTimed - Show the contents of an entire file in a popup.
Popup::TimedAnyQuestion - Timed question popup with two buttons and time display
Popup::TimedError - Show an error message and wait specified amount of time or until user clicked "OK".
Popup::TimedMessage - Display a message with a timeout and return when the user clicks "OK" or when the timeout expires.
Popup::TimedOKCancel - Display a message with a timeout
Popup::TimedWarning - Show a warning message and wait specified amount of time or until user clicked "OK".
Popup::Warning - Show a warning message and wait until user clicked "OK".
Popup::YesNo - Display a yes/no question and wait for answer.
Popup::YesNoHeadline - This dialog displays "message" (a question) and has a <b>Yes</b> and a <b>No</b> button.
A. UI Richtext
B. ChangeLog

List of Figures

2.1. The YaST Architecture
3.1. Output of the “Hello, World!”-program
5.1. SCR Hierarchy Tree

List of Tables

3.1. Special characters in strings
3.2. Special characters in paths
5.1. SCR Node Types
5.2. The SCR-commands

List of Examples

3.1. Hello World” in YCP
3.2. Symbol constants
3.3. Integer constants
3.4. Float constants
3.5. String constants
3.6. Byteblock constants
3.7. List constants
3.8. Map constants
3.9. Path constants
3.10. Term constants
3.11. Block constants
3.12. Type checking and data type any
3.13. Locale constants
3.14. Comments
3.15. Variable Declaration
3.16. Variable Assignment
3.17. Conditional branch
3.18. while() Loop
3.19. do...while() Loop
3.20. repeat...until() Loop
3.21. break statement
3.22. continue statement
3.23. return statement
3.24. Function definition
3.25. Function declaration
3.26. Include a file
3.27. Variable scopes and blocks
3.28. foreach() Loop
3.29. listmap() statement
3.30. maplist() statement
3.31. mapmap() statement
5.1. Operating the SCR from the command line
7.1. Specifying Proportions 1
7.2. Specifying Proportions 2
7.3. Specifying Proportions 3
7.4. Spacings
7.5. Grouping RadioButtons
7.6. Specifying the Size of Scrollable Widgets
7.7. The notify option
8.1.
8.2.
8.3.
8.4.
8.5.
8.6. Example of an event-loop
9.1. Flexible Partitioning
9.2. Proposal Example
10.1. YaST2 UI macro file