[Apt-listbugs-commits] [apt-listbugs] 01/02: add AptListbugs::Severities configuration option
Francesco Poli
frx-guest at alioth.debian.org
Tue Sep 3 20:28:43 UTC 2013
This is an automated email from the git hooks/post-receive script.
frx-guest pushed a commit to branch master
in repository apt-listbugs.
commit e417708b602cca25be2ded8aeb797b8f5dc908de
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Mon Sep 2 23:54:00 2013 +0200
add AptListbugs::Severities configuration option
---
10apt-listbugs | 1 +
apt-listbugs | 15 ++++++++++++---
debian/changelog | 2 ++
lib/apt-listbugs/logic.rb | 8 ++++++++
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/10apt-listbugs b/10apt-listbugs
index 1652874..0c93139 100644
--- a/10apt-listbugs
+++ b/10apt-listbugs
@@ -4,4 +4,5 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/apt-listbugs apt";};
DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";
DPkg::Tools::Options::/usr/sbin/apt-listbugs::InfoFD "20";
+AptListbugs::Severities "critical,grave,serious";
// AptListbugs::IgnoreRegexp "FTBFS";
diff --git a/apt-listbugs b/apt-listbugs
index 671d3eb..9b073e7 100755
--- a/apt-listbugs
+++ b/apt-listbugs
@@ -60,9 +60,10 @@ apt-listbugs [-h] [-v] [-s <severities>] [-T <tags>] [-S <states>] [-B <bug#>] [
Filter bugs by severity, showing only the bugs matching a specified
value. List the bug severities that you want to see, separated by
- commas. Default: [critical,grave,serious]. Possible values are
- "critical", "grave", "serious", "important", "normal", "minor",
- "wishlist", or the special value "all" to disable filtering.
+ commas. Possible values are "critical", "grave", "serious", "important",
+ "normal", "minor", "wishlist", or the special value "all" to disable
+ filtering. Default: [critical,grave,serious]. The default list may be
+ changed by setting the AptListbugs::Severities configuration option.
* -T <tags>, --tag <tags>
@@ -195,6 +196,14 @@ notable configuration options are
Useful for setting HTTP proxy for apt-listbugs.
The special keyword 'DIRECT' will disable proxy.
+: AptListbugs::Severities
+
+ Default (comma-separated) list of bug severities to be shown. When
+ this option is not set, the list is [critical,grave,serious], unless
+ explicitly altered by using the "-s" command-line option. On the other
+ hand, when this option is set, the list of severities is its value,
+ unless explicitly altered by using the "-s" command-line option.
+
: AptListbugs::IgnoreRegexp
Bugs to ignore when in apt mode. I would suggest setting this to
diff --git a/debian/changelog b/debian/changelog
index 246d97f..ab7083a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,8 @@ apt-listbugs (0.1.10) UNRELEASED; urgency=low
(thanks to Serafeim Zanikolas for the initial patch!) and made
apt-listbugs no longer need to explicitly open /dev/tty, this being
a better fix for #662983 (Closes: #671728)
+ * added a configuration option (AptListbugs::Severities) to set the default
+ list of severities the user is interested in
-- Francesco Poli (wintermute) <invernomuto at paranoici.org> Sat, 29 Jun 2013 17:18:26 +0200
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 251a2d6..c437330 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -110,6 +110,14 @@ class AppConfig
attr_reader :command, :parser, :querybts, :ignore_bugs, :system_ignore_bugs, :browser, :arrow, :xarrow
def parse_options
+ if /sev_list='(.*)'/ =~ `apt-config #{@apt_conf} shell sev_list AptListbugs::Severities`
+ if $1 == "all"
+ @severity = ["critical","grave","serious","important","normal","minor","wishlist"]
+ else
+ @severity = $1.split(',')
+ end
+ end
+
opt_parser = GetoptLong.new
opt_parser.set_options(['--help', '-h', GetoptLong::NO_ARGUMENT],
['--severity', '-s', GetoptLong::REQUIRED_ARGUMENT],
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/apt-listbugs/apt-listbugs.git
More information about the Apt-listbugs-commits
mailing list