ACC SHELL
/**
* File: modules/PackageAI.ycp
* Package: yast2
* Summary: Packages manipulation (autoinstallation)
* Authors: Martin Vidner <mvidner@suse.cz>
* Michal Svec <msvec@suse.cz>
* Flags: Stable
*
* $Id: PackageAI.ycp 40693 2007-09-03 11:24:29Z lslezak $
*/
{
module "PackageAI";
textdomain "base";
global list<string> toinstall = [];
global list<string> toremove = [];
boolean last_op_canceled = false;
include "packages/common.ycp";
/* default value of settings modified */
global boolean modified = false;
/**
* Function sets internal variable, which indicates, that any
* settings were modified, to "true"
*/
global define void SetModified () {
modified = true;
}
/**
* Functions which returns if the settings were modified
* @return boolean settings were modified
*/
global define boolean GetModified () {
return modified;
}
global boolean DoInstall(list<string> packages) {
toinstall = (list<string>) union(toinstall, packages);
toremove = filter(string p, toremove, {
return !contains(packages, p);
});
modified = true;
return true;
}
global boolean DoRemove(list<string> packages) {
toremove = (list<string>) union(toremove, packages);
toinstall = filter(string p, toinstall, {
return !contains(packages, p);
});
modified = true;
return true;
}
global boolean DoInstallAndRemove(list<string> toinst, list<string> torem) {
DoInstall(toinst);
DoRemove(torem);
modified = true;
return true;
}
global boolean Available(string package) {
return true;
}
global boolean Installed(string package) {
return contains(toinstall, package);
}
/**
* Is a package installed? Checks only the package name in contrast to Installed() function.
* @return true if yes
*/
global boolean PackageInstalled(string package) {
return Installed(package);
}
/**
* Is a package available? Checks only package name, not list of provides.
* @return true if yes
*/
global boolean PackageAvailable(string package)
{
return Available(package);
}
global boolean InstallKernel (list<string> kernel_modules) {
// TODO: for 9.2, we always install all packages, but
// we could only install those really needed (#44394)
// the kernel packages are handled by autoyast on its own
return true;
}
/* EOF */
}
ACC SHELL 2018