summaryrefslogtreecommitdiff
path: root/tic/utils/rpmmisc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tic/utils/rpmmisc.py')
-rw-r--r--tic/utils/rpmmisc.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tic/utils/rpmmisc.py b/tic/utils/rpmmisc.py
index 70c390c..6c8a46c 100644
--- a/tic/utils/rpmmisc.py
+++ b/tic/utils/rpmmisc.py
@@ -53,11 +53,13 @@ def compare_req_cap_ver(req, cap):
epoch = cap.get('epoch')
ver = cap.get('ver')
rel = cap.get('rel')
- if not req.get('epoch'): epoch = None
- if not req.get('rel'): rel = None
+ if not req.get('epoch'):
+ epoch = None
+ if not req.get('rel'):
+ rel = None
return rpm.labelCompare((req.get('epoch'), req.get('ver'), req.get('rel')), (epoch, ver, rel))
-def meetRequireVersion(req_ver, cmp_ver):
+def meet_require_version(req_ver, cmp_ver):
cmp_ret = compare_req_cap_ver(req_ver, cmp_ver)
if cmp_ret == 0 and (req_ver['flags'] in ['EQ', 'GE', 'LE']):
return True
@@ -67,7 +69,7 @@ def meetRequireVersion(req_ver, cmp_ver):
return True
return False
-def readRpmHeader(ts, filename):
+def read_rpm_header(ts, filename):
""" Read an rpm header. """
fd = os.open(filename, os.O_RDONLY)
h = ts.hdrFromFdno(fd)