[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,

this patch I like the least, but it works. Probably it would be better to use 
bug status instead of urgency, not sure. I think this is an artefact of trying 
status...

+++ b/lib/python/security_db.py
              CHECK (status IN ('vulnerable', 'fixed', 'unknown', 
'undetermined',
-                               'partially-fixed', 'todo')),
+                               'partially-fixed', 'todo', 'end-of-life')),

I left it in for now.

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

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

diff --git a/bin/tracker_service.py b/bin/tracker_service.py
index 48ad599..bb1411a 100644
--- a/bin/tracker_service.py
+++ b/bin/tracker_service.py
@@ -419,6 +419,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 4a4a2b7..06e3f11 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:

cheers,
	Holger

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


Reply to: