~wgrant/multidistrotools/trunk

« back to all changes in this revision

Viewing changes to scripts/compare-src-bin.pl

  • Committer: raphink-guest
  • Date: 2007-12-18 12:46:54 UTC
  • Revision ID: svn-v4:ae44f2db-9922-0410-90a7-e780145c2447:multidistrotools/trunk:13

Fix typos

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/perl
2
 
#
3
 
# compare-src-bin.bash - Raphael Pinson <raphink@gmail.com>
4
 
5
 
# Given a distribution in mdt, this script compares the binaries that should be
6
 
# produced by the sources with the ones really present in the repository
7
 
8
 
# The result can be useful to detect binary only uploads or FTBFS packages
9
 
#
10
2
 
11
3
use strict;
12
4
use warnings;
108
100
# Build %src_bin hash
109
101
foreach my $package ( keys(%src) ) {
110
102
   if ( $src{$package}{'Binary'} ) {
111
 
      my @binries = split(", ", $src{$package}{'Binary'});
 
103
      my @binaries = split(", ", $src{$package}{'Binary'});
112
104
      my $version  = $src{$package}{'Version'};
113
 
      foreach my $binry (@binries) {
114
 
         if ( $src_bin{$binry} ) {
 
105
      foreach my $binary (@binaries) {
 
106
         if ( $src_bin{$binary} ) {
115
107
            # TODO: replace if new version is newer (use dpkg --compare-version?)
116
 
            warn "There is already a version for binry $binry. Not replacing.\n";
 
108
            warn "There is already a version for binary $binary. Not replacing.\n";
117
109
         } else {
118
 
            $src_bin{$binry} = $version;
 
110
            $src_bin{$binary} = $version;
119
111
         }
120
112
      }
121
113
   } else {
122
 
      warn "Source $package has no binries!\n";
 
114
      warn "Source $package has no binaries!\n";
123
115
   }
124
116
}
125
117
 
126
118
 
127
119
 
128
 
# Read binries
 
120
# Read binaries
129
121
foreach my $bin_file (@bin_files) {
130
122
   my $parsed_file = parseFile("$listdir/$bin_file");
131
123
   foreach my $package ( keys(%{$parsed_file} ) ) {