[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.5-21-gca683b2
Francesco Poli (wintermute)
invernomuto at paranoici.org
Sat Dec 10 17:02:48 UTC 2011
The following commit has been merged in the master branch:
commit 5da4694053d3d43e08d2d806c6e9817d07383029
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Fri Dec 9 16:13:19 2011 +0100
find_min_version_above_ver: strictly above
The two functions find_max_version_below_ver() and find_min_version_above_ver()
are used by am_i_buggy() to find the versions closest to the one under
consideration in the found and fixed lists.
Function find_max_version_below_ver() finds the maximum version below or
equal to the one under consideration. This means that the version under
consideration, if present in the found list, or in the fixed list,
is picked up as the maximum. As a consequence, taking into account the
logic of am_i_buggy(), function find_min_version_above_ver() should
exclude the version under consideration and find the minimum version
strictly above it.
This modification is mostly due to theoretical reasons and should
have little practical impact, if any.
diff --git a/debian/changelog b/debian/changelog
index e6243d6..62bdb51 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,8 +15,10 @@ apt-listbugs (0.1.6) UNRELEASED; urgency=low
* updated README.Debian file: added an explanation of why apt-listbugs
currently ignores the "affects" BTS field
* added more assertions to the first test suite
+ * enhanced the (theoretical) correctness of the code to check whether a
+ bug is present in a package version
- -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Fri, 09 Dec 2011 00:04:58 +0100
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Fri, 09 Dec 2011 16:02:48 +0100
apt-listbugs (0.1.5) unstable; urgency=low
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 3e60f9a..c41855c 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -834,7 +834,7 @@ module Factory
end
def find_max_version_below_ver(space_delimited_bts_version, new_ver, pkg_name)
- # find the max version from found/fixed that is below new_ver
+ # find the max version from found/fixed that is below or equal to new_ver
# data format of space_delimited_bts_version:
# space-delimited PACKAGE/VERSION, or VERSION.
@@ -850,14 +850,14 @@ module Factory
end
def find_min_version_above_ver(space_delimited_bts_version, new_ver, pkg_name)
- # find the min version from found/fixed that is above new_ver
+ # find the min version from found/fixed that is strictly above new_ver
# data format of space_delimited_bts_version:
# space-delimited PACKAGE/VERSION, or VERSION.
minver=nil
iterate_fixed_found_version(space_delimited_bts_version, pkg_name) { |each_ver|
# check each each_ver
- if Debian::Dpkg.compare_versions(each_ver, "ge", new_ver) &&
+ if Debian::Dpkg.compare_versions(each_ver, "gt", new_ver) &&
( minver == nil || Debian::Dpkg.compare_versions(minver, "ge", each_ver) )
minver = each_ver
end
diff --git a/test_logic.rb b/test_logic.rb
index bc959a5..781a5a1 100755
--- a/test_logic.rb
+++ b/test_logic.rb
@@ -94,7 +94,7 @@ class TC_BugsFactory < Test::Unit::TestCase
assert_equal("1.0",
Factory::BugsFactory.find_min_version_above_ver("0.8 1.0 1.5 2.0",
- "1.0",
+ "0.8",
"test"),
"min version above version, exact found")
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list