/[smeserver]/rpms/smeserver-yum/sme7/smeserver-yum-1.2.0-yumplugin.patch
ViewVC logotype

Contents of /rpms/smeserver-yum/sme7/smeserver-yum-1.2.0-yumplugin.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue Oct 7 14:47:50 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/yum.conf/10main_plugins mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/yum.conf/10main_plugins
2 --- smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/yum.conf/10main_plugins 1970-01-01 10:00:00.000000000 +1000
3 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/yum.conf/10main_plugins 2006-11-16 18:48:25.576928853 +1100
4 @@ -0,0 +1 @@
5 +plugins=1
6 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
7 --- smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-11-16 18:49:13.435593159 +1100
8 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-11-16 18:48:25.576928853 +1100
9 @@ -33,6 +33,13 @@
10 use esmith::TestUtils;
11 use esmith::FormMagick::Panel::yum;
12 my $f = esmith::FormMagick::Panel::yum->new();
13 +
14 +if (-e "/var/run/yum.pid")
15 +{
16 + print_yum_status_page();
17 + exit(0);
18 +}
19 +
20 $f->display();
21
22 =head1 TESTING
23 @@ -126,6 +133,8 @@
24 <description>DESC_AVAILABLE_UPDATES</description>
25 </field>
26
27 + <subroutine src="print_skip_header()" />
28 +
29 <subroutine src="print_button('INSTALL_UPDATES')" />
30 </page>
31
32 @@ -156,6 +165,8 @@
33 <description>DESC_AVAILABLE_PACKAGES</description>
34 </field>
35
36 + <subroutine src="print_skip_header()" />
37 +
38 <subroutine src="print_button('INSTALL_SOFTWARE')" />
39 </page>
40
41 @@ -186,6 +197,8 @@
42 <description>DESC_INSTALLED_PACKAGES</description>
43 </field>
44
45 + <subroutine src="print_skip_header()" />
46 +
47 <subroutine src="print_button('REMOVE_SOFTWARE')" />
48 </page>
49
50 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/etc/yum/pluginconf.d/smeserver.conf mezzanine_patched_smeserver-yum-1.2.0/root/etc/yum/pluginconf.d/smeserver.conf
51 --- smeserver-yum-1.2.0/root/etc/yum/pluginconf.d/smeserver.conf 1970-01-01 10:00:00.000000000 +1000
52 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/yum/pluginconf.d/smeserver.conf 2006-11-16 18:48:25.576928853 +1100
53 @@ -0,0 +1,3 @@
54 +[main]
55 +enabled=1
56 +
57 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
58 --- smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm 2006-11-16 18:49:13.435593159 +1100
59 +++ mezzanine_patched_smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm 2006-11-16 18:48:25.577928679 +1100
60 @@ -35,7 +35,7 @@
61
62 our @ISA = qw(esmith::FormMagick Exporter);
63
64 -our @EXPORT = qw();
65 +our @EXPORT = qw( print_yum_status_page );
66
67 our $VERSION = sprintf '%d.%03d', q$Revision: 1.0 $ =~ /: (\d+).(\d+)/;
68 our $db = esmith::ConfigDB->open or
69 @@ -217,21 +217,63 @@
70 $db->set_prop("yum", $_, join(',', ($q->param($_) )));
71 }
72
73 - my $system_status = system("/sbin/e-smith/signal-event", "yum-$function");
74 +# my $system_status = system("/sbin/e-smith/signal-event", "yum-$function");
75 +
76 + esmith::util::backgroundCommand(0,
77 + "/sbin/e-smith/signal-event", "yum-$function");
78
79 $db->reload;
80
81 - my $page = ($function eq 'modify') ? 'First'
82 - : 'YUM_PAGE_POSTUPGRADE';
83 +# my $page = ($function eq 'modify') ? 'First'
84 +# : 'YUM_PAGE_POSTUPGRADE';
85
86 - if ($system_status == 0)
87 - {
88 - $fm->success('SUCCESS', $page);
89 - }
90 - else
91 - {
92 - $fm->error('ERROR_UPDATING', $page);
93 - }
94 +# $fm->success('SUCCESS', 'YUM_PAGE_EVENTINPROGRESS');
95 + print_yum_status_page();
96 +
97 +# if ($system_status == 0)
98 +# {
99 +# $fm->success('SUCCESS', $page);
100 +# }
101 +# else
102 +# {
103 +# $fm->error('ERROR_UPDATING', $page);
104 +# }
105 +}
106 +
107 +sub print_skip_header
108 +{
109 + return "<INPUT TYPE=\"hidden\" NAME=\"skip_header\" VALUE=\"1\">\n";
110 +}
111 +
112 +sub print_yum_status_page
113 +{
114 + my ($yum_stat);
115 +
116 + open(YUM_STATUS, "</var/run/yum.status");
117 + while (<YUM_STATUS>) { $yum_stat = $_; }
118 + close(YUM_STATUS);
119 +
120 + my $page_output = << "EOF";
121 +Expires: 0
122 +Refresh: 10; URL=/server-manager/cgi-bin/yum
123 +Content-type: text/html
124 +
125 +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
126 +
127 +<HTML>
128 +<HEAD>
129 + <META HTTP-EQUIV="refresh" CONTENT="10;URL=/server-manager/cgi-bin/yum">
130 + <TITLE>server manager</TITLE>
131 + <LINK REL="stylesheet" TYPE="text/css"
132 + HREF="/server-common/css/sme_core.css">
133 + </HEAD>
134 + <BODY TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
135 + <BR><center><H2>Please Wait - Yum Running ($yum_stat)</H2></center>
136 + </BODY>
137 +</HTML>
138 +EOF
139 +
140 + print $page_output;
141 }
142
143 sub package_functions_enabled
144 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/usr/lib/yum-plugins/smeserver.py mezzanine_patched_smeserver-yum-1.2.0/root/usr/lib/yum-plugins/smeserver.py
145 --- smeserver-yum-1.2.0/root/usr/lib/yum-plugins/smeserver.py 1970-01-01 10:00:00.000000000 +1000
146 +++ mezzanine_patched_smeserver-yum-1.2.0/root/usr/lib/yum-plugins/smeserver.py 2006-11-16 18:48:25.577928679 +1100
147 @@ -0,0 +1,70 @@
148 +# vim: noexpandtab tabstop=4
149 +
150 +import os
151 +from yum.constants import *
152 +from yum.plugins import PluginYumExit
153 +from yum.plugins import TYPE_CORE
154 +
155 +requires_api_version = '2.1'
156 +plugin_type = (TYPE_CORE,)
157 +
158 +events_path = '/etc/e-smith/events';
159 +initialize_database = events_path + '/actions/initialize-default-databases';
160 +navigation_conf = events_path + '/actions/navigation-conf';
161 +signal_event = '/sbin/e-smith/signal-event';
162 +status_file = '/var/run/yum.status';
163 +
164 +def report_yum_status(status):
165 + fileHandle = open(status_file, 'w');
166 + fileHandle.write(status);
167 + fileHandle.close();
168 +
169 +def config_hook(conduit):
170 + report_yum_status('config');
171 +
172 +def init_hook(conduit):
173 + report_yum_status('init');
174 +
175 +def predownload_hook(conduit):
176 + report_yum_status('predownload');
177 +
178 +def postdownload_hook(conduit):
179 + report_yum_status('postdownload');
180 +
181 +def prereposetup_hook(conduit):
182 + report_yum_status('prereposetup');
183 +
184 +def postreposetup_hook(conduit):
185 + report_yum_status('postreposetup');
186 +
187 +def exclude_hook(conduit):
188 + report_yum_status('exclude');
189 +
190 +def preresolve_hook(conduit):
191 + report_yum_status('preresolve');
192 +
193 +def postresolve_hook(conduit):
194 + report_yum_status('postresolve');
195 +
196 +def pretrans_hook(conduit):
197 + report_yum_status('pretrans');
198 + ts = conduit.getTsInfo()
199 + for tsmem in ts.getMembers():
200 + print "smeserver trap pre-install: " + tsmem.name
201 +
202 +def posttrans_hook(conduit):
203 + report_yum_status('posttrans');
204 + os.spawnl(os.P_WAIT, initialize_database, initialize_database)
205 + os.spawnl(os.P_WAIT, navigation_conf, navigation_conf);
206 + ts = conduit.getTsInfo()
207 + for tsmem in ts.getMembers():
208 + print "smeserver trap post-install: " + tsmem.name
209 + smeevent = 'yum-reconfigure-' + tsmem.name;
210 + if os.path.isdir(events_path + '/' + smeevent):
211 + print "smeservers signal-event: " + smeevent
212 + os.spawnl(os.P_WAIT,
213 + signal_event, signal_event, smeevent)
214 +
215 +def close_hook(conduit):
216 + os.unlink('/var/run/yum.status')
217 +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed