]> git.pld-linux.org Git - packages/fetch-crl.git/blame_incremental - no-modify-template.patch
- use \001 instead ^A to find autodeps
[packages/fetch-crl.git] / no-modify-template.patch
... / ...
CommitLineData
1with Perl 5.12.3 we changed $self->{"nametemplate_pem"} via $file modification
2
3with such config:
4nametemplate_pem = @ALIAS@.r@R@.pem
5infodir = /etc/pki/esteid
6cadir = /etc/pki/esteid
7output = /etc/pki/esteid/crl
8formats = openssl, pem
9
10it tried to:
11VERBOSE(3) Writing PEM file /etc/pki/esteid/crl//etc/pki/esteid/crl/ESTEID-SK_2007.r0.pem
12should had been:
13VERBOSE(3) Writing PEM file /etc/pki/esteid/crl/ESTEID-SK_2007.r0.pem
14
1516:21:09 SamChi> glen: foreach does not copy the value, it assigns each value of the list to the variable
1616:21:31 SamChi> glen: unless it is not a valid lvalue, then it may have to be copied
1716:22:12 SamChi> $ perl -le '@a = qw(a b); foreach (@a) { $_ .= "foobar" }; print "@a"'
1816:22:12 SamChi> afoobar bfoobar
1916:22:55 SamChi> glen: oh, I was wrong about the second part
2016:23:03 SamChi> $ perl -le '@a = qw(a b); foreach my $v (@a, "c") { $v .= "foobar" }; print "@a"'
2116:23:03 SamChi> Modification of a read-only value attempted at -e line 1.
22
23--- fetch-crl-3.0.6/fetch-crl 2011-03-20 05:01:20.000000000 +0200
24+++ fetch-crl-3.0.6/fetch-crl 2011-06-11 11:30:58.731040625 +0300
25@@ -1873,13 +1879,14 @@
26 $::cnf->{_}->{"output_der"}, $::cnf->{_}->{"output_pem"},
27 $::cnf->{_}->{"output_nss"}, $::cnf->{_}->{"output_openssl"}) ) {
28 defined $output and $output or next;
29- foreach my $file (
30+ foreach my $ref (
31 $self->{"nametemplate_der"},
32 $self->{"nametemplate_pem"},
33 $self->{"alias"}.".r\@R\@",
34 $self->{"anchorname"}.".r\@R\@",
35 ) {
36- next unless $file;
37+ next unless $ref;
38+ my $file = $ref; # copy, not to change original
39 $file =~ s/\@R\@/$i/g;
40 $file = join "/", $output, $file;
41 next if ! -e $file;
This page took 0.117744 seconds and 4 git commands to generate.