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
/
clients
/
pkg_finish.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
1KB
|
72 lines
/**
* File:
* pkg_finish.ycp
*
* Module:
* Step of base installation finish
*
* Authors:
* Jiri Srain <jsrain@suse.cz>
*
* $Id: pkg_finish.ycp 33515 2006-10-19 11:04:46Z lslezak $
*
*/
{
textdomain "packager";
import "Installation";
import "String";
any ret = nil;
string func = "";
map param = $[];
/* Check arguments */
if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
func = (string)WFM::Args(0);
if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
param = (map)WFM::Args(1);
}
y2milestone ("starting pkg_finish");
y2debug("func=%1", func);
y2debug("param=%1", param);
if (func == "Info")
{
return (any)$[
"steps" : 1,
// progress step title
"title" : _("Saving package manager configuration..."),
"when" : [ `installation, `update, `autoinst ],
];
}
else if (func == "Write")
{
Pkg::SourceCacheCopyTo (Installation::destdir);
// disable all sources and finish target
Pkg::SourceFinishAll ();
Pkg::TargetFinish();
// copy list of failed packages to installed system
WFM::Execute (.local.bash, sformat (
"test -f %1 && /bin/cp -a %1 '%2%1'",
"/var/lib/YaST2/failed_packages",
String::Quote (Installation::destdir)));
}
else
{
y2error ("unknown function: %1", func);
ret = nil;
}
y2debug("ret=%1", ret);
y2milestone("pkg_finish finished");
return ret;
} /* EOF */