summaryrefslogtreecommitdiffstats
path: root/createprestorepo/dumpMetadata.py
diff options
context:
space:
mode:
authorJonathan Dieter <jdieter@gmail.com>2007-05-07 21:19:56 +0300
committerJonathan Dieter <jdieter@gmail.com>2007-05-07 21:19:56 +0300
commitd60f28d66709c0c7fed26d19b1b7fb2c55439507 (patch)
tree338bdb4ed55b2290dd9577f2987d882a605c2505 /createprestorepo/dumpMetadata.py
parentc69bc9af8f3459610e810970c6222aee643e5594 (diff)
downloadpresto-d60f28d66709c0c7fed26d19b1b7fb2c55439507.zip
presto-d60f28d66709c0c7fed26d19b1b7fb2c55439507.tar.gz
presto-d60f28d66709c0c7fed26d19b1b7fb2c55439507.tar.xz
First release of createprestorepo, prunerepo and prunedrpms
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Diffstat (limited to 'createprestorepo/dumpMetadata.py')
-rw-r--r--[-rwxr-xr-x]createprestorepo/dumpMetadata.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/createprestorepo/dumpMetadata.py b/createprestorepo/dumpMetadata.py
index 5ad9cf5..6969400 100755..100644
--- a/createprestorepo/dumpMetadata.py
+++ b/createprestorepo/dumpMetadata.py
@@ -215,7 +215,7 @@ class RpmMetaData:
mode_cache = {}
- def __init__(self, ts, basedir, filename, options):
+ def __init__(self, ts, basedir, filename, options, is_drpm):
try:
stats = os.stat(os.path.join(basedir, filename))
self.size = stats[6]
@@ -233,8 +233,11 @@ class RpmMetaData:
self.pkgid = self.doChecksumCache(fo)
fo.seek(0)
(self.rangestart, self.rangeend) = byteranges(fo)
- fo.seek(self.rangeend)
- self._getOldInfo(fo)
+ self.is_drpm = False
+ if is_drpm:
+ fo.seek(self.rangeend)
+ self._getOldInfo(fo)
+ self.is_drpm = True
del fo
del fd