Package: apt-listbugs
Version: 0.1.18
Severity: wishlist
Tags: patch

--- Please enter the report below this line. ---

Please find attached a small patch for apt-listbugs, which causes it to
print links to bugs.debian.org when listing bugs.

--- System information. ---
Architecture: amd64
Kernel:       Linux 4.6.0-1-amd64

Debian Release: stretch/sid
  990 unstable        ftp.us.debian.org   990 sid
linux.dropbox.com   500 stable          dl.google.com
--- Package information. ---
Depends                (Version) | Installed
================================-+-============
ruby                             | 1:2.3.0+4
 OR ruby-interpreter             | ruby-debian           (>= 0.3.3) |
0.3.9+b6
apt                  (>= 0.9.11) | 1.3~rc4
ruby-gettext          (>= 3.0.2) | 3.2.2-1
ruby-xmlparser                   | 0.7.3-3
ruby-soap4r                      | 2.0.5-3
ruby-unicode                     | 0.4.4-2+b7


Recommends               (Version) | Installed
==================================-+-===============
ruby-httpclient     (>= 2.1.5.2-1) |

Suggests         (Version) | Installed
==========================-+-===========
reportbug                  | 6.6.6
debianutils      (>= 2.0)  | 4.8
 OR www-browser            |  OR w3m                    | 0.5.3-29
>From f02150ae042eea42f610f34c55dde8481535ccb1 Mon Sep 17 00:00:00 2001
From: Keshav Kini <[email protected]>
Date: Mon, 5 Sep 2016 14:25:58 -0500
Subject: [PATCH] Display Debian BTS URLs when listing bugs
To: foo <[email protected]>

This commit dumps the URL for the bug on bugs.debian.org alongside the
bug ID when reporting bugs for a package.  This allows a user to easily
find more information about the bug if the summary/title alone is
insufficient.
---
 lib/aptlistbugs/logic.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/aptlistbugs/logic.rb b/lib/aptlistbugs/logic.rb
index 7a416d4..4dfb67d 100644
--- a/lib/aptlistbugs/logic.rb
+++ b/lib/aptlistbugs/logic.rb
@@ -689,7 +689,8 @@ class Viewer
                 bug.id = @bugmap.length.next
                 @bugmap[bug.id.to_s] = bug.bug_number
               end
-              bug_str = " b#{bug.id} - ##{bug.bug_number} - #{bug.desc}"
+              bug_link = "http://bugs.debian.org/#{bug.bug_number}";
+              bug_str = " b#{bug.id} - ##{bug.bug_number} [ #{bug_link} ] - #{bug.desc}"
               # TRANSLATORS: "Found" refers to one singular bug
               bug_str += sprintf(_(" (Found: %s)"), "#{bug.found}") if ( ! bug.found.nil? ) && $DEBUG
               # TRANSLATORS: "Fixed" refers to one singular bug
-- 
2.9.3

Reply via email to