]> git.donarmstrong.com Git - debbugs.git/blobdiff - bin/add_bug_to_estraier
install local-debbugs and add_bug_to_estraier; add local-debbugs
[debbugs.git] / bin / add_bug_to_estraier
index 048708bc91a468454bd76960ab5ec1a179ca515b..0acfbab705018b1f29587f9159790e4b2926ff8e 100755 (executable)
@@ -81,10 +81,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 +158,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 +187,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";