[Apt-listbugs-commits] [apt-listbugs] 01/01: handle back-ports (Closes: #822265)
Francesco Poli
frx-guest at moszumanska.debian.org
Sun May 1 15:32:49 UTC 2016
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 749348f3dd9f090032f1a278a808fd42f2cdc1e3
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Sun May 1 17:30:26 2016 +0200
handle back-ports (Closes: #822265)
---
debian/README.Debian | 10 ++++++++++
debian/changelog | 4 ++++
lib/aptlistbugs/logic.rb | 13 +++++++++++--
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index 096a708..c9e02d7 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -219,6 +219,16 @@ probably be filed against the debbugs package, requesting this
new feature.
+Back-ports handling
+===================
+
+When determining whether a given version of a package includes a given
+bug, apt-listbugs treats a back-ported version (such as x.y-z~bpo8-r)
+as if it were the corresponding official Debian package version (x.y-z).
+This special handling is based on the (hopefully reasonable) assumption
+that a back-port has the same bugs as the corresponding official package.
+
+
Debugging and filing bug reports against apt-listbugs
=====================================================
diff --git a/debian/changelog b/debian/changelog
index d540bb2..35eb384 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,10 @@ apt-listbugs (0.1.18) UNRELEASED; urgency=medium
versioned dependency on debhelper: no other changes needed
* updated VCS URLs to new canonical HTTPS form in debian/control and
debian/copyright files, and in man page, as well
+ * fixed "apt-listbugs does not properly handle backports": when determining
+ whether a given version of a package includes a given bug, a back-ported
+ version is treated as if it were the corresponding official Debian
+ package version (Closes: #822265)
-- Francesco Poli (wintermute) <invernomuto at paranoici.org> Mon, 10 Aug 2015 22:42:49 +0200
diff --git a/lib/aptlistbugs/logic.rb b/lib/aptlistbugs/logic.rb
index a5c3356..38e7bf0 100644
--- a/lib/aptlistbugs/logic.rb
+++ b/lib/aptlistbugs/logic.rb
@@ -5,7 +5,7 @@
# Copyright (C) 2002 Masato Taruishi <taru at debian.org>
# Copyright (C) 2006-2008 Junichi Uekawa <dancer at debian.org>
# Copyright (C) 2007 Famelis George <famelis at otenet.gr>
-# Copyright (C) 2008-2015 Francesco Poli <invernomuto at paranoici.org>
+# Copyright (C) 2008-2016 Francesco Poli <invernomuto at paranoici.org>
# Copyright (C) 2009-2010 Ryan Niebur <ryan at debian.org>
# Copyright (C) 2013 Google Inc
#
@@ -1158,6 +1158,15 @@ module Factory
new_ver = new_pkgs[pkg_key]["version"] if new_pkgs[pkg_key] != nil
cur_ver = cur_pkgs[pkg_key]["version"] if cur_pkgs[pkg_key] != nil
+ # treat back-ported versions as if they were the corresponding
+ # official versions (this special handling is necessary until
+ # we can query the BTS version tracking directly, see #694979#19,
+ # and until back-ports are correctly handled by BTS version tracking)
+ new_o_ver = nil
+ cur_o_ver = nil
+ new_o_ver = new_ver.gsub(/~bpo[0-9].*$/, '') if new_ver != nil
+ cur_o_ver = cur_ver.gsub(/~bpo[0-9].*$/, '') if cur_ver != nil
+
# show progress
yield _("Parsing Found/Fixed information..."),
"#{(i.to_f/max.to_f*100).to_i}%" if (i % step) == 0
@@ -1168,7 +1177,7 @@ module Factory
src_name = new_pkgs[pkg_key]
src_name = src_name["package"] if src_name != nil
- val = true if bug_is_irrelevant(src_name, cur_ver, new_ver,
+ val = true if bug_is_irrelevant(src_name, cur_o_ver, new_o_ver,
bug.bug_number, bug.fixed, bug.found, bug.stat)
val
}
--
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