15 Jul 2011 23:53
[PATCH] switch --update to use the sqlite dbs instead of the xml files. Should massively impact memory footprint and hopefully only marginally impact performance.
Seth Vidal <skvidal <at> fedoraproject.org>
2011-07-15 21:53:43 GMT
2011-07-15 21:53:43 GMT
---
createrepo/__init__.py | 40 ++------
createrepo/readMetadata.py | 240 +++++++++++++------------------------------
2 files changed, 83 insertions(+), 197 deletions(-)
diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 44035cc..8549188 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
<at> <at> -530,39 +530,19 <at> <at> class MetaDataGenerator:
old_pkg = pkg
if pkg.find("://") != -1:
old_pkg = os.path.basename(pkg)
- nodes = self.oldData.getNodes(old_pkg)
- if nodes is not None: # we have a match in the old metadata
+ old_po = self.oldData.getNodes(old_pkg)
+ if old_po: # we have a match in the old metadata
if self.conf.verbose:
self.callback.log(_("Using data from old metadata for %s")
% pkg)
- (primarynode, filenode, othernode) = nodes
-
- for node, outfile in ((primarynode, self.primaryfile),
- (filenode, self.flfile),
- (othernode, self.otherfile)):
- if node is None:
- break
-
- if self.conf.baseurl:
- anode = node.children
(Continue reading)
RSS Feed