diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/etc/e-smith/events/actions/yum-action mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/events/actions/yum-action --- smeserver-yum-1.2.0/root/etc/e-smith/events/actions/yum-action 2006-03-16 17:22:21.000000000 +1100 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/events/actions/yum-action 2006-04-18 15:54:47.767826133 +1000 @@ -34,6 +34,12 @@ die "Unknown function $function\n" unless ($function =~ /install|update|remove/); +my $log_file = "/var/log/yum/yum.log." . time(); +$db->set_prop('yum', 'LogFile', $log_file); + +open STDOUT, '>', "$log_file" or die "Can't redirect STDOUT: $!"; +open STDERR, ">&STDOUT" or die "Can't dup STDOUT: $!"; + # XXX - FIXME - For groupremove, we need to do a grouplist on the group # and then work out what to do diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum --- smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-03-16 17:22:21.000000000 +1100 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-04-18 15:43:23.590277961 +1000 @@ -8,7 +8,7 @@ # # copyright (C) 1999-2005 Mitel Networks Corporation # copyright (C) 2004 Shad L. Lords -# copyright (C) 2005 Gordon Rowell +# copyright (C) 2005-2006 Gordon Rowell # Copyright (c) 2003-2004 Darrell May # # This program is free software; you can redistribute it and/or modify @@ -224,14 +224,16 @@ + pre-event="turn_off_buttons()" + post-event="post_upgrade_reboot()"> HEADER_POSTUPGRADE_REQUIRED + + diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm mezzanine_patched_smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm --- smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm 2006-03-16 17:22:21.000000000 +1100 +++ mezzanine_patched_smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm 2006-04-18 16:00:50.397214134 +1000 @@ -223,6 +223,8 @@ return undef; } + $db->reload; + my $page = ($function eq 'modify') ? 'First' : 'YUM_PAGE_POSTUPGRADE'; @@ -280,4 +282,22 @@ $fm->success('SYSTEM_BEING_RECONFIGURED'); } + +sub display_yum_log +{ + my $fm = shift; + + my $yum_log = $db->get_prop_and_delete('yum', 'LogFile'); + + return unless $yum_log and -f $yum_log; + + open my $log_file, "<", $yum_log or die "Couldn't open $yum_log\n"; + print "
";
+    print <$log_file>;
+    print "
"; + close $log_file or die "Failed to close $yum_log\n"; + + return; +} + 1;