Check that a package is really present in a distribution before putting
[bugscan.git] / bugscan
diff --git a/bugscan b/bugscan
index c6b0778..2bc7b4d 100755 (executable)
--- a/bugscan
+++ b/bugscan
@@ -2,33 +2,33 @@
 
 require bugcfg;
 require scanlib;
+use strict;
+# use warnings;
 
 # Main part
 
-&readpackages($debian_ftproot, "debian") if defined $debian_ftproot;
-&readpackages($nonUS_ftproot, "non-US")  if defined $nonUS_ftproot;
-&readsources($debian_ftproot, "debian")  if defined $debian_ftproot;
-&readsources($nonUS_ftproot, "non-US")   if defined $nonUS_ftproot;
+scanlib::readpackages($bugcfg::debian_ftproot, "debian") if defined $bugcfg::debian_ftproot;
+scanlib::readsources($bugcfg::debian_ftproot, "debian")  if defined $bugcfg::debian_ftproot;
 
-&readdebbugssources($debian_sources, "debian") if defined $debian_sources;
-&readdebbugssources($nonUS_sources, "non-US") if defined $nonUS_sources;
+scanlib::readdebbugssources($bugcfg::debian_sources, "debian") if defined $bugcfg::debian_sources;
 
 
-&readpseudopackages;
-&readmaintainers;
-&scanspool;
+scanlib::readpseudopackages();
+scanlib::readmaintainers();
+scanlib::scanspool();
 
-for $p (keys %packagelist) {
+for my $p (keys %scanlib::packagelist) {
        my $section;
-       if (exists $section{$p}) {
-           $section = $section{$p};
+       if (exists $scanlib::section{$p}) {
+           $section = $scanlib::section{$p};
        } else {
-           $section = $debbugssection{$p};
+           $section = $scanlib::debbugssection{$p};
        }
-       print "$p $section $maintainer{$p}";
-       for $b (split(/ /, $packagelist{$p})) {
-               print "$bugs{$b}\n";
+       print "$p $section $scanlib::maintainer{$p}\n";
+       for my $b (@{$scanlib::packagelist{$p}}) {
+               print "$scanlib::bugs{$b}\n";
        }
+       print "\n";
 }
 
 exit 0;