[Rpm-metadata] createrepo/__init__.py

Seth Vidal skvidal at linux.duke.edu
Tue Jan 15 15:41:34 UTC 2008


 createrepo/__init__.py |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 30c7e07f6322fe9b80512e634d492bea849080a8
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Jan 15 10:37:45 2008 -0500

    - add debug output for database time generation

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 4fc6c58..0421e1e 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -20,6 +20,7 @@ import libxml2
 import string
 import fnmatch
 import hashlib
+import time
 import rpm
 import yumbased
 from optparse import OptionContainer
@@ -388,6 +389,9 @@ class MetaDataGenerator:
             db_compressed_sums = {}
             
             if self.conf.database:
+                if self.conf.verbose:
+                    self.callback.log("Starting %s db creation: %s" % (ftype, time.ctime()))
+            
                 if ftype == 'primary':
                     rp.getPrimary(complete_path, csum)
                                 
@@ -434,7 +438,9 @@ class MetaDataGenerator:
                 unchecksum = data.newChild(None, 'open-checksum', db_csums[ftype])
                 unchecksum.newProp('type', sumtype)
                 database_version = data.newChild(None, 'database_version', dbversion)
-                
+                if self.conf.verbose:
+                    self.callback.log("Ending %s db creation: %s" % (ftype, time.ctime()))
+
                 
             data = reporoot.newChild(None, 'data', None)
             data.newProp('type', ftype)



More information about the Rpm-metadata mailing list