Rename .db to .summary: it's a better name and isn't so hard to grep for.
The file format used to store the status of a bug (package, severity, etc.)
has changed; it is now in an RFC822-like format in order to be more
-extensible, and is written to .db files rather than the old .status files.
-Before accepting any mail with the new version of debbugs, you must run the
-'debbugs-upgradestatus' program over your bug spool. The old .status files
-will be left intact, and will continue to be written in sync with the .db
-files for compatibility with external tools.
+extensible, and is written to .summary files rather than the old .status
+files. Before accepting any mail with the new version of debbugs, you must
+run the 'debbugs-upgradestatus' program over your bug spool. The old .status
+files will be left intact, and will continue to be written in sync with the
+.summary files for compatibility with external tools.
From 2.4 to 2.4.1
-----------------
my %status;
- my $location = getbuglocation( $bugnum, 'db' );
+ my $location = getbuglocation( $bugnum, 'summary' );
return {} if ( !$location );
%status = %{ readbug( $bugnum, $location ) };
acknowledgements.
- Document how to deliver mail to debbugs via procmail and SpamAssassin.
- Implement new .status format that's extensible and easier to read; it
- now lives in .db rather than .status. Use debbugs-upgradestatus to
- convert existing bug databases.
+ now lives in .summary rather than .status. Use debbugs-upgradestatus
+ to convert existing bug databases.
-- Colin Watson <cjwatson@debian.org> Fri, 20 Jun 2003 18:57:25 +0100
debbugs-upgradestatus converts a debbugs database in-place to use version 2
of the bug status file format. Version 1 metadata files were stored in
-.status files; version 2 metadata files are written to .db files.
+.status files; version 2 metadata files are written to .summary files.
EOF
exit 0;
unlockwritebug($ref, $data, $archive, 2, 'disable bughook');
}
- # Test new .db file
+ # Test new .summary file
my $newdata = readbug($ref, $archive);
my %jointkeys = map { $_ => 1 } (keys %$data), (keys %$newdata);
for my $key (keys %jointkeys) {
unless (exists $data->{$key}) {
- die "BUG: $ref: key '$key' in .db but not .status!\n";
+ die "BUG: $ref: key '$key' in .summary but not .status!\n";
}
unless (exists $newdata->{$key}) {
- die "BUG: $ref: key '$key' in .status but not .db!\n";
+ die "BUG: $ref: key '$key' in .status but not .summary!\n";
}
if ($data->{$key} ne $newdata->{$key}) {
- die "BUG: $ref: key '$key' different in .status and .db:\n" .
+ die "BUG: $ref: key '$key' different in " .
+ ".status and .summary\n" .
" .status has '$data->{$key}';\n" .
- " .db has '$newdata->{$key}'!\n";
+ " .summary has '$newdata->{$key}'!\n";
}
}
# -*- perl -*-
-# $Id: errorlib.in,v 1.37 2003/08/23 13:50:45 cjwatson Exp $
+# $Id: errorlib.in,v 1.38 2003/08/23 15:12:57 cjwatson Exp $
use Mail::Address;
sub readbug {
my ($lref, $location) = @_;
- my $status = getbugcomponent($lref, 'db', $location);
+ my $status = getbugcomponent($lref, 'summary', $location);
return undef unless defined $status;
if (!open(S,$status)) { return undef; }
my ($ref, $data, $location, $minversion, $disablebughook) = @_;
my $change;
- my %outputs = (1 => 'status', 2 => 'db');
+ my %outputs = (1 => 'status', 2 => 'summary');
for my $version (keys %outputs) {
next if defined $minversion and $version < $minversion;
my $status = getbugcomponent($ref, $outputs{$version}, $location);
#!/usr/bin/perl
-# $Id: expire.in,v 1.18 2003/08/22 01:41:54 cjwatson Exp $
+# $Id: expire.in,v 1.19 2003/08/23 15:12:57 cjwatson Exp $
# Load modules and set envirnment
use File::Copy;
close(DIR);
foreach my $dir (@dirs) {
opendir(DIR,$dir);
- push @list, sort { $a <=> $b } grep(s/\.db$//,grep(m/^\d+\.db$/,readdir(DIR)));
+ push @list, sort { $a <=> $b } grep(s/\.summary$//,grep(m/^\d+\.summary$/,readdir(DIR)));
close(DIR);
}
`mkdir -p "archive/$dir"`;
link( "db-h/$dir/$mref.log", "archive/$dir/$mref.log" ) || copy( "db-h/$dir/$mref.log", "archive/$dir/$mref.log" );
link( "db-h/$dir/$mref.status", "archive/$dir/$mref.status" ) || copy( "db-h/$dir/$mref.status", "archive/$dir/$mref.status" );
- link( "db-h/$dir/$mref.db", "archive/$dir/$mref.db" ) || copy( "db-h/$dir/$mref.db", "archive/$dir/$mref.db" );
+ link( "db-h/$dir/$mref.summary", "archive/$dir/$mref.summary" ) || copy( "db-h/$dir/$mref.summary", "archive/$dir/$mref.summary" );
link( "db-h/$dir/$mref.report", "archive/$dir/$mref.report" ) || copy( "db-h/$dir/$mref.report", "archive/$dir/$mref.report" );
print("archived $mref to archive/$dir (from $ref)\n") || &quit("output old: $!");
}
- unlink("db-h/$dir/$mref.log", "db-h/$dir/$mref.status", "db-h/$dir/$mref.db", "db-h/$dir/$mref.report");
+ unlink("db-h/$dir/$mref.log", "db-h/$dir/$mref.status", "db-h/$dir/$mref.summary", "db-h/$dir/$mref.report");
print("deleted $mref (from $ref)\n") || &quit("output old: $!");
bughook_archive($mref);
}
#!/usr/bin/perl -w
-# $Id: rebuild.in,v 1.12 2003/08/22 01:41:54 cjwatson Exp $
+# $Id: rebuild.in,v 1.13 2003/08/23 15:12:57 cjwatson Exp $
# Load modules and set environment
use File::Copy;
{
my $path = sprintf( "$archive/%.2d", $subdir );
opendir(DIR,$path) || next;
- my @list= grep(m/^\d+\.db$/,readdir(DIR));
+ my @list= grep(m/^\d+\.summary$/,readdir(DIR));
closedir DIR;
- grep(s/\.db$//,@list);
+ grep(s/\.summary$//,@list);
push @files, @list;
}
#!/usr/bin/perl
-# $Id: service.in,v 1.88 2003/08/23 13:50:45 cjwatson Exp $
+# $Id: service.in,v 1.89 2003/08/23 15:12:57 cjwatson Exp $
#
# Usage: service <code>.nn
# Temps: incoming/P<code>.nn
my $hash = get_hashname($ref);
copy("db-h/$ohash/$origref.log", "db-h/$hash/$ref.log");
copy("db-h/$ohash/$origref.status", "db-h/$hash/$ref.status");
- copy("db-h/$ohash/$origref.db", "db-h/$hash/$ref.db");
+ copy("db-h/$ohash/$origref.summary", "db-h/$hash/$ref.summary");
copy("db-h/$ohash/$origref.report", "db-h/$hash/$ref.report");
&bughook('new', $ref, $data);
#!/usr/bin/perl
-# $Id: summary.in,v 1.9 2003/08/22 01:41:54 cjwatson Exp $
+# $Id: summary.in,v 1.10 2003/08/23 15:12:57 cjwatson Exp $
$config_path = '/etc/debbugs';
$lib_path = '/usr/lib/debbugs';
closedir(DIR);
foreach my $dir (@dirs) {
opendir(DIR,$dir);
- push @list, sort { $a <=> $b } grep(s/\.db$//,grep(m/^\d+\.db$/,readdir(DIR)));
+ push @list, sort { $a <=> $b } grep(s/\.summary$//,grep(m/^\d+\.summary$/,readdir(DIR)));
closedir(DIR);
}