On Tue, 2007-05-15 at 13:27 -0400, James Bowes wrote:
> Jeremy Katz wrote:
> >      if cmds['database']:
> > -        dbversion = '9'
> > +        if sqlitecachec.hasattr(DBVERSION):
> > +            dbversion = str(sqlitecachec.DBVERSION)
> > +        else:
> > +            dbversion = '9'
> >          rp = sqlitecachec.RepodataParserSqlite(repopath, repoid, None)
> >  
> >      for (file, ftype) in workfiles:
[snip]
> Do we have to do this check here? IOW, do we expect new createrepo to be
> used with old y-m-p?

There's no reason createrepo has to be used with new y-m-p.  Granted,
it's better if it is.  Of course, you missed the bug in this patch that
I found testing it ;-)  New version of this patch attached.  And tested
with new createrepo + old y-m-p as well as new createrepo + new y-m-p

> One other point: when we open the db, how about we check the version? A
> Errors.DbVersionMismatchError or whatever would be better than a
> traceback because of a missing column, eh?

We _do_ check the dbversion.  The problem is that the dbversion in
repomd.xml is 9 which matches what yum expects.  But the actual db is
version 10.  

Jeremy
--- createrepo-0.4.8/dumpMetadata.py.dbver	2007-05-15 12:13:48.000000000 -0400
+++ createrepo-0.4.8/dumpMetadata.py	2007-05-15 13:07:20.000000000 -0400
@@ -769,7 +769,10 @@
     repopath = os.path.join(cmds['outputdir'], cmds['tempdir'])
     
     if cmds['database']:
-        dbversion = '9'
+        try:
+            dbversion = str(sqlitecachec.DBVERSION)
+        except AttributeError:
+            dbversion = '9'
         rp = sqlitecachec.RepodataParserSqlite(repopath, repoid, None)
 
     for (file, ftype) in workfiles:
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to