Discussion:
createrepo/__init__.py createrepo/readMetadata.py
z***@osuosl.org
2014-01-17 10:51:25 UTC
Permalink
createrepo/__init__.py | 1 +
createrepo/readMetadata.py | 2 ++
2 files changed, 3 insertions(+)

New commits:
commit c1ab238dd25189be49c71c4019cc491eab909663
Author: Zdenek Pavlas <***@redhat.com>
Date: Fri Jan 17 11:50:58 2014 +0100

createrepo --update: ignore cached rpm when checksum_type does not match. BZ 1054682

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index edb1f91..b1875f6 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -366,6 +366,7 @@ class MetaDataGenerator:
#build the paths
opts = {
'verbose' : self.conf.verbose,
+ 'sumtype' : self.conf.sumtype,
'pkgdir' : os.path.normpath(self.package_dir)
}

diff --git a/createrepo/readMetadata.py b/createrepo/readMetadata.py
index 54863cb..30781da 100644
--- a/createrepo/readMetadata.py
+++ b/createrepo/readMetadata.py
@@ -67,6 +67,8 @@ class MetadataIndex(object):
print _("Scanning old repo data")
self._repo.sack.populate(self._repo, 'all', None, False)
for thispo in self._repo.sack:
+ if thispo.checksum_type != self.opts['sumtype']:
+ continue
mtime = thispo.filetime
size = thispo.size
relpath = thispo.relativepath

Loading...