createrepo/__init__.py

[email protected] (Seth Vidal)
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/__init__.py |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 30c7e07f6322fe9b80512e634d492bea849080a8
Author: Seth Vidal <[email protected]>
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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.