X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FModules%2FDebian.pl;h=2626b0fefc37644801776abb729a109ed056114e;hb=22dd6f030aa19695c39839d01c9511fccd7dab7f;hp=940c575c790eff0c9ee07b456e45687d913139fa;hpb=2d050e260224ba7bdaf92ee1f9b2cffdc2c9f006;p=infobot.git diff --git a/src/Modules/Debian.pl b/src/Modules/Debian.pl index 940c575..2626b0f 100644 --- a/src/Modules/Debian.pl +++ b/src/Modules/Debian.pl @@ -8,58 +8,53 @@ package Debian; use strict; +no strict 'refs'; # FIXME: dstats aborts if set -# format: "alias=real". my $announce = 0; -my $defaultdist = "sid"; -my $refresh = &::getChanConfDefault("debianRefreshInterval",7) - * 60 * 60 * 24; +my $defaultdist = 'sid'; +my $refresh = &::getChanConfDefault('debianRefreshInterval', 7, $::chan) * 60 * 60 * 24; my $debug = 0; +my $debian_dir = $::bot_state_dir . 'debian'; +my $country = 'us'; # well .config it yourself then. ;-) +my $protocol = 'http'; -### ... old -#my %dists = ( -# "sid" => "unstable", -# "woody" => "testing", # new since 20001219. -# "potato" => "stable", -# "incoming" => "incoming", -#); - -### new... the right way. +# format: "alias=real". my %dists = ( - "unstable" => "sid", - "testing" => "woody", # new since 20001219. - "stable" => "potato", - "incoming" => "incoming", + 'unstable' => 'sid', + 'testing' => 'sarge', + 'stable' => 'woody', + 'oldstable' => 'potato', + 'incoming' => 'incoming', ); my %urlcontents = ( - "debian/Contents-##DIST-i386.gz" => - "ftp://ftp.us.debian.org". + "Contents-##DIST-i386.gz" => + "$protocol://ftp.$country.debian.org". "/debian/dists/##DIST/Contents-i386.gz", - "debian/Contents-##DIST-i386-non-US.gz" => - "ftp://non-us.debian.org". + "Contents-##DIST-i386-non-US.gz" => + "$protocol://non-us.debian.org". "/debian-non-US/dists/##DIST/non-US/Contents-i386.gz", ); my %urlpackages = ( - "debian/Packages-##DIST-main-i386.gz" => - "ftp://ftp.us.debian.org". + "Packages-##DIST-main-i386.gz" => + "$protocol://ftp.$country.debian.org". "/debian/dists/##DIST/main/binary-i386/Packages.gz", - "debian/Packages-##DIST-contrib-i386.gz" => - "ftp://ftp.us.debian.org". + "Packages-##DIST-contrib-i386.gz" => + "$protocol://ftp.$country.debian.org". "/debian/dists/##DIST/contrib/binary-i386/Packages.gz", - "debian/Packages-##DIST-non-free-i386.gz" => - "ftp://ftp.us.debian.org". + "Packages-##DIST-non-free-i386.gz" => + "$protocol://ftp.$country.debian.org". "/debian/dists/##DIST/non-free/binary-i386/Packages.gz", - "debian/Packages-##DIST-non-US-main-i386.gz" => - "ftp://non-us.debian.org". + "Packages-##DIST-non-US-main-i386.gz" => + "$protocol://non-us.debian.org". "/debian-non-US/dists/##DIST/non-US/main/binary-i386/Packages.gz", - "debian/Packages-##DIST-non-US-contrib-i386.gz" => - "ftp://non-us.debian.org". + "Packages-##DIST-non-US-contrib-i386.gz" => + "$protocol://non-us.debian.org". "/debian-non-US/dists/##DIST/non-US/contrib/binary-i386/Packages.gz", - "debian/Packages-##DIST-non-US-non-free-i386.gz" => - "ftp://non-us.debian.org". + "Packages-##DIST-non-US-non-free-i386.gz" => + "$protocol://non-us.debian.org". "/debian-non-US/dists/##DIST/non-US/non-free/binary-i386/Packages.gz", ); @@ -68,15 +63,15 @@ my %urlpackages = ( ####################### #### -# Usage: &DebianDownload(%hash); +# Usage: &DebianDownload($dist, %hash); sub DebianDownload { my ($dist, %urls) = @_; my $bad = 0; my $good = 0; - if (! -d "debian/") { + if (! -d $debian_dir) { &::status("Debian: creating debian dir."); - mkdir("debian/",0755); + mkdir($debian_dir, 0755); } # fe dists. @@ -88,7 +83,7 @@ sub DebianDownload { $file =~ s/##DIST/$dist/g; my $update = 0; - if ( -f $file) { + if ( -f $file ) { my $last_refresh = (stat $file)[9]; $update++ if (time() - $last_refresh > $refresh); } else { @@ -113,41 +108,46 @@ sub DebianDownload { if ($url =~ /^ftp:\/\/(.*?)\/(\S+)\/(\S+)$/) { my ($host,$path,$thisfile) = ($1,$2,$3); -### HACK 1 -# if ($file =~ /Contents-woody-i386-non-US/) { -# &::DEBUG("Skipping Contents-woody-i386-non-US."); -# $file =~ s/woody/potato/; -# $path =~ s/woody/potato/; -# next; -# } - if (!&::ftpGet($host,$path,$thisfile,$file)) { &::WARN("deb: down: $file == BAD."); $bad++; next; } - if (! -f $file) { - &::WARN("deb: down: ftpGet: !file"); + } elsif ($url =~ /^http:\/\/\S+\/\S+$/) { + + if (!&::getURLAsFile($url,$file)) { + &::WARN("deb: down: http: $file == BAD."); $bad++; next; } -### HACK2 -# if ($file =~ /Contents-potato-i386-non-US/) { -# &::DEBUG("hack: using potato's non-US contents for woody."); -# system("cp debian/Contents-potato-i386-non-US.gz debian/Contents-woody-i386-non-US.gz"); -# } - - &::DEBUG("deb: download: good.") if ($debug); - $good++; } else { &::ERROR("Debian: invalid format of url => ($url)."); $bad++; next; } + + if (! -f $file) { + &::WARN("deb: down: http: !file"); + $bad++; + next; + } + +# my $exit = system("/bin/gzip -t $file"); +# if ($exit) { +# &::WARN("deb: $file is corrupted ($exit) :/"); +# unlink $file; +# next; +# } + + &::DEBUG("deb: download: good.") if ($debug); + $good++; } + # ok... lets just run this. + &::miscCheck() if (&::whatInterface() =~ /IRC/); + if ($good) { &generateIndex($dist); return 1; @@ -175,19 +175,19 @@ sub searchContents { $query =~ s/^\s+|\s+$//g; if (!&::validExec($query)) { - &::msg($::who, "search string looks fuzzy."); + &::msg($::who, 'search string looks fuzzy.'); return; } - if ($dist eq "incoming") { # nothing yet. - &::DEBUG("sC: dist = 'incoming'. no contents yet."); + if ($dist eq 'incoming') { # nothing yet. + &::DEBUG('sC: dist = "incoming". no contents yet.'); return; } else { my %urls = &fixDist($dist, %urlcontents); # download contents file. - &::DEBUG("deb: download 1.") if ($debug); + &::DEBUG('deb: download 1.') if ($debug); if (!&DebianDownload($dist, %urls)) { - &::WARN("Debian: could not download files."); + &::WARN('Debian: could not download files.'); } } @@ -217,8 +217,8 @@ sub searchContents { foreach (keys %urlcontents) { s/##DIST/$dist/g; - next unless ( -f $_); - push(@files,$_); + next unless ( -f "$debian_dir/$_" ); + push(@files, "$debian_dir/$_"); } if (!scalar @files) { @@ -235,26 +235,27 @@ sub searchContents { $regex =~ s/\?/./g; open(IN,"zegrep -h '$grepRE' $files |"); + # wonderful abuse of if, last, next, return, and, unless ;) while () { - if (/^\.?\/?(.*?)[\t\s]+(\S+)\n$/) { - my ($file,$package) = ("/".$1,$2); - if ($query =~ /[\/\*\\]/) { - next unless (eval { $file =~ /$regex/ }); - return unless &checkEval($@); - } else { - my ($basename) = $file =~ /^.*\/(.*)$/; - next unless (eval { $basename =~ /$regex/ }); - return unless &checkEval($@); - } - next if ($query !~ /\.\d\.gz/ and $file =~ /\/man\//); - next if ($front and eval { $file !~ /^\/$query/ }); - return unless &checkEval($@); + last if ($found > 100); - $contents{$package}{$file} = 1; - $found++; + next unless (/^\.?\/?(.*?)[\t\s]+(\S+)\n$/); + my ($file,$package) = ("/".$1,$2); + + if ($query =~ /[\/\*\\]/) { + next unless (eval { $file =~ /$regex/ }); + return unless &checkEval($@); + } else { + my ($basename) = $file =~ /^.*\/(.*)$/; + next unless (eval { $basename =~ /$regex/ }); + return unless &checkEval($@); } + next if ($query !~ /\.\d\.gz/ and $file =~ /\/man\//); + next if ($front and eval { $file !~ /^\/$query/ }); + return unless &checkEval($@); - last if ($found > 100); + $contents{$package}{$file} = 1; + $found++; } close IN; @@ -273,7 +274,7 @@ sub searchContents { } my $file = "$::param{tempDir}/$::who.txt"; - if (!open(OUT,">$file")) { + if (!open OUT, ">$file") { &::ERROR("Debian: cannot write file for dcc send."); return; } @@ -312,24 +313,25 @@ sub searchContents { my $prefix = "Debian Search of '$query' "; if (scalar @list) { # @list. - &::pSReply( &::formListReply(0, $prefix, @list) ); + &::performStrictReply( &::formListReply(0, $prefix, @list) ); + return; + } - } else { # !@list. - &::DEBUG("deb: ok, !\@list, searching desc for '$query'.") if ($debug); - my @list = &searchDesc($query); + # !@list. + &::DEBUG("deb: ok, !\@list, searching desc for '$query'.") if ($debug); + @list = &searchDesc($query); - if (!scalar @list) { - my $prefix = "Debian Package/File/Desc Search of '$query' "; - &::pSReply( &::formListReply(0, $prefix, ) ); + if (!scalar @list) { + my $prefix = "Debian Package/File/Desc Search of '$query' "; + &::performStrictReply( &::formListReply(0, $prefix, ) ); - } elsif (scalar @list == 1) { # list = 1. - &::DEBUG("deb: list == 1; showing package info of '$list[0]'."); - &infoPackages("info", $list[0]); + } elsif (scalar @list == 1) { # list = 1. + &::DEBUG("deb: list == 1; showing package info of '$list[0]'."); + &infoPackages("info", $list[0]); - } else { # list > 1. - my $prefix = "Debian Desc Search of '$query' "; - &::pSReply( &::formListReply(0, $prefix, @list) ); - } + } else { # list > 1. + my $prefix = "Debian Desc Search of '$query' "; + &::performStrictReply( &::formListReply(0, $prefix, @list) ); } } @@ -351,7 +353,7 @@ sub searchAuthor { foreach (keys %urlpackages) { s/##DIST/$dist/g; - if (! -f $_) { + if (! -f "$debian_dir/$_" ) { $bad++; next; } @@ -360,7 +362,7 @@ sub searchAuthor { $files .= " ".$_; } - &::DEBUG("deb: good = $good, bad = $bad..."); + &::DEBUG("deb: good = $good, bad = $bad...") if ($debug); if ($good == 0 and $bad != 0) { my %urls = &fixDist($dist, %urlpackages); @@ -389,7 +391,8 @@ sub searchAuthor { $package = ""; } else { - &::WARN("invalid line: '$_'."); + chop; + &::WARN("debian: invalid line: '$_' (1)."); } } close IN; @@ -418,11 +421,11 @@ sub searchAuthor { my @list = keys %hash; if (scalar @list != 1) { my $prefix = "Debian Author Search of '$query' "; - &::pSReply( &::formListReply(0, $prefix, @list) ); + &::performStrictReply( &::formListReply(0, $prefix, @list) ); return 1; } - &::DEBUG("deb: showing all packages by '$list[0]'..."); + &::DEBUG("deb: showing all packages by '$list[0]'...") if ($debug); my @pkg = sort keys %{ $pkg{$list[0]} }; @@ -432,7 +435,7 @@ sub searchAuthor { my $email = join(', ', keys %{ $maint{$list[0]} }); my $prefix = "Debian Packages by $list[0] \002<\002$email\002>\002 "; - &::pSReply( &::formListReply(0, $prefix, @pkg) ); + &::performStrictReply( &::formListReply(0, $prefix, @pkg) ); } #### @@ -453,13 +456,13 @@ sub searchDesc { foreach (keys %urlpackages) { s/##DIST/$dist/g; - if (! -f $_) { + if (! -f "$debian_dir/$_" ) { $bad++; next; } $good++; - $files .= " ".$_; + $files .= " $debian_dir/$_"; } &::DEBUG("deb(2): good = $good, bad = $bad...") if ($debug); @@ -493,10 +496,13 @@ sub searchDesc { &::WARN("sD: package == NULL?"); next; } + $desc{$package} = $desc; $package = ""; + } else { - &::WARN("invalid line: '$_'."); + chop; + &::WARN("debian: invalid line: '$_'. (2)"); } } close IN; @@ -511,7 +517,7 @@ sub searchDesc { #### # Usage: &generateIncoming(); sub generateIncoming { - my $pkgfile = "debian/Packages-incoming"; + my $pkgfile = $debian_dir."/Packages-incoming"; my $idxfile = $pkgfile.".idx"; my $stale = 0; $stale++ if (&::isStale($pkgfile.".gz", $refresh)); @@ -522,11 +528,11 @@ sub generateIncoming { ### STATIC URL. my %ftp = &::ftpList("llug.sep.bnl.gov", "/pub/debian/Incoming/"); - if (!open(PKG,">$pkgfile")) { + if (!open PKG, ">$pkgfile") { &::ERROR("cannot write to pkg $pkgfile."); return 0; } - if (!open(IDX,">$idxfile")) { + if (!open IDX, ">$idxfile") { &::ERROR("cannot write to idx $idxfile."); return 0; } @@ -571,7 +577,7 @@ sub getPackageInfo { my $found = 0; my (%pkg, $pkg); - open(IN, "zcat $file 2>&1 |"); + open(IN, "/bin/zcat $file 2>&1 |"); my $done = 0; while (!eof IN) { @@ -582,7 +588,7 @@ sub getPackageInfo { # package line. if (/^Package: (.*)\n$/) { $pkg = $1; - if ($pkg =~ /^$package$/i) { + if ($pkg =~ /^\Q$package\E$/i) { $found++; # we can use pkg{'package'} instead. $pkg{'package'} = $pkg; } @@ -666,6 +672,7 @@ sub infoPackages { if (!scalar @files) { &::status("Debian: no valid package found; checking incoming."); @files = &validPackage($package, "incoming"); + if (scalar @files) { &::status("Debian: cool, it exists in incoming."); $incoming++; @@ -683,7 +690,7 @@ sub infoPackages { if (! -f $files[0]) { &::WARN("files[0] ($files[0]) doesn't exist."); - &::msg($::who, "WARNING: $files[0] does not exist? FIXME"); + &::msg($::who, "FIXME: $files[0] does not exist?"); return 'NULL'; } @@ -702,28 +709,11 @@ sub infoPackages { } my %pkg = &getPackageInfo($package, $file); + $query = "info" if ($query eq "dinfo"); + # 'fm'-like output. if ($query eq "info") { - if (scalar keys %pkg > 5) { - $pkg{'info'} = "\002(\002". $pkg{'desc'} ."\002)\002"; - $pkg{'info'} .= ", section ".$pkg{'section'}; - $pkg{'info'} .= ", is ".$pkg{'priority'}; -# $pkg{'info'} .= ". Version: \002$pkg{'version'}\002"; - $pkg{'info'} .= ". Version: \002$pkg{'version'}\002 ($dist)"; - $pkg{'info'} .= ", Packaged size: \002". int($pkg{'size'}/1024) ."\002 kB"; - $pkg{'info'} .= ", Installed size: \002$pkg{'installed'}\002 kB"; - - if ($incoming) { - &::status("iP: info requested and pkg is in incoming, too."); - my %incpkg = &getPackageInfo($query, "debian/Packages-incoming"); - - if (scalar keys %incpkg) { - $pkg{'info'} .= ". Is in incoming ($incpkg{'file'})."; - } else { - &::ERROR("iP: pkg $query is in incoming but we couldn't get any info?"); - } - } - } else { + if (scalar keys %pkg <= 5) { &::DEBUG("deb: running debianCheck() due to problems (".scalar(keys %pkg).")."); &debianCheck(); &::DEBUG("deb: end of debianCheck()"); @@ -731,7 +721,26 @@ sub infoPackages { &::msg($::who,"Debian: Package appears to exist but I could not retrieve info about it..."); return; } - } + + $pkg{'info'} = "\002(\002". $pkg{'desc'} ."\002)\002"; + $pkg{'info'} .= ", section ".$pkg{'section'}; + $pkg{'info'} .= ", is ".$pkg{'priority'}; +# $pkg{'info'} .= ". Version: \002$pkg{'version'}\002"; + $pkg{'info'} .= ". Version: \002$pkg{'version'}\002 ($dist)"; + $pkg{'info'} .= ", Packaged size: \002". int($pkg{'size'}/1024) ."\002 kB"; + $pkg{'info'} .= ", Installed size: \002$pkg{'installed'}\002 kB"; + + if ($incoming) { + &::status("iP: info requested and pkg is in incoming, too."); + my %incpkg = &getPackageInfo($query, $debian_dir ."/Packages-incoming"); + + if (scalar keys %incpkg) { + $pkg{'info'} .= ". Is in incoming ($incpkg{'file'})."; + } else { + &::ERROR("iP: pkg $query is in incoming but we couldn't get any info?"); + } + } + } if ($dist eq "incoming") { $pkg{'info'} .= "Version: \002$pkg{'version'}\002"; @@ -753,7 +762,7 @@ sub infoPackages { } } - &::pSReply("$package: $pkg{$query}"); + &::performStrictReply("$package: $pkg{$query}"); } # Usage: &infoStats($dist); @@ -774,7 +783,7 @@ sub infoStats { } my %stats; - my %total; + my %total = (count => 0, maint => 0, isize => 0, csize => 0); my $file; foreach $file (keys %urlpackages) { $file =~ s/##DIST/$dist/g; # won't work for incoming. @@ -784,10 +793,10 @@ sub infoStats { next; } - open(IN,"zcat $file 2>&1 |"); + open(IN, "zcat $debian_dir/$file 2>&1 |"); - if (! -e $file) { - &::DEBUG("deb: iS: $file does not exist."); + if (! -e "$debian_dir/$file") { + &::DEBUG("deb: iS: $debian_dir/$file does not exist."); next; } @@ -817,7 +826,7 @@ sub infoStats { ### TODO: don't count ppl with multiple email addresses. - &::pSReply( + &::performStrictReply( "Debian Distro Stats on $dist... ". "\002$total{'count'}\002 packages, ". "\002".scalar(keys %{ $total{'maint'} })."\002 maintainers, ". @@ -842,7 +851,7 @@ sub infoStats { # Usage: &generateIndex(); sub generateIndex { my (@dists) = @_; - &::status("Debian: !!! generateIndex($dists[0]) called !!!"); + &::DEBUG("D: generateIndex($dists[0]) called!"); if (!scalar @dists or $dists[0] eq '') { &::ERROR("gI: no dists to generate index."); return 1; @@ -850,7 +859,7 @@ sub generateIndex { foreach (@dists) { my $dist = &getDistro($_); # incase the alias is returned, possible? - my $idx = "debian/Packages-$dist.idx"; + my $idx = $debian_dir."/Packages-$dist.idx"; # TODO: check if any of the Packages file have been updated then # regenerate it, even if it's not stale. @@ -869,11 +878,11 @@ sub generateIndex { system("cp $idx $idx-old"); } - &::DEBUG("deb: gIndex: calling DebianDownload($dist, ...)."); - &DebianDownload($dist, %urlpackages); + &::DEBUG("deb: gIndex: calling DebianDownload($dist, ...).") if ($debug); + &DebianDownload($dist, &fixDist($dist, %urlpackages) ); &::status("Debian: generating index for '$dist'."); - if (!open(OUT,">$idx")) { + if (!open OUT, ">$idx") { &::ERROR("cannot write to $idx."); return 0; } @@ -881,6 +890,7 @@ sub generateIndex { my $packages; foreach $packages (keys %urlpackages) { $packages =~ s/##DIST/$dist/; + $packages = "$debian_dir/$packages"; if (! -e $packages) { &::ERROR("gIndex: '$packages' does not exist?"); @@ -916,7 +926,7 @@ sub validPackage { &::DEBUG("deb: validPackage($package, $dist) called.") if ($debug); my $error = 0; - while (!open(IN, "debian/Packages-$dist.idx")) { + while (!open IN, $debian_dir."/Packages-$dist.idx") { if ($error) { &::ERROR("Packages-$dist.idx does not exist (#1)."); return; @@ -948,26 +958,22 @@ sub validPackage { sub searchPackage { my ($dist, $query) = &getDistroFromStr($_[0]); - my $file = "debian/Packages-$dist.idx"; - my @files; + my $file = $debian_dir."/Packages-$dist.idx"; + my $warn = ($query =~ tr/A-Z/a-z/) ? 1 : 0; my $error = 0; - my $warn = 0; - - if ($query =~ tr/A-Z/a-z/) { - $warn++; - } + my @files; &::status("Debian: Search package matching '$query' in '$dist'."); - unlink $file if ( -z $file); + unlink $file if ( -z $file ); - while (!open(IN, $file)) { + while (!open IN, $file) { if ($dist eq "incoming") { &::DEBUG("deb: sP: dist == incoming; calling gI()."); &generateIncoming(); } if ($error) { - &::ERROR("could not generate index ($file)!!!"); + &::ERROR("could not generate index ($file)!"); return; } @@ -983,10 +989,10 @@ sub searchPackage { $file = $1; if (&::isStale($file, $refresh)) { - &::DEBUG("deb: STALE $file! regen."); + &::DEBUG("deb: STALE $file! regen.") if ($debug); &generateIndex(($dist)); ### @files = searchPackage("$query $dist"); - &::DEBUG("deb: EVIL HACK HACK HACK."); + &::DEBUG("deb: EVIL HACK HACK HACK.") if ($debug); last; } @@ -1058,42 +1064,44 @@ sub fixDist { $key =~ s/##DIST/$dist/; $val =~ s/##DIST/$dist/; ### TODO: what should we do if the sar wasn't done. - $new{$key} = $val; + $new{$debian_dir."/".$key} = $val; } + return %new; } sub DebianFind { - ### H-H-H-HACK HACK HACK :) + # HACK! HACK! HACK! my ($str) = @_; my ($dist, $query) = &getDistroFromStr($str); my @results = sort &searchPackage($str); if (!scalar @results) { - &::Forker("debian", sub { &searchContents($str); } ); + &::Forker("Debian", sub { &searchContents($str); } ); } elsif (scalar @results == 1) { &::status("searchPackage returned one result; getting info of package instead!"); - &::Forker("debian", sub { &infoPackages("info", "$results[0] $dist"); } ); + &::Forker("Debian", sub { &infoPackages("info", "$results[0] $dist"); } ); } else { my $prefix = "Debian Package Listing of '$query' "; - &::pSReply( &::formListReply(0, $prefix, @results) ); + &::performStrictReply( &::formListReply(0, $prefix, @results) ); } } sub debianCheck { - my $dir = "debian/"; my $error = 0; &::status("debianCheck() called."); ### TODO: remove the following loop (check if dir exists before) while (1) { - last if (opendir(DEBIAN, $dir)); + last if (opendir(DEBIAN, $debian_dir)); + if ($error) { &::ERROR("dC: cannot opendir debian."); return; } - mkdir $dir, 0755; + + mkdir $debian_dir, 0755; $error++; } @@ -1102,14 +1110,15 @@ sub debianCheck { while (defined($file = readdir DEBIAN)) { next unless ($file =~ /(gz|bz2)$/); - my $exit = system("gzip -t '$dir/$file'"); - next unless ($exit); + # TODO: add bzip2 support (debian doesn't do .bz2 anyway) + #my $exit = system("/bin/gzip -t '$debian_dir/$file'"); + #next unless ($exit); &::DEBUG("deb: hmr... => ".(time() - (stat($file))[8])."'."); next unless (time() - (stat($file))[8] > 3600); - &::DEBUG("deb: dC: exit => '$exit'."); - &::WARN("dC: '$dir/$file' corrupted? deleting!"); - unlink $dir."/".$file; + #&::DEBUG("deb: dC: exit => '$exit'."); + &::WARN("dC: '$debian_dir/$file' corrupted? deleting!"); + unlink $debian_dir."/".$file; $retval++; } @@ -1128,19 +1137,19 @@ sub checkEval { } sub searchDescFE { - &::DEBUG("deb: FE called for searchDesc"); +# &::DEBUG("deb: FE called for searchDesc"); my ($query) = @_; my @list = &searchDesc($query); if (!scalar @list) { my $prefix = "Debian Desc Search of '$query' "; - &::pSReply( &::formListReply(0, $prefix, ) ); + &::performStrictReply( &::formListReply(0, $prefix, ) ); } elsif (scalar @list == 1) { # list = 1. &::DEBUG("deb: list == 1; showing package info of '$list[0]'."); &infoPackages("info", $list[0]); } else { # list > 1. my $prefix = "Debian Desc Search of '$query' "; - &::pSReply( &::formListReply(0, $prefix, @list) ); + &::performStrictReply( &::formListReply(0, $prefix, @list) ); } }