OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-registry                 Date:   14-Jul-2006 16:36:08
  Branch: HEAD                             Handle: 2006071415360800

  Modified files:
    openpkg-registry        registry-db.pl

  Log:
    properly detect SQLite errors, avoiding infinte loop

  Summary:
    Revision    Changes     Path
    1.30        +7  -7      openpkg-registry/registry-db.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-registry/registry-db.pl
  ============================================================================
  $ cvs diff -u -r1.29 -r1.30 registry-db.pl
  --- openpkg-registry/registry-db.pl   13 Jul 2006 08:11:33 -0000      1.29
  +++ openpkg-registry/registry-db.pl   14 Jul 2006 14:36:08 -0000      1.30
  @@ -215,16 +215,16 @@
        # SQLite transactions seem to factor out CREATE TABLEs
           $sql = &schemasession1();
           $rv = $dbh->do($sql);
  -        print "[schema.1]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
($dbh->errstr =~ m|ERROR|);
  +        print "[schema.1]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
(not defined $rv);
           $sql = &schemasession2();
           $rv = $dbh->do($sql);
  -        print "[schema.2]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
($dbh->errstr =~ m|ERROR|);
  +        print "[schema.2]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
(not defined $rv);
           $sql = &schemasession3();
           $rv = $dbh->do($sql);
  -        print "[schema.3]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
($dbh->errstr =~ m|ERROR|);
  +        print "[schema.3]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
(not defined $rv);
           $sql = "INSERT INTO config VALUES ( 'version', '".$progvers."' );";
           $rv = $dbh->do($sql);
  -        print "[schema.v]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
($dbh->errstr =~ m|ERROR|);
  +        print "[schema.v]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
(not defined $rv);
           return 1;
       }
   
  @@ -235,10 +235,10 @@
              and $dbv->{version}->{patch} <  24 ) {
           $sql = &schemasession3();
           $rv = $dbh->do($sql);
  -        print "[schema.3]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
($dbh->errstr =~ m|ERROR|);
  +        print "[schema.3]\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
(not defined $rv);
           $sql = sprintf("UPDATE config SET value = '0.0.24';");
           $rv = $dbh->do($sql);
  -        print "$sql\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
($dbh->errstr =~ m|ERROR|);
  +        print "$sql\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if (not 
defined $rv);
           return 1;
       }
   
  @@ -248,7 +248,7 @@
              and $dbv->{version}->{minor} <  5  ) {
           $sql = sprintf("UPDATE config SET value = '0.5.0';");
           $rv = $dbh->do($sql);
  -        print "$sql\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if 
($dbh->errstr =~ m|ERROR|);
  +        print "$sql\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if (not 
defined $rv);
           return 1;
       }
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to