[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#642987: Display end-of-live information in the web view. (Closes: #642987)



Hi,

updated patch attached.


cheers,
	Holger


commit da14dc2780b7f3e3a1bde8cbd526eb271497fde2
Author: Holger Levsen <holger@layer-acht.org>
Date:   Sat Sep 13 02:02:42 2014 +0200

    Display end-of-life information in the web view. (Closes: #642987)

diff --git a/bin/tracker_service.py b/bin/tracker_service.py
index 49c5746..da88700 100644
--- a/bin/tracker_service.py
+++ b/bin/tracker_service.py
@@ -63,10 +63,10 @@ class BugFilter:
         """Returns True for urgencies that should be filtered."""
         filterlow = self.params['show_medium_urgency'] and \
                     urg in ('low', 'low**', 'unimportant',
-                    'undetermined', 'not yet assigned')
+                    'undetermined', 'not yet assigned', 'end-of-life')
         filtermed = self.params['show_high_urgency'] and \
                     urg in ('medium', 'medium**', 'low', 'low**',
-                    'unimportant', 'undetermined', 'not yet assigned')
+                    'unimportant', 'undetermined', 'not yet assigned', 'end-of-life')
         filterund = not self.params['show_undetermined_urgency'] and vuln == 2
         filteruni = not self.params['show_unimportant_urgency'] \
                     and urg == 'unimportant'
@@ -423,6 +423,8 @@ data source.""")],
                     else:
                         rel = '(unstable)'
                     urgency = str(n.urgency)
+		    if urgency == 'end-of-life':
+			urgency = self.make_red('end-of-life')
                     if n.fixed_version:
                         ver = str(n.fixed_version)
                         if ver == '0':
diff --git a/lib/python/bugs.py b/lib/python/bugs.py
index 15908dc..7258be7 100644
--- a/lib/python/bugs.py
+++ b/lib/python/bugs.py
@@ -24,7 +24,7 @@ class Urgency(debian_support.PseudoEnum): pass
 
 def listUrgencies():
     urgencies = {}
-    urgs = ('high', 'medium', 'low', 'unimportant', 'not yet assigned')
+    urgs = ('high', 'medium', 'low', 'unimportant', 'end-of-life', 'not yet assigned')
     for u in range(len(urgs)):
         urgencies[urgs[u]] = Urgency(urgs[u], -u)
     Urgency.urgencies = urgencies
@@ -579,7 +579,7 @@ class FileBase(debian_support.PackageFile):
                                 comments.append(('NOTE', r))
                         elif v == 'end-of-life':
                             pkg_notes.append(PackageNoteParsed
-                                             (p, '0', 'unimportant',
+                                             (p, None, 'end-of-life',
                                               release=release))
                             if d:
                                 # Not exactly ideal, but we have to
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index 515f120..8b79ac6 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -273,7 +273,7 @@ class DB:
          release TEXT NOT NULL,
          status TEXT NOT NULL
              CHECK (status IN ('vulnerable', 'fixed', 'unknown', 'undetermined',
-                               'partially-fixed', 'todo')),
+                               'partially-fixed', 'todo', 'end-of-life')),
          reason TEXT NOT NULL,
          PRIMARY KEY (bug_name, release))""")
 
@@ -1275,7 +1275,8 @@ class DB:
                 AND n.id = vulnlist.note
                 ORDER BY vulnlist.package""")):
             if fixed_version == '0' or urgency == 'unimportant' \
-               or kind not in ('source', 'binary', 'unknown'):
+                    or urgency == 'end-of-life' \
+                    or kind not in ('source', 'binary', 'unknown'):
                 continue
 
             # Normalize FAKE-* names a bit.  The line number (which
@@ -1470,7 +1471,8 @@ class DB:
                 # packages as vulnerable.  (If unstable_fixed == '0',
                 # release-specific annotations cannot create
                 # vulnerabilities, either.)
-                if total_urgency == 'unimportant' or unstable_fixed == '0':
+                if total_urgency == 'unimportant' or unstable_fixed == '0' \
+                        or total_urgency == 'end-of-life':
                     continue
 
                 if unstable_fixed is None:

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: