# Packages Manipulation

This is a set of basic routines for manipulating packages.

## 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

## Functions

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

### 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);

### 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);

### Conditional Package Installation

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

### 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);

### 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);

### Other

- boolean Package::LastOperationCanceled();

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