home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
usr
/
share
/
YaST2
/
modules
/
PackageAI.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
86 lines
/**
* 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 31242 2006-06-01 12:59:16Z locilka $
*/
{
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);
}
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 */
}