From 0ab492195fb9290cf7f1981c640841e9fb68dd56 Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Sat, 23 Aug 2003 14:12:57 -0800 Subject: [PATCH] [project @ 2003-08-23 15:12:57 by cjwatson] Rename .db to .summary: it's a better name and isn't so hard to grep for. --- UPGRADE | 10 +++++----- cgi/common.pl | 2 +- debian/changelog | 4 ++-- migrate/debbugs-upgradestatus | 13 +++++++------ scripts/errorlib.in | 6 +++--- scripts/expire.in | 8 ++++---- scripts/rebuild.in | 6 +++--- scripts/service.in | 4 ++-- scripts/summary.in | 4 ++-- 9 files changed, 29 insertions(+), 28 deletions(-) diff --git a/UPGRADE b/UPGRADE index ad669c2..abea960 100644 --- a/UPGRADE +++ b/UPGRADE @@ -7,11 +7,11 @@ From 2.4.1 to 2.4.2 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 ----------------- diff --git a/cgi/common.pl b/cgi/common.pl index 7064600..be4421a 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -661,7 +661,7 @@ sub getbugstatus { my %status; - my $location = getbuglocation( $bugnum, 'db' ); + my $location = getbuglocation( $bugnum, 'summary' ); return {} if ( !$location ); %status = %{ readbug( $bugnum, $location ) }; diff --git a/debian/changelog b/debian/changelog index f1f3395..5d8a4f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,8 +11,8 @@ debbugs (2.4.2) UNRELEASED; urgency=low 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 Fri, 20 Jun 2003 18:57:25 +0100 diff --git a/migrate/debbugs-upgradestatus b/migrate/debbugs-upgradestatus index 333e22a..b5a3189 100755 --- a/migrate/debbugs-upgradestatus +++ b/migrate/debbugs-upgradestatus @@ -16,7 +16,7 @@ Usage: $0 db-h|archive (relative to $gSpoolDir) 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; @@ -87,20 +87,21 @@ for my $ref (@files) { 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"; } } diff --git a/scripts/errorlib.in b/scripts/errorlib.in index fbe9fc3..c8052c5 100755 --- a/scripts/errorlib.in +++ b/scripts/errorlib.in @@ -1,5 +1,5 @@ # -*- 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; @@ -87,7 +87,7 @@ my %fields = (originator => 'submitter', 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; } @@ -167,7 +167,7 @@ sub writebug { 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); diff --git a/scripts/expire.in b/scripts/expire.in index 83c7952..0b29fe5 100755 --- a/scripts/expire.in +++ b/scripts/expire.in @@ -1,5 +1,5 @@ #!/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; @@ -26,7 +26,7 @@ opendir(DIR,"db-h") || &quit("opendir db: $!\n"); 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); } @@ -74,11 +74,11 @@ while (length($ref=shift(@list))) { `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); } diff --git a/scripts/rebuild.in b/scripts/rebuild.in index 5d6ed7f..6c98f25 100755 --- a/scripts/rebuild.in +++ b/scripts/rebuild.in @@ -1,5 +1,5 @@ #!/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; @@ -29,9 +29,9 @@ for ($subdir=0; $subdir<100; $subdir++ ) { 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; } diff --git a/scripts/service.in b/scripts/service.in index a24a697..e070828 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -1,5 +1,5 @@ #!/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 .nn # Temps: incoming/P.nn @@ -604,7 +604,7 @@ END 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); diff --git a/scripts/summary.in b/scripts/summary.in index 185f751..e3be347 100755 --- a/scripts/summary.in +++ b/scripts/summary.in @@ -1,5 +1,5 @@ #!/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'; @@ -39,7 +39,7 @@ opendir(DIR,"db-h") || &quit("opendir db-h: $!\n"); 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); } -- 2.39.2