Chapter 1. Modules and Libraries

Table of Contents

1.1. Packages Manipulation
1.2. Using the package manager
1.3. Common Popup Dialogs
1.4. Advanced YaST2 command line parsing
1.5. Runlevel Editor Library

1.1. Packages Manipulation

This is a set of basic routines for manipulating packages.

1.1.1. Modules

The module Package is the module for handling package installation , it works on the target system and correctly differentiates between normal and autoinstallaton mode.

PackageSystem is for situations when you need immediate action (for example to start the client).

  • Package

  • PackageSystem

1.1.2. Functions

The function names should be self-descriptive, so there are no comments here. Feel free to ask if you are in doubts. (FIXME)

1.1.2.1. Package Installation (GUI)

  • boolean Package::Install(<string> package);

  • boolean Package::InstallAll(list<string> packages);

  • boolean Package::InstallAny(list<string> packages);

  • boolean Package::Remove(<string> package);

  • boolean Package::RemoveAll(list<string> packages);

1.1.2.2. Package Installation (GUI, custom message)

  • boolean Package::InstallMsg(<string> package, <string> message);

  • boolean Package::InstallAllMsg(list<string> packages, <string> message);

  • boolean Package::InstallAnyMsg(list<string> packages, <string> message);

  • boolean Package::RemoveMsg(<string> package, <string> message);

  • boolean Package::RemoveAllMsg(list<string> packages, <string> message);

1.1.2.3. Conditional Package Installation

[Note]Note

GUI based, do not install if Mode::config is defined, only in PackageSystem)

  • boolean Package::CheckAndInstallPackages (list<string> packages);

  • boolean Package::CheckAndInstallPackagesInteractive (list<string> packages); // with error handling

1.1.2.4. Packages Installation (No GUI)

  • boolean Package::DoInstall(list<string> packages);

  • boolean Package::DoRemove(list<string> packages);

  • boolean Package::DoInstallAndRemove(list<string> toinstall, list<string> toremove);

1.1.2.5. Testing

  • boolean Package::Available(<string> package);

  • boolean Package::AvailableAll(list<string> packages);

  • boolean Package::AvailableAny(list<string> packages);

  • boolean Package::Installed(<string> package);

  • boolean Package::InstalledAll(list<string> packages);

  • boolean Package::InstalledAny(list<string> packages);

1.1.2.6. Other

  • void RunSUSEconfig();

  • boolean Package::LastOperationCanceled();

  • boolean Package::InstallKernel(list<lt;string> kernel_modules);