]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Packages.pm
merge back in source merges to fix the broken repository
[debbugs.git] / Debbugs / Packages.pm
index e040bc9517c788342757809719981ee52c20e144..743e29b9021f59c76c2ad271efd966346d0687ec 100644 (file)
@@ -5,6 +5,8 @@ use strict;
 # TODO: move config handling to a separate module
 my $config_path = '/etc/debbugs';
 require "$config_path/config";
+# Allow other modules to load config into their namespace.
+delete $INC{"$config_path/config"};
 
 use Exporter ();
 use vars qw($VERSION @ISA @EXPORT);
@@ -54,7 +56,7 @@ sub getpkgsrc {
     my %pkgcomponent;
 
     open(MM,"$Debbugs::Packages::gPackageSource")
-       or &quitcgi("open $Debbugs::Packages::gPackageSource: $!");
+       or die("open $Debbugs::Packages::gPackageSource: $!");
     while(<MM>) {
        next unless m/^(\S+)\s+(\S+)\s+(\S.*\S)\s*$/;
        my ($bin,$cmp,$src)=($1,$2,$3);
@@ -148,13 +150,8 @@ sub binarytosource {
     }
 
     # No $gBinarySourceMap, or it didn't have an entry for this name and
-    # version. Try $gPackageSource (unversioned) instead.
-    my $pkgsrc = getpkgsrc();
-    if (exists $pkgsrc->{$binname}) {
-       return [$pkgsrc->{$binname}, $binver];
-    } else {
-       return ();
-    }
+    # version.
+    return ();
 }
 
 =item sourcetobinary