[Reportbug-maint] Bug#638357: reportbug: please support Debian Ports

Aurelien Jarno aurel32 at debian.org
Thu Aug 18 20:04:43 UTC 2011

Package: reportbug
Version: 5.1.1
Severity: wishlist
Tags: patch

When using reportbug on an architecture currently on debian-ports.org,
reportbug doesn't report the apt policy. This is because the regex isn't
match. Given that Ubuntu is already supported and that debian-ports is
something half official currently hosting 9 architectures, would it be
possible to also add support for debian-ports? The patch below should do
the job. Thanks in advance.

--- reportbug-6.0/reportbug/utils.py	2011-08-11 01:54:32.000000000 +0200
+++ reportbug-6.0/reportbug/utils.py	2011-08-18 22:01:17.000000000 +0200
@@ -677,7 +677,7 @@
     dists = []
     output = commands.getoutput('apt-cache policy 2>/dev/null')
     if output:
-        mre = re.compile('\s+(\d+)\s+.*$\s+release\s.*o=(Ubuntu|Debian),a=([^,]+),', re.MULTILINE)
+        mre = re.compile('\s+(\d+)\s+.*$\s+release\s.*o=(Ubuntu|Debian|Debian Ports),a=([^,]+),', re.MULTILINE)
         found = {}
         ## XXX: When Python 2.4 rolls around, rewrite this
         for match in mre.finditer(output):

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

More information about the Reportbug-maint mailing list