my (undef, $archive, undef, $section, $subsection,
$priority, $version) = @$entry;
- my $data = $sources_all{"$pkg $version"};
- $page->merge_data($pkg, $version, $data) or debug( "Merging $pkg $version FAILED", 2 );
+ my $data = $sources_all{"$archive $suite $pkg"};
+ $page->merge_data($pkg, $suite, $archive, $data) or debug( "Merging $pkg $version FAILED", 2 );
}
$version = $page->{version};
gettext("Size (in kB)"),
gettext("md5sum") );
foreach( @$source_files ) {
- my ($src_file_md5, $src_file_size, $src_file_name) = @$_;
+ my ($src_file_md5, $src_file_size, $src_file_name)
+ = split /\s+/, $_;
my $src_url;
for ($archive) {
/security/o && do {
}
}
-#use Data::Dumper;
-#debug( "Final page object:\n".Dumper($page), 3 );
+use Data::Dumper;
+debug( "Final page object:\n".Dumper($page), 3 );
my $title = $opts{source} ?
"Details of source package <em>$pkg</em> in $suite" :
foreach (split /\000/o, $bins) {
my @data = split /\s/, $_, 5;
+ debug( "find_binaries: considering @data", 3 );
if (($data[0] eq $archive)
&& ($data[1] eq $suite)) {
$bins{$data[2]}++;
+ debug( "find_binaries: using @data", 3 );
}
}
#FIXME: change parameters so that we can use the version from Packages::Page
sub merge_data {
- my ($self, $pkg, $version, $data) = @_;
-
- my %data = ( package => $pkg,
- version => $version,
- );
- chomp($data);
- $data =~ s/\n\s+/\377/g;
- while ($data =~ /^(\S+):\s*(.*)\s*$/mg) {
- my ($key, $value) = ($1, $2);
- $key =~ tr [A-Z] [a-z];
- $data{$key} = $value;
- }
-# debug( "Merge package:\n".Dumper(\%data), 3 );
+ my ($self, $pkg, $suite, $archive, $data) = @_;
+
+ my %data = split /\00/o, $data;
+ $data{package} = $pkg;
+ $data{suite} = $suite;
+ $data{archive} = $archive;
+
return $self->merge_package( \%data );
}
sub merge_package {
my ($self, $data) = @_;
- ($data->{package} && $data->{version}) || return;
+ ($data->{package} && $data->{suite} && $data->{archive}) || return;
$self->{package} ||= $data->{package};
($self->{package} eq $data->{package}) || return;
debug( "merge package $data->{package}/$data->{version} into $self (".($self->{version}||'').")", 2 );
$self->{uploaders} = \@uploaders;
if ($data->{files}) {
- $self->{files} = [];
- foreach my $sf ( split( /\377/, $data->{files} ) ) {
- next unless $sf;
- # md5, size, name
- push @{$self->{files}}, [ split( /\s+/, $sf) ];
- }
+ my @files = split /\01/so, $data->{files};
+ $self->{files} = \@files;
}
foreach (@DEP_FIELDS) {