summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorBjoern Tropf <asymmail@googlemail.com>2009-05-29 15:26:02 +0200
committerBjoern Tropf <asymmail@googlemail.com>2009-05-29 15:26:02 +0200
commite3262f4f6d7ba01781c6c5fc39424d57132fdaf9 (patch)
tree837339a4b987a47510538611bb05c337d187752c /TODO
parentFix some small bugs (diff)
downloadkernel-check-e3262f4f6d7ba01781c6c5fc39424d57132fdaf9.tar.gz
kernel-check-e3262f4f6d7ba01781c6c5fc39424d57132fdaf9.tar.bz2
kernel-check-e3262f4f6d7ba01781c6c5fc39424d57132fdaf9.zip
Further work on file structure, remove interval.py
Diffstat (limited to 'TODO')
-rw-r--r--TODO49
1 files changed, 45 insertions, 4 deletions
diff --git a/TODO b/TODO
index a1c0e10..3515ba3 100644
--- a/TODO
+++ b/TODO
@@ -6,13 +6,10 @@ collector
- Check file integrity (?)
- Use more telling variables
- Clean up code
-- Rework interval.py
- Implement DTD
- Function documentation / manpages
-- Remove overhead from interval.py (?)
- Check imports
-- Move interval.py to kernellib.py
-- Move create_xml to kernellib.py
+- Move is_interval to kernellib.py
Intervall documentation
=======================
@@ -42,3 +39,47 @@ expand: Boolean, defines whether the entry is shadowing less specific entries of
and was fixed in 2.6.23-8. A genpatched Kernel 2.6.17 is vulnerable. In (2),
a patch fixing the vulnerability has been backported to the genpatches.
Kernels 2.6.17 and earlier are not affected.
+
+
+def is_in_interval(self, version):
+ """ Returns True if the given version is inside our specified interval, False otherwise.
+ Note: 'name' is discarded in the comparison. """
+ if version == None:
+ return True
+
+ if self.lower: # We actually have a lower boundary set
+ result = portage_versions.vercmp(version, self.lower)
+ if result == None:
+ raise BugError("Could not compare %s and %s" % (self.lower, version, str(self)))
+
+ """" We check the lower boundary. Two things will lead to False:
+ (1) The Result is "equal" and the lower boundary is not inclusive
+ aka: version = 2.6.24 on "> 2.6.24"
+ (2) The Result is "lower":
+ aka: version = 2.6.18 on ">= 2.6.24" """
+ if result == 0 and not self.lower_inclusive:
+ return False
+ if result == 0 and self.lower_inclusive:
+ return True
+ if result < 0:
+ return False
+
+ if self.upper: # We actually have an upper boundary set
+ result = portage_versions.vercmp(version, self.upper)
+ if result == None:
+ raise BugError("Could not compare %s and %s" % (self.upper, version, str(self)))
+
+ """" We check the upper boundary. Two things will lead to False:
+ (1) The Result is "equal" and the upper boundary is not inclusive
+ aka: version = 2.6.24 on "< 2.6.24"
+ (2) The Result is "lower":
+ aka: version = 2.6.24 on "<= 2.6.18" """
+ if result == 0 and not self.upper_inclusive:
+ return False
+ if result == 0 and self.upper_inclusive:
+ return True
+ if result > 0:
+ return False
+
+ # Seems we're outa luck, we fell into the vulnerable versions
+ return True