diff options
author | Bjoern Tropf <asymmail@googlemail.com> | 2009-06-06 11:18:28 +0200 |
---|---|---|
committer | Bjoern Tropf <asymmail@googlemail.com> | 2009-06-06 11:18:28 +0200 |
commit | f00eabed8da80563b168f6bfe598018b3e89ee8e (patch) | |
tree | 7eba594b60c47576ea1a23a77c3595bc9dec5993 /TODO | |
parent | Small changes (diff) | |
download | kernel-check-f00eabed8da80563b168f6bfe598018b3e89ee8e.tar.gz kernel-check-f00eabed8da80563b168f6bfe598018b3e89ee8e.tar.bz2 kernel-check-f00eabed8da80563b168f6bfe598018b3e89ee8e.zip |
Move is_in_interval() to kernellib.py; Use dict for genpatches
Diffstat (limited to 'TODO')
-rw-r--r-- | TODO | 49 |
1 files changed, 2 insertions, 47 deletions
@@ -1,15 +1,13 @@ Todo ==== - Fix all TODO markers -- Move is_in_interval to kernellib.py -- Use dict instead of list for genpatches - Create a vulnerability class Clean code ========== - Add more logging messages - Use more telling variables -- Rework Descriptions +- Rework Descriptions - Remove unused code/find better ways Documentation @@ -19,7 +17,7 @@ Documentation Future ====== -- Implement webserver for kernel-check +- Implement a webserver for kernel-check Intervall documentation @@ -51,46 +49,3 @@ expand: Boolean, defines whether the entry is shadowing less specific entries of 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 |