]> git.donarmstrong.com Git - wannabuild.git/blob - bin/wb-make-rev
integrate wb_edos_builddebcheck into wanna-build (and allow to pass multiple binary...
[wannabuild.git] / bin / wb-make-rev
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 my $arch = "i386";
6 my $suite = "unstable";
7 my %dep;
8
9 my $in_bd = 0;
10
11 open F, "/org/wanna-build/tmp/Sources.$suite-old";
12 while (<F>) {
13         if (s/^Build-Depends:// or (/^\s/ and $in_bd)) {
14                 foreach my $pkg (split/,|\|/) {
15                         $pkg =~ s/\(.+\)//;
16                         $pkg =~ s/\[.+\]//;
17                         $pkg =~ s/^\s*(\S+)\s*/$1/;
18                         $dep{$pkg} = 1 if $pkg ne "\n";
19                 }
20                 $in_bd = 1;
21         } else {
22                 $in_bd = 0;
23         }
24 }
25 close F;
26
27 open F, "/org/wanna-build/tmp/Packages.$suite.$arch-old";
28 while (<F>) {
29         if (s/^Package:
30         if (s/^Depends:// or (/^\s/ and $in_bd)) {
31                 foreach my $pkg (split/,|\|/) {
32                         $pkg =~ s/\(.+\)//;
33                         $pkg =~ s/\[.+\]//;
34                         $pkg =~ s/^\s*(\S+)\s*/$1/;
35                         $dep{$pkg} = 1 if $pkg ne "\n";
36                 }
37                 $in_bd = 1;
38         } else {
39                 $in_bd = 0;
40         }
41 }
42
43         
44 print join ("\n",sort keys %dep);