X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fadd_bug_to_estraier;h=a83699abc61af0016711e3db00c7113d52988247;hb=4ad8475827b40cc70b38e68a568ca5635096a860;hp=048708bc91a468454bd76960ab5ec1a179ca515b;hpb=c88923e000a7036276237537c0e0c3fbd21f8a4b;p=debbugs.git diff --git a/bin/add_bug_to_estraier b/bin/add_bug_to_estraier index 048708b..a83699a 100755 --- a/bin/add_bug_to_estraier +++ b/bin/add_bug_to_estraier @@ -16,13 +16,20 @@ use Pod::Usage; =head1 NAME -add_bug_to_estraier +add_bug_to_estraier -- add a bug log to an estraier database =head1 SYNOPSIS add_bug_to_estraier [options] < list_of_bugs_to_add Options: + --url, -u url to estraier node + --user, -U user to log into the estraier node + --pass, -P password for the estraier node + --spool, -s spool location + --conf, -c addbug configuration file + --cron add all bugs to estraier + --timestamp bug timestamp file --debug, -d debugging level (Default 0) --help, -h display this help --man, -m display manual @@ -81,10 +88,17 @@ Display this manual. test_bts --bug 7 --host donbugs.donarmstrong.com +=head1 DATABASE CREATION + +estcmd create -si -xh3 -attr status str -attr subject str \ + -attr date num -attr submitter str -attr package str \ + -attr severity str -attr tags str bts + =cut +use Debbugs::Config qw(:globals); use Debbugs::Mail qw(send_mail_message); use Debbugs::MIME qw(create_mime_message); @@ -151,7 +165,7 @@ my $node = new Search::Estraier::Node (url => $options{url}, user => $options{user}, passwd => $options{passwd}, ); -$Debbugs::Config::gSpoolDir = $options{spool} if defined $options{spool}; +$gSpoolDir = $options{spool} if defined $options{spool}; if ($options{cron}) { my %timestamps; @@ -180,8 +194,9 @@ if ($options{cron}) { ($timestamps{$File::Find::dir} > $stat->mtime); $seen_dirs{$File::Find::dir} = $start_time; print STDERR "Adding $bug_num\n" if $DEBUG; + my $max_message = 0; eval{ - add_bug_log($node,$bug_num); + $max_message = add_bug_log($node,$bug_num); }; if ($@) { print STDERR "Adding $bug_num failed with $@\n";