]> git.donarmstrong.com Git - infobot.git/commitdiff
check for stality in sP()
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 20 Aug 2000 13:24:53 +0000 (13:24 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 20 Aug 2000 13:24:53 +0000 (13:24 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@49 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/Debian.pl

index 14301614a7cb3c1a5bb555d31c8abd90daa4531c..4317cba336c2820bcab5936eb3098f0ea9a99a97 100644 (file)
@@ -809,6 +809,15 @@ sub searchPackage {
 
        if (/^\*(.*)$/) {
            &main::DEBUG("sP: hrm => '$1'.");
+
+           if (&main::isStale($file, $main::param{'debianRefreshInterval'})) {
+               &main::DEBUG("STALE $file! regen.");
+               &generateIndex(($dist));
+               @files = searchPackage("$query $dist");
+               &main::DEBUG("EVIL HACK HACK HACK.");
+               last;
+           }
+
            $file = $1;
            next;
        }
@@ -848,12 +857,9 @@ sub getDistroFromStr {
     my $dist   = $defaultdist;
 
     if ($str =~ s/\s+($dists)$//i) {
-       &main::status("Debian(gDFS): found dist argument!");
        $dist = &getDistro(lc $1);
        $str =~ s/\\+$//;
     }
-    &main::DEBUG("gDFS: str => '$str', dist => '$dist'.");
-
     $str =~ s/\\([\$\^])/$1/g;
 
     return($dist,$str);