tags 484408 + patch thanks Hi Junichi,
on Thu, Jun 05, 2008 at 07:30:48 +0900, you wrote: > Agreed, patch is welcome. Ok, here's my attempt at it, that works for me. Its the second time I did come in contact with some ruby code, so there might be room for improvement. ;) I used APT::ListChanges::Auto-Ignore as setting, but I'm not sure whether the APT namespace is strictly for core apt functionality or open to addons like apt-listbugs, too. If not, you'd want to change that to something like APT-ListChanges::Auto-Ignore or whatever. elmar -- .'"`. /"\ | :' : Elmar Hoffmann <[EMAIL PROTECTED]> ASCII Ribbon Campaign \ / `. `' GPG key available via pgp.net against HTML email X `- & vCards / \
--- apt-listbugs.orig 2008-05-13 00:00:19.000000000 +0200 +++ apt-listbugs 2008-06-07 20:10:56.000000000 +0200 @@ -155,6 +155,12 @@ HTTP Proxy setting, overrides the default HTTP Proxy setting. Useful for setting HTTP proxy for apt-listbugs. +* APT::ListChanges::Auto-Ignore + + Auto-ignore setting, specifies whether all remaining bugs are + automatically ignored when exiting apt-listbugs continue the apt + installation. Defaults to "true". + == OUTPUT EXAMPLE @@ -288,6 +294,7 @@ @ignore_bugs.each { |bug| @system_ignore_bugs.add(bug, false) } + @auto_ignore = true @frontend = ConsoleFrontend.new( self ) @pin_priority = "1000" @apt_conf = nil @@ -298,7 +305,7 @@ attr_accessor :severity, :stats, :quiet, :title attr_accessor :show_downgrade, :hostname, :tag - attr_accessor :frontend, :pin_priority, :yes + attr_accessor :auto_ignore, :frontend, :pin_priority, :yes attr_reader :command, :parser, :querybts, :ignore_bugs, :system_ignore_bugs, :browser def parse_options @@ -407,6 +414,15 @@ end end + # auto-ignore setting + if /auto_ignore='(.*)'/ =~ `apt-config [EMAIL PROTECTED] shell auto_ignore APT::ListChanges::Auto-Ignore` + puts "auto_ignore from APT.CONF: #{$1}" if $DEBUG + if $1 == 'false' || $1 == 'no' + puts "Disabling automatic ignoring of bugs" if $DEBUG + @auto_ignore = false + end + end + # command command = ARGV.shift case command @@ -546,12 +562,14 @@ case answer when "y" if hold_pkgs.empty? - bugs.each { |bug| - if ! @config.system_ignore_bugs.include?(bug.bug_number) - @config.system_ignore_bugs.add(bug) - @config.system_ignore_bugs.add(bug.bug_number) - end - } + if @config.auto_ignore + bugs.each { |bug| + if ! @config.system_ignore_bugs.include?(bug.bug_number) + @config.system_ignore_bugs.add(bug) + @config.system_ignore_bugs.add(bug.bug_number) + end + } + end return true end when "n"
signature.asc
Description: Digital signature