~ubuntu-branches/debian/squeeze/debbugs/squeeze

« back to all changes in this revision

Viewing changes to scripts/processall.in

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2003-06-06 09:25:30 UTC
  • Revision ID: james.westby@ubuntu.com-20030606092530-0tnoi4bc3xcrusm3
Tags: 2.4.1
* Colin Watson:
  - Exit the CGI scripts straight away if the HTTP method is HEAD, to save
    pointless work.
  - Display pending+fixed bugs as "fixed in NMU", not "pending upload".
  - Add a man page for debbugsconfig.
  - Report original tags when changing them, closes: #170630.
  - Add missing <ul></ul> tags to db2html's output, closes: #50746.
  - Add a 'submitter' command to service, based on a patch by Matt Kraai.
  - Remove the final use of cgi-lib.pl, so it's gone. Remove copyright
    notices that were there due to using it.
  - Accept ';' as well as '&' as a CGI argument separator.
  - db2html now works with the new hashed database layout.
  - Disable the fixed severity in favour of the tag.
  - MIME-encoded messages to bugs are displayed in decoded form on the web
    interface (unless the "mime=no" parameter is used), closes: #136114.
  - Add facility to search by tag.
  - Fix rebuild script and add it to the example crontab, closes: #139696.
  - Silence postinst warning if spool/db doesn't exist, closes: #194892.
  - Clean up the definition and use of $gCGIDomain, closes: #139697.
* Adam Heath:
  - Convert all code to use global read/write functions, instead of having
    it duplicated everywhere.
  - Trim trailing whitespace from pseudoheader values.  Closes: #153590.
  - Warn when reassigning to an unknown package.  Closes: #60595.
* Josip Rodin:
  - Added a terse=yes mode for bugreport.cgi, possibly useful for
    monstrously long bugs.
  - Purged needless date(1) forks, replaced with strftime.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/perl
2
 
# $Id: processall.in,v 1.4 2000/10/07 17:27:13 joy Exp $
 
2
# $Id: processall.in,v 1.9 2002/11/17 22:45:16 cjwatson Exp $
3
3
#
4
4
# Usage: processall
5
5
#
8
8
# Creates: incoming/E.nn
9
9
# Stop;    process/stop
10
10
 
11
 
require( '/etc/debbugs/config' );
12
 
$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'};
 
11
$config_path = '/etc/debbugs';
 
12
$lib_path = '/usr/lib/debbugs';
 
13
 
 
14
require "$config_path/config";
 
15
require "$lib_path/errorlib";
 
16
$ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
 
17
 
 
18
use File::Path;
 
19
 
13
20
chdir( "$gSpoolDir" ) || die 'chdir spool: $!\n';
14
 
push( @INC, '/usr/lib/debbugs' );
 
21
push( @INC, "$lib_path" );
15
22
 
16
23
#open(DEBUG,">&4");
17
24
 
 
25
umask(002);
 
26
 
18
27
$|=1;
19
28
undef %fudged;
20
29
 
 
30
&filelock('incoming-cleaner');
21
31
for (;;) {
22
32
    if (-f 'stop') {
23
33
        print(STDERR "stop file created\n") || die $!;
42
52
    if ($id =~ m/^[RC]/) {
43
53
        print(STDOUT "[$nf] $id service ...") || die $!;
44
54
        defined($c=fork) || die $!;
45
 
        if (!$c) { exec("/usr/lib/debbugs/service",$id); die $!; }
 
55
        if (!$c) { exec("$lib_path/service",$id); die $!; }
46
56
    } elsif ($id =~ m/^[BMQFDU]/) {
47
57
        print(STDOUT "[$nf] $id process ...") || die $!;
48
58
        defined($c=fork) || die $!;
49
 
        if (!$c) { exec("/usr/lib/debbugs/process",$id); die $!; }
 
59
        if (!$c) { exec("$lib_path/process",$id); die $!; }
50
60
    } else {
51
61
        die "bad name $id";
52
62
    }
56
66
        print(STDERR "$id: process failed ($status $!) - now in [PG]$id\n") || die $!;
57
67
    }
58
68
    print(STDOUT " done\n") || die $!;
 
69
    rmtree("$gSpoolDir/mime.tmp",0,1);
59
70
    $ndone++;
60
71
}
 
72
&unfilelock;
61
73
 
62
74
exit(0);