Fix YUM package install bug

This commit is contained in:
Jamie Cameron
2012-07-23 21:45:49 -07:00
parent 629a41dafb
commit 044ae9913f
2 changed files with 14 additions and 2 deletions

View File

@@ -141,7 +141,8 @@ foreach $h (@hosts) {
else {
local @resp = &remote_foreign_call($s->{'host'},
"software", "capture_function_output",
"update_system_install", $in{'file'});
"software::update_system_install",
$in{'file'});
if (@{$resp[1]}) {
# Worked .. get package details
foreach $p (@{$resp[1]}) {
@@ -149,7 +150,17 @@ foreach $h (@hosts) {
}
}
else {
push(@rv, $text{'install_eupdate'});
# May have failed
($first) = split(/\s+/, $in{'file'});
local @info = &remote_foreign_call(
$s->{'host'}, "software",
"package_info", $first);
if (@info && $info[0] eq $first) {
push(@rv, $text{'install_ealready'});
}
else {
push(@rv, $text{'install_eupdate'});
}
}
}
}

View File

@@ -37,6 +37,7 @@ install_servers=Server(s) to install on
install_ok=Install
install_erus=This server uses a different update system to the master server ($1 versus $2)
install_eupdate=An error occurred installing the specified updates
install_ealready=Already installed
add_title=Add Servers
add_msg=Adding $1 ..