/[smeserver]/rpms/e-smith-lib/sme7/e-smith-lib-1.18.0-generic_template_expand.patch
ViewVC logotype

Contents of /rpms/e-smith-lib/sme7/e-smith-lib-1.18.0-generic_template_expand.patch

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


Revision 1.1 - (show annotations) (download)
Tue Jun 12 15:42:53 2007 UTC (17 years ago) by slords
Branch: MAIN
CVS Tags: e-smith-lib-1_18_0-23_el4_sme, e-smith-lib-1_18_0-19_el4_sme, e-smith-lib-1_18_0-16_el4_sme, e-smith-lib-1_18_0-17_el4_sme, e-smith-lib-1_18_0-24_el4_sme, e-smith-lib-1_18_0-28_el4_sme, e-smith-lib-1_18_0-18_el4_sme, e-smith-lib-1_18_0-22_el4_sme, e-smith-lib-1_18_0-27_el4_sme, e-smith-lib-1_18_0-21_el4_sme, e-smith-lib-1_18_0-26_el4_sme, e-smith-lib-1_18_0-20_el4_sme, e-smith-lib-1_18_0-25_el4_sme
Import on branch sme7 of package e-smith-lib-1.18.0-16.el4.sme.src.rpm

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand mezzanine_patched_e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand
2 --- e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand 2007-03-26 17:44:05.000000000 -0400
3 +++ mezzanine_patched_e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand 2007-03-26 17:29:02.000000000 -0400
4 @@ -27,9 +27,6 @@
5
6 my $event = shift or die "Event name is required\n";
7
8 -my $filename;
9 -my %args;
10 -my ($param, $value);
11 my $templates_dir = "/etc/e-smith/events/$event/templates2expand";
12 exit 0 unless -d $templates_dir;
13
14 @@ -48,22 +45,11 @@
15 sub expand
16 {
17 return unless -f $_;
18 - # For each file found, read the file to find
19 - # processTemplate args, then expand the template
20 + # For each file found, expand the template
21 s/^\.//;
22 - $filename = $_;
23 - %args = (
24 + warn "expanding $_\n";
25 + esmith::templates::processTemplate({
26 MORE_DATA => { EVENT => $event },
27 - TEMPLATE_PATH => $filename,
28 - OUTPUT_FILENAME => $filename,
29 - );
30 - open(FILE, "${templates_dir}${filename}");
31 - while (<FILE>)
32 - {
33 - ($param, $value) = split(/=/, $_, 2);
34 - $args{$param} = eval $value; warn $@ if $@;
35 - }
36 - close(FILE);
37 - warn "expanding $filename\n";
38 - esmith::templates::processTemplate(\%args);
39 + TEMPLATE_PATH => $_,
40 + });
41 }

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