+sub handle_maintainer_fields {
+ my ($data) = @_;
+ my (@uploaders, @orig_uploaders);
+
+ if ($data->{'original-maintainer'}) {
+ push @orig_uploaders, [ split_name_mail( $data->{'original-maintainer'} ) ];
+
+ $data->{uploaders} ||= '';
+ my @up_tmp = split( /\s*,\s*/,
+ $data->{uploaders} );
+ foreach my $up (@up_tmp) {
+ push @orig_uploaders, [ split_name_mail( $up ) ];
+ }
+ if ($data->{maintainer} ||= '') {
+ push @uploaders, [ split_name_mail( $data->{maintainer} ) ];
+ }
+ } else {
+ if ($data->{maintainer} ||= '') {
+ push @uploaders, [ split_name_mail( $data->{maintainer} ) ];
+ }
+ if ($data->{uploaders}) {
+ my @up_tmp = split( /\s*,\s*/,
+ $data->{uploaders} );
+ foreach my $up (@up_tmp) {
+ if ($up ne $data->{maintainer}) { # weed out duplicates
+ push @uploaders, [ split_name_mail( $up ) ];
+ }
+ }
+ }
+ }
+
+ return (\@uploaders, \@orig_uploaders);
+}
+