X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fcommon.pl;h=b02bed43d1c79bc4272561c98df47d238542327c;hb=75b133aa2ed28461048b6414fd1344f62bb1c2eb;hp=c57bcf97d20eafed0b9d14f81fc5a7b2c46abdd9;hpb=e379a8a833838efb8992100f0095126159b23eb9;p=debbugs.git diff --git a/cgi/common.pl b/cgi/common.pl index c57bcf9..b02bed4 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -833,7 +833,20 @@ sub makesourceversions { $sourceversions{$version} = 1; } else { my @srcinfo = binarytosource($pkg, $version, $arch); - next unless @srcinfo; + unless (@srcinfo) { + # We don't have explicit information about the + # binary-to-source mapping for this version (yet). Since + # this is a CGI script and our output is transient, we can + # get away with just looking in the unversioned map; if it's + # wrong (as it will be when binary and source package + # versions differ), too bad. + my $pkgsrc = getpkgsrc(); + if (exists $pkgsrc->{$pkg}) { + @srcinfo = ([$pkgsrc->{$pkg}, $version]); + } else { + next; + } + } $sourceversions{"$_->[0]/$_->[1]"} = 1 foreach @srcinfo; } }