[Pkg-mozext-commits] [adblock-plus] 144/464: Make contributors into their own metadata section, to be compatible with other ini-style file parsers
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:11 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 9bb3514a7774f1583dcbeed84555bff34458a186
Author: Wladimir Palant <trev at adblockplus.org>
Date: Fri May 13 07:47:34 2011 +0200
Make contributors into their own metadata section, to be compatible with other ini-style file parsers
---
Packager.pm | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/Packager.pm b/Packager.pm
index 4a4bf97..b5c92b6 100644
--- a/Packager.pm
+++ b/Packager.pm
@@ -41,7 +41,6 @@ sub readMetadata
$self->{settings} = {};
my $curSection;
- my %lists = map {$_ => 1} qw(contributor);
foreach my $line (split(/[\r\n]+/, $data))
{
$line =~ s/#.*//;
@@ -58,15 +57,7 @@ sub readMetadata
if (defined $curSection)
{
$self->{settings}{$curSection} = {} unless exists $self->{settings}{$curSection};
- if (exists($lists{$1}))
- {
- $self->{settings}{$curSection}{$1} = [] unless exists $self->{settings}{$curSection}{$1};
- push @{$self->{settings}{$curSection}{$1}}, $2;
- }
- else
- {
- $self->{settings}{$curSection}{$1} = $2;
- }
+ $self->{settings}{$curSection}{$1} = $2;
}
else
{
@@ -416,10 +407,11 @@ EOT
print FILE "\n";
- if (exists($self->{settings}{general}{contributor}))
+ if (exists($self->{settings}{contributors}))
{
- foreach my $contributor (map {$self->encodeXML($_)} @{$self->{settings}{general}{contributor}})
+ foreach my $key (sort keys %{$self->{settings}{contributors}})
{
+ my $contributor = $self->encodeXML($self->{settings}{contributors}{$key});
print FILE <<"EOT";
\t\t<em:contributor>$contributor</em:contributor>
EOT
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list