[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. debian/0.1.4-6-g4c98389
Francesco Poli (wintermute)
invernomuto at paranoici.org
Sat Jun 25 20:37:23 UTC 2011
The following commit has been merged in the master branch:
commit 4c98389b20f5710dd85b631d54930686a09ed622
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Tue Jun 21 00:00:25 2011 +0200
fix logic in the bug-relevance checks
diff --git a/debian/changelog b/debian/changelog
index a59cfd4..136c496 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@ apt-listbugs (0.1.5) unstable; urgency=low
little patch by Jonathan Nieder (thanks a lot!) to enhance input
validation for the "apt-listbugs apt" command (Closes: #626937)
* reduced the use of libdpkg-ruby1.8 to improve efficiency
+ * fixed logic in the bug-relevance checks
- -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Sat, 18 Jun 2011 17:39:44 +0200
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Sun, 19 Jun 2011 20:54:06 +0200
apt-listbugs (0.1.4) unstable; urgency=low
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 69ccf65..b5b4f8c 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -929,43 +929,29 @@ module Factory
def bug_is_irrelevant(name, cur_ver, new_ver, bug_number, fixed, found, bug_stat="")
# find out if the bug number is irrelevant for this specific upgrade, from fixed/found information.
# @return false: bug is relevant, true: bug is irrelevant, should be removed.
- val=false
+ val = false
puts "Start checking: #{bug_number}" if $DEBUG
- if config.command == "list"
- puts "Special handling list for cur_ver:#{cur_ver} and new_ver:#{new_ver}" if $DEBUG
- new_ver=cur_ver if new_ver.nil?
- cur_ver=nil
- puts " -> cur_ver:#{cur_ver} and new_ver:#{new_ver}" if $DEBUG
- end
-
- # this need to conditionalize on apt-listbugs list
- if new_ver.nil?
- # 'apt-listbugs list' gives this status; I want to simulate installing the bug status of installing the current package anew
- new_ver=cur_ver
- cur_ver=nil
- end
-
- # ignore bugs that have no fixed version info, and is closed with a XXXX-done
+ # ignore bugs that have no fixed version info, and are closed with a XXXX-done
if fixed.nil? && bug_stat == "done"
- puts "bug_number:##{bug_number} -- apparently closed with XXXX-done without version info" if $DEBUG
+ puts "bug apparently closed with XXXX-done without version info" if $DEBUG
val = true
- ##316121
else if new_ver.nil?
- # This is an impossible case
- puts "ARRGH I shouldn't be here!" if $DEBUG
- val=nil
+ # no specific version was given for the package, which means that we are interested in all (non archived) bugs
+ puts "no package version given" if $DEBUG
+ val = false
else if cur_ver.nil?
- # I don't have the current package installed, which means I want to check the new version
- val=true if ! am_i_buggy(new_ver, fixed, found)
+ # no known installed version, which means that we want to check the new version
+ val = true if ! am_i_buggy(new_ver, fixed, found)
else
- val=true if am_i_buggy(cur_ver, fixed, found) || ( ! am_i_buggy(new_ver, fixed, found))
+ # both versions are known, which means that we want to check whether the upgrade may introduce this bug into the system
+ val = true if am_i_buggy(cur_ver, fixed, found) || ( ! am_i_buggy(new_ver, fixed, found))
end
end
end
- puts "in conclusion, For bug #{bug_number} comparing fixed: [#{fixed}], found:[#{found}], cur_ver:#{cur_ver} and new_ver:#{new_ver} results in removal:#{val} " if $DEBUG
+ puts "in conclusion, for bug #{bug_number} comparing fixed:[#{fixed}], found:[#{found}], cur_ver:#{cur_ver} and new_ver:#{new_ver} results in removal:#{val}" if $DEBUG
val
end
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list