]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2002-11-02 09:21:42 by ajt]
authorajt <>
Sat, 2 Nov 2002 17:21:43 +0000 (09:21 -0800)
committerajt <>
Sat, 2 Nov 2002 17:21:43 +0000 (09:21 -0800)
stop updating obsolete db/ directory (we've been using db-h instead for ages)

scripts/errorlib.in
scripts/expire.in
scripts/service.in

index d4256029a8af94d6b3ff5886f6a50d2956da33b4..0f5ae90a21fd37bf2b71b6371336f2d507e0f15e 100755 (executable)
@@ -1,5 +1,5 @@
 # -*- perl -*-
-# $Id: errorlib.in,v 1.10 2002/10/27 13:40:17 ajt Exp $
+# $Id: errorlib.in,v 1.11 2002/11/02 09:21:42 ajt Exp $
 
 sub F_SETLK { 6; } sub F_WRLCK{ 1; }
 $flockstruct= 'sslll'; # And there ought to be something for this too.
@@ -108,12 +108,10 @@ sub bughook {
        &filelock("debbugs.trace.lock");
        &appendfile("debbugs.trace","$type $ref\n",@_);
        my @stuff=split/\n/, "$_[0]\n\n\n\n\n\n\n";
-       # XXX: bug: this'll only keep the most recent update until index.db
-       #      starts getting overwritten by index.db.realtime after update
-       my $hash = get_hashname($ref);
-       unlink("$gSpoolDir/db/$ref.status.new");
-       link("$gSpoolDir/db-h/$hash/$ref.status", "$gSpoolDir/db/$ref.status.new");
-       rename("$gSpoolDir/db/$ref.status.new", "$gSpoolDir/db/$ref.status");
+
+       my $hash = get_hashname($ref); # unused
+
+       # update realtime index.db
        open(IDXDB, "</org/bugs.debian.org/spool/index.db.realtime")
                or open(IDXDB, "</org/bugs.debian.org/spool/index.db");
        open(IDXNEW, ">/org/bugs.debian.org/spool/index.db.realtime.new");
@@ -138,6 +136,8 @@ sub bughook {
        close(IDXDB);
        rename("/org/bugs.debian.org/spool/index.db.realtime.new",
                "/org/bugs.debian.org/spool/index.db.realtime");
+
+
        &unfilelock;
 }
 
index 2ea5000c91d7354ff71e6b3984e8e8aac817ea37..70097cbd5b937bba293e8991aedd72f2753c40c8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: expire.in,v 1.10 2002/01/06 10:46:24 ajt Exp $
+# $Id: expire.in,v 1.11 2002/11/02 09:21:43 ajt Exp $
 
 # Load modules and set envirnment
 use File::Copy;
@@ -77,7 +77,6 @@ while (length($ref=shift(@list))) {
                                
                        print("archived $mref to archive/$dir (from $ref)\n") || &quit("output old: $!");
                }
-               unlink("db/$mref.log", "db/$mref.status", "db/$mref.report");
                unlink("db-h/$dir/$mref.log", "db-h/$dir/$mref.status", "db-h/$dir/$mref.report");
                print("deleted $mref (from $ref)\n") || &quit("output old: $!");
                &filelock("debbugs.trace.lock");
index 4c59d5dde3ef24df4d7bf31e53b87ccffa9bdc4a..be6141acc0720b36f4b5ec4d49094acb21d51cce 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: service.in,v 1.59 2002/10/21 08:37:29 cjwatson Exp $
+# $Id: service.in,v 1.60 2002/11/02 09:21:43 ajt Exp $
 # ^ more or less ^
 #
 # Usage: service <code>.nn
@@ -162,20 +162,15 @@ for ($procline=0; $procline<=$#bodylines; $procline++) {
     } elsif (m/^send-detail\s+\#?(\d+)$/i) {
        &transcript("This BTS function is currently disabled, sorry.\n\n");
        $ok++; # well, it's not really ok, but it fixes #81224 :)
-#        $ref= $1+0; $reffile= $ref; $reffile =~ s,^..,$&/$&,;
-#        &sendlynxdoc("db/$reffile-b.html","additional logs for $gBug#$ref");
     } elsif (m/^index(\s+full)?$/i) {
        &transcript("This BTS function is currently disabled, sorry.\n\n");
        $ok++; # well, it's not really ok, but it fixes #81224 :)
-#        &sendlynxdoc("db/ix/full.html",'full index');
     } elsif (m/^index-summary\s+by-package$/i) {
        &transcript("This BTS function is currently disabled, sorry.\n\n");
        $ok++; # well, it's not really ok, but it fixes #81224 :)
-#        &sendlynxdoc("db/ix/psummary.html",'summary index sorted by package/title');
     } elsif (m/^index-summary(\s+by-number)?$/i) {
        &transcript("This BTS function is currently disabled, sorry.\n\n");
        $ok++; # well, it's not really ok, but it fixes #81224 :)
-#        &sendlynxdoc("db/ix/summary.html",'summary index sorted by number/date');
     } elsif (m/^index(\s+|-)pack(age)?s?$/i) {
        &sendlynxdoc("cgi-bin/pkgindex.cgi?indexon=pkg",'index of packages');
     } elsif (m/^index(\s+|-)maints?$/i) {
@@ -188,41 +183,6 @@ for ($procline=0; $procline<=$#bodylines; $procline++) {
                next;
        }
        &sendlynxdoc("$maint","$gBug list for maintainer \`$maint'");
-if (0) {
-        $substrg= $2; $matches=0;
-        opendir(DBD,"$gWebDir/db/ma") || die $!;
-        while (defined($_=readdir(DBD))) {
-            next unless m/^l/ && m/\.html$/;
-            &transcript("F|$_\n") if $dl>1;
-            $filename= $_; s/^l//; s/\.html$//;
-            &transcript("P|$_\n") if $dl>2;
-            while (s/-(..)([^_])/-$1_-$2/) { }
-            &transcript("P|$_\n") if $dl>2;
-            s/^(.{0,2})_/$1-20_/g; while (s/([^-]..)_/$1-20_/) { };
-            &transcript("P|$_\n") if $dl>2;
-            s/^,(.*),(.*),([^,]+)$/$1-40_$2-20_-28_$3-29_/;
-            &transcript("P|$_\n") if $dl>2;
-            s/^([^,]+),(.*),(.*),$/$1-20_-3c_$2-40_$3-3e_/;
-            &transcript("P|$_\n") if $dl>2;
-            s/\./-2e_/g;
-            &transcript("P|$_\n") if $dl>2;
-            $out='';
-            while (m/-(..)_/) { $out.= $`.sprintf("%c",hex($1)); $_=$'; }
-            $out.=$_;
-            &transcript("M|$out\n") if $dl>1;
-            next unless index(lc $out, lc $substrg)>=0;
-            &transcript("S|$filename\n") if $dl>0;
-            &transcript("S|$out\n") if $dl>0;
-            $matches++;
-            &sendlynxdocraw("db/ma/$filename","$gBug list for maintainer \`$out'");
-        }
-        if ($matches) {
-            &transcript("$gBug list(s) for $matches maintainer(s) sent.\n\n");
-        } else {
-            &transcript("No maintainers found containing \`$substrg'.\n".
-                        "Use \`index-maint' to get list of maintainers.\n\n");
-        }
-} # 0
         $ok++;
     } elsif (m/^index(\s+|-)pack(age)?s?\s+(\S.*\S)$/i) {
        $package = $+;
@@ -232,41 +192,18 @@ if (0) {
                next;
        }
        &sendlynxdoc("$package","$gBug list for package $package sent.\n\n");
-if (0) {
-        $substrg= $+; $matches=0;
-        opendir(DBD,"$gWebDir/db/pa") || die $!;
-        while (defined($_=readdir(DBD))) {
-            next unless m/^l/ && m/\.html$/;
-            &transcript("F|$_\n") if $dl>1;
-            $filename= $_; s/^l//; s/\.html$//;
-            next unless index(lc $_, lc $substrg)>=0;
-            &transcript("S|$filename\n") if $dl>0;
-            &transcript("S|$out\n") if $dl>0;
-            $matches++;
-            &sendlynxdocraw("db/pa/$filename","$gBug list for package \`$_'");
-        }
-        if ($matches) {
-            &transcript("$gBug list(s) for $matches package(s) sent.\n\n");
-        } else {
-            &transcript("No packages found containing \`$substrg'.\n".
-                        "Use \`index-packages' to get list of packages.\n\n");
-        }
-} # 0
         $ok++;
     } elsif (m/^send-unmatched(\s+this|\s+-?0)?$/i) {
        &transcript("This BTS function is currently disabled, sorry.\n\n");
        $ok++; # well, it's not really ok, but it fixes #81224 :)
-#        &sendlynxdoc("db/ju/unmatched-1.html","junk (this week)");
     } elsif (m/^send-unmatched\s+(last|-1)$/i) {
        &transcript("This BTS function is currently disabled, sorry.\n\n");
        $ok++; # well, it's not really ok, but it fixes #81224 :)
-#        &sendlynxdoc("db/ju/unmatched-2.html","junk (last week)");
     } elsif (m/^send-unmatched\s+(old|-2)$/i) {
        &transcript("This BTS function is currently disabled, sorry.\n\n");
        $ok++; # well, it's not really ok, but it fixes #81224 :)
-#        &sendlynxdoc("db/ju/unmatched-3.html","junk (two weeks ago)");
     } elsif (m/^getinfo\s+([\w-.]+)$/i) {
-# the following is basically a Debian-specific kludge, but who cares
+        # the following is basically a Debian-specific kludge, but who cares
         $req = $1;
        if ($req =~ /^maintainers$/i && -f "$gConfigDir/Maintainers") {
            &sendinfo("local", "$gConfigDir/Maintainers", "Maintainers file");