[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-58-g6d5b075
Sandro Tosi
morph at debian.org
Wed Mar 3 18:24:34 UTC 2010
The following commit has been merged in the master branch:
commit c1b3e2969fe87e0607742bc4c478d58691018259
Author: Sandro Tosi <morph at debian.org>
Date: Wed Mar 3 19:20:52 2010 +0100
identify the pseudo-headers passed on the command-line and don't merge them in the mail headers, but add them to the bug "standard" pseudo-headers; thanks to Piotr Engelking for the report; Closes: #552167
diff --git a/bin/reportbug b/bin/reportbug
index cb4664e..842b1c5 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -2002,7 +2002,8 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
if listcc:
headers.append('X-Debbugs-CC: '+', '.join(listcc))
- body, headers, pseudoheaders = utils.cleanup_msg(message,headers,rtype)
+ # Pass both headers and pseudo-headers (passed on command-line, f.e.)
+ body, headers, pseudoheaders = utils.cleanup_msg(message, headers, pseudos, rtype)
if sign:
ewrite('Passing message to %s for signature...\n', sign)
diff --git a/debian/changelog b/debian/changelog
index 881b9ab..3e5e0c1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,8 +16,12 @@ reportbug (4.10.3) UNRELEASED; urgency=low
- specified the pager exit key doesn't apply to GTK+ UI; thanks to Éric
Araujo for the report; Closes: 568196
- clarified to not repot bugs against reportbug in case of GTK+ crashes
+ * bin/reportbug, reportbug/utils.py
+ - identify the pseudo-headers passed on the command-line and don't merge
+ them in the mail headers, but add them to the bug "standard"
+ pseudo-headers; thanks to Piotr Engelking for the report; Closes: #552167
- -- Sandro Tosi <morph at debian.org> Tue, 09 Feb 2010 13:40:32 +0100
+ -- Sandro Tosi <morph at debian.org> Wed, 03 Mar 2010 19:18:46 +0100
reportbug (4.10.2) unstable; urgency=low
diff --git a/reportbug/utils.py b/reportbug/utils.py
index 2ec6e6f..3655904 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -964,7 +964,7 @@ def parse_bug_control_file(filename):
return submitas, submitto, reportwith, supplemental
-def cleanup_msg(dmessage, headers, type):
+def cleanup_msg(dmessage, headers, pseudos, type):
pseudoheaders = []
# Handle non-pseduo-headers
headerre = re.compile(r'^([^:]+):\s*(.*)$', re.I)
@@ -978,6 +978,13 @@ def cleanup_msg(dmessage, headers, type):
if mob:
newheaders.append(mob.groups())
+ # Get the pseudo-headers fields
+ PSEUDOS = []
+ for ph in pseudos:
+ mob = headerre.match(ph)
+ if mob:
+ PSEUDOS.append(mob.group(1))
+
for line in dmessage.split(os.linesep):
if not line and parsing:
parsing = False
@@ -986,7 +993,8 @@ def cleanup_msg(dmessage, headers, type):
# GNATS and debbugs have different ideas of what a pseudoheader
# is...
if mob and ((type == 'debbugs' and
- mob.group(1) not in PSEUDOHEADERS) or
+ mob.group(1) not in PSEUDOHEADERS and
+ mob.group(1) not in PSEUDOS) or
(type == 'gnats' and mob.group(1)[0] != '>')):
newheaders.append(mob.groups())
lastpseudo = False
@@ -1020,12 +1028,13 @@ def cleanup_msg(dmessage, headers, type):
else:
ph2 = {}
for header, content in pseudoheaders:
- if header in PSEUDOHEADERS:
+ # if either in the canonical pseudo-headers list or in those passed on the command line
+ if header in list(PSEUDOHEADERS) + PSEUDOS:
ph2[header] = content
else:
newheaders.append( (header, content) )
- for header in PSEUDOHEADERS:
+ for header in list(PSEUDOHEADERS) + PSEUDOS:
if header in ph2:
ph += ['%s: %s' % (header, ph2[header])]
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list