BIND 10 #1404: some workaround for sqlite3 schema change

BIND 10 Development do-not-reply at isc.org
Mon Nov 21 17:38:43 UTC 2011


#1404: some workaround for sqlite3 schema change
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  jinmei
  jinmei                             |                Status:  reviewing
                       Type:         |             Milestone:
  defect                             |  Sprint-20111122
                   Priority:  major  |            Resolution:
                  Component:  build  |             Sensitive:  0
  system                             |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => jinmei


Comment:

 Yes I agree about getting this in before release.

 I'd love to see a more general version later btw, but for now this is
 certainly good enough, except that it currently doesn't work if there is
 no db-file present at all (a case that is highly likely and should not be
 a problem); we could catch operationalerror on the connect call, but that
 may be too general, so I suggest the following patch to simply check if
 the file exists (and if not, exit with status 0):

 {{{
 diff --git a/compatcheck/sqlite3-difftbl-check.py.in
 b/compatcheck/sqlite3-difft
 index 7a5d991..5c85e1a 100755
 --- a/compatcheck/sqlite3-difftbl-check.py.in
 +++ b/compatcheck/sqlite3-difftbl-check.py.in
 @@ -28,6 +28,11 @@ if len(args) == 0:
      parser.error('missing argument')

  db_file = args[0]
 +
 +# If the file doesn't exist, there's nothing to do
 +if not os.path.exists(db_file):
 +    sys.exit(0)
 +
  conn = sqlite3.connect(db_file)
  cur = conn.cursor()
  try:
 }}}

 oh and 'continueing' should probably be 'continuing'

-- 
Ticket URL: <http://bind10.isc.org/ticket/1404#comment:4>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list