[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. debian/0.1.1-3-g87f97c6
Ryan Niebur
ryanryan52 at gmail.com
Sun Nov 1 10:31:38 UTC 2009
The following commit has been merged in the master branch:
commit 87f97c65c8f7964cac0ab7fd7f1a370dbae569f2
Author: Ryan Niebur <ryanryan52 at gmail.com>
Date: Sun Nov 1 02:31:33 2009 -0800
allow setting AptListbugs::IgnoreRegexp in apt.conf to ignore bugs with titles matching a regexp when in apt mode (Closes: #553346)
diff --git a/apt-listbugs b/apt-listbugs
index 0bb50d5..cb74bdb 100755
--- a/apt-listbugs
+++ b/apt-listbugs
@@ -164,7 +164,12 @@ apt-listbugs understands APT configuration file (see apt.conf). The notable conf
HTTP Proxy setting, overrides the default HTTP Proxy setting. Useful
for setting HTTP proxy for apt-listbugs.
+* AptListbugs::IgnoreRegexp
+ Bugs to ignore when in apt mode. I would suggest setting this to
+ "FTBFS" since those bugs tend to not affect the user, but this
+ defaults to nothing. This will be evaluated using ruby regular
+ expressions.
== OUTPUT EXAMPLE
@@ -342,6 +347,7 @@ rescue
end
Factory::BugsFactory.delete_ignore_bugs(bugs) if config.command == "apt"
+Factory::BugsFactory.delete_regexp_bugs(bugs, config.ignore_regexp) if config.command == "apt" and config.ignore_regexp
Factory::BugsFactory.delete_uninteresting_bugs(bugs) if config.fbugs
Factory::BugsFactory.delete_unwanted_tag_bugs(bugs) if config.tag
begin
diff --git a/debian/changelog b/debian/changelog
index 26c322b..99d202d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+apt-listbugs (0.1.2) UNRELEASED; urgency=low
+
+ * allow setting AptListbugs::IgnoreRegexp in apt.conf to ignore bugs
+ with titles matching a regexp when in apt mode (Closes: #553346)
+
+ -- Ryan Niebur <ryan at debian.org> Sun, 01 Nov 2009 02:31:13 -0800
+
apt-listbugs (0.1.1) unstable; urgency=low
[ Francesco Poli (t1000) ]
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index d50c17c..fa7f0dc 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -95,7 +95,7 @@ class AppConfig
attr_accessor :severity, :stats, :quiet, :title
attr_accessor :show_downgrade, :hostname, :tag, :fbugs
- attr_accessor :frontend, :pin_priority, :yes
+ attr_accessor :frontend, :pin_priority, :yes, :ignore_regexp
attr_reader :command, :parser, :querybts, :ignore_bugs, :system_ignore_bugs, :browser
def parse_options
@@ -244,6 +244,9 @@ class AppConfig
@browser = WWW_BROWSER
end
+ if /ignore_regexp='(.*)'/ =~ `apt-config #{@apt_conf} shell ignore_regexp AptListbugs::IgnoreRegexp`
+ @ignore_regexp = $1
+ end
end
# return the descriptive name for a status
@@ -896,6 +899,11 @@ module Factory
bugs.delete_if { |bug| config.system_ignore_bugs.include?(bug.bug_number)}
end
+ def delete_regexp_bugs(bugs, regexp)
+ puts "Ignoring regexp: #{regexp}" if $DEBUG
+ bugs.delete_if {|bug| bug.desc =~ /#{config.ignore_regexp}/}
+ end
+
def delete_uninteresting_bugs(bugs)
# ignoring all bugs but the requested ones
bugs.delete_if { |bug| !config.fbugs.include?(bug.bug_number)}
@@ -1107,6 +1115,7 @@ module Factory
module_function :create, :delete_ignore_bugs,
:delete_uninteresting_bugs,
+ :delete_regexp_bugs,
:bug_is_irrelevant,
:am_i_buggy,
:delete_irrelevant_bugs, :delete_unwanted_tag_bugs,
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list