add a new option (--bugs) to only show bugs that belong to a given set
add Francesco Poli to the uploaders list
---
 apt-listbugs              |   11 +++++++++--
 debian/changelog          |    8 ++++++++
 debian/control            |    1 +
 debian/copyright          |    5 +++--
 lib/apt-listbugs/logic.rb |   14 +++++++++++++-
 5 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/apt-listbugs b/apt-listbugs
index 8fcc449..3e803e8 100755
--- a/apt-listbugs
+++ b/apt-listbugs
@@ -4,6 +4,7 @@
 #
 # Copyright (C) 2002  Masato Taruishi <t...@debian.org>
 # Copyright (C) 2006-2008  Junichi Uekawa <dan...@debian.org>
+# Copyright (C) 2008  Francesco Poli <f...@firenze.linux.it>
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -40,7 +41,7 @@ the upgrade/installation is safe.
 
 == USAGE
 
-apt-listbugs [-h] [-s <severities>] [-S <stats>] [-D] [-H <hostname>] [-p 
<port>] <command> [arguments]
+apt-listbugs [-h] [-s <severities>] [-S <stats>] [-B <bugs>] [-D] [-H 
<hostname>] [-p <port>] <command> [arguments]
 
 == OPTIONS
 
@@ -67,6 +68,10 @@ apt-listbugs [-h] [-s <severities>] [-S <stats>] [-D] [-H 
<hostname>] [-p <port>
 
   Note that 'pending' does not mean 'tagged pending', but 'still open, pending 
to be fixed'.
 
+* -B <bugs> | --bugs <bugs>
+
+  Bug numbers you want to see separated by comma (e.g. 123456,567890,135792).  
All other bugs will be ignored.
+
 * -D | --show-downgrade
 
   Shows bugs of downgraded packages. (apt mode only)
@@ -203,7 +208,8 @@ don't actually apply to the version. You need to review the 
bug.
 apt-listbugs was originally written by Masato Taruishi
 <t...@debian.org>, and rewritten by Junichi Uekawa
 <dan...@debian.org> in 2006 to handle BTS Versioning features and the
-SOAP interface.
+SOAP interface. The --bugs option was added by Francesco Poli
+<f...@firenze.linux.it> in 2008.
 
 Latest source-code is available from
 http://git.debian.org/?p=apt-listbugs/apt-listbugs.git
@@ -332,6 +338,7 @@ rescue
 end
 
 Factory::BugsFactory.delete_ignore_bugs(bugs) if config.command == "apt"
+Factory::BugsFactory.delete_uninteresting_bugs(bugs) if config.fbugs
 Factory::BugsFactory.delete_unwanted_tag_bugs(bugs) if config.tag
 begin
   Factory::BugsFactory.delete_irrelevant_bugs(bugs, cur_pkgs, new_pkgs) { 
|msg, val|
diff --git a/debian/changelog b/debian/changelog
index 0b81519..a94992a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+apt-listbugs (0.0.95) unstable; urgency=low
+
+  * fix "please implement a command to query the BTS about a given bug in
+    given package/version" (Closes: #476988)
+  * added Francesco Poli to the uploaders list
+
+ -- Francesco Poli (t1000) <f...@firenze.linux.it>  Thu, 11 Dec 2008 23:58:31 
+0100
+
 apt-listbugs (0.0.94) unstable; urgency=low
 
   * remove a trace of -R option which used to be 'release-critical' which
diff --git a/debian/control b/debian/control
index c3fd35e..44e7c9f 100644
--- a/debian/control
+++ b/debian/control
@@ -2,6 +2,7 @@ Source: apt-listbugs
 Section: admin
 Priority: optional
 Maintainer: Junichi Uekawa <dan...@debian.org>
+Uploaders: Francesco Poli (t1000) <f...@firenze.linux.it>
 Build-Depends: debhelper (>> 5.0.0), cdbs, time
 Build-Depends-Indep: ruby1.8, rdtool, gettext
 Standards-Version: 3.7.2
diff --git a/debian/copyright b/debian/copyright
index 8d9a9d5..e9d68e5 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,8 +4,9 @@ The original source can always be found at:
        http://ftp.debian.org/debian/pool/main/a/apt-listbugs/
        http://git.debian.org/?p=apt-listbugs/apt-listbugs.git
 
-Copyright (C) 2002  Masato Taruishi
-Copyright (C) 2006  Junichi Uekawa
+Copyright (C) 2002  Masato Taruishi <t...@debian.org>
+Copyright (C) 2006-2008  Junichi Uekawa <dan...@debian.org>
+Copyright (C) 2008  Francesco Poli <f...@firenze.linux.it>
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 1982a1e..d86e833 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -2,6 +2,7 @@
 #
 # Copyright (C) 2002  Masato Taruishi <t...@debian.org>
 # Copyright (C) 2006-2008  Junichi Uekawa <dan...@debian.org>
+# Copyright (C) 2008  Francesco Poli <f...@firenze.linux.it>
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -44,6 +45,7 @@ class AppConfig
       sprintf(_(" -s <severities>  : Severities you want to see [%s], or 
[all].\n"), @severity.join(',')),
       _(" -T <tags>        : Tags you want to see.\n"),
       sprintf(_(" -S <stats>       : Stats you want to see [%s].\n"), 
@stats.join(',')),
+      _(" -B <bugs>        : Bugs you want to see.\n"),
       _(" -D               : Show downgraded packages, too.\n"),
       sprintf(_(" -H <hostname>    : Hostname of Debian Bug Tracking System 
[%s].\n"), @hostname),
       sprintf(_(" -p <port>        : Port number of the server [%s]\n"), 
@port),
@@ -70,6 +72,7 @@ class AppConfig
                 ["done", _("marked as done in some version")],
                 ["pending", _("unfixed")],
                 ["pending-fixed", _("tagged as pending a fix")]]
+    @fbugs = nil
     @show_downgrade = false
     @hostname = "bugs.debian.org"
     @port = 80
@@ -92,7 +95,7 @@ class AppConfig
   end
 
   attr_accessor :severity, :stats, :quiet, :title
-  attr_accessor :show_downgrade, :hostname, :tag
+  attr_accessor :show_downgrade, :hostname, :tag, :fbugs
   attr_accessor :frontend, :pin_priority, :yes
   attr_reader :command, :parser, :querybts, :ignore_bugs, :system_ignore_bugs, 
:browser
 
@@ -103,6 +106,7 @@ class AppConfig
                           ['--version', '-v', GetoptLong::NO_ARGUMENT],
                           ['--tag', '-T', GetoptLong::REQUIRED_ARGUMENT],
                           ['--stats', '-S', GetoptLong::REQUIRED_ARGUMENT],
+                          ['--bugs', '-B', GetoptLong::REQUIRED_ARGUMENT],
                           ['--show-downgrade', '-D', GetoptLong::NO_ARGUMENT],
                           ['--hostname', '-H', GetoptLong::REQUIRED_ARGUMENT],
                           ['--port', '-p', GetoptLong::REQUIRED_ARGUMENT],
@@ -135,6 +139,8 @@ class AppConfig
          @tag = optargs.split(',')
        when '--stats'
          @stats = optargs.split(',')
+       when '--bugs'
+         @fbugs = optargs.split(',')
        when '--show-downgrade'
          @show_downgrade = true
        when '--hostname'
@@ -892,6 +898,11 @@ module Factory
       bugs.delete_if { |bug| 
config.system_ignore_bugs.include?(bug.bug_number)}
     end
 
+    def delete_uninteresting_bugs(bugs)
+      # ignoring all bugs but the requested ones
+      bugs.delete_if { |bug| !config.fbugs.include?(bug.bug_number)}
+    end
+
     def iterate_fixed_found_version(space_delimited_bts_version, pkg_name)
       # iterate relevant versions, used to parsing Fixed and Found tags of BTS
       if space_delimited_bts_version.nil?
@@ -1099,6 +1110,7 @@ module Factory
     end
     
     module_function :create, :delete_ignore_bugs,
+    :delete_uninteresting_bugs,
     :bug_is_irrelevant,
     :am_i_buggy,
     :delete_irrelevant_bugs, :delete_unwanted_tag_bugs, 
-- 
1.5.6.5




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to