[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-64-g52467de
Sandro Tosi
morph at debian.org
Sat Mar 6 16:44:23 UTC 2010
The following commit has been merged in the master branch:
commit 1659327b5ce9ae29a6da696c9167dcccf451ce00
Author: Sandro Tosi <morph at debian.org>
Date: Sat Mar 6 11:38:58 2010 +0100
recognize also files in /var/lib/dpkg/info/, identifying the package they belong to; thanks to Dan Jacobson for the report; Closes: #230582
diff --git a/debian/changelog b/debian/changelog
index ef1e353..0a091ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,8 +25,11 @@ reportbug (4.10.3) UNRELEASED; urgency=low
Closes: #221548
* doc/README.Users
- document how to add a pseudo-header
+ * reportbug/utils.py
+ - recognize also files in /var/lib/dpkg/info/, identifying the package they
+ belong to; thanks to Dan Jacobson for the report; Closes: #230582
- -- Sandro Tosi <morph at debian.org> Sat, 06 Mar 2010 10:18:09 +0100
+ -- Sandro Tosi <morph at debian.org> Sat, 06 Mar 2010 11:37:43 +0100
reportbug (4.10.2) unstable; urgency=low
diff --git a/reportbug/utils.py b/reportbug/utils.py
index 2a22865..bff3ccb 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -182,7 +182,17 @@ def query_dpkg_for(filename, use_dlocate=True):
def find_package_for(filename, pathonly=False):
"""Find the package(s) containing this file."""
+
packages = {}
+
+ # tries to match also files in /var/lib/dpkg/info/
+ if filename.startswith('/var/lib/dpkg/info/'):
+ dpkg_info = re.compile('/var/lib/dpkg/info/(.+)\.[^.]+')
+ m = dpkg_info.match(filename)
+ # callee want a dict as second pair element...
+ packages[m.group(1)]=''
+ return (filename, packages)
+
if filename[0] == '/':
fn, pkglist = query_dpkg_for(filename)
if pkglist: return fn, pkglist
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list