[PATCH] add debsums output in the bug report
Carl Chenet
carl.chenet at ohmytux.com
Sun May 17 20:13:25 UTC 2009
---
bin/reportbug | 4 +++-
reportbug/bugreport.py | 7 ++++++-
reportbug/utils.py | 5 +++--
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/bin/reportbug b/bin/reportbug
index 3fba286..36bca67 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -1304,6 +1304,8 @@ class UI(object):
ewrite('Verifying package integrity...\n')
rc, output = commands.getstatusoutput('/usr/bin/debsums -s'+
commands.mkarg(package))
+ debsumsoutput = output
+
if rc:
if not ui.yes_no(
'There may be a problem with your installation of '+package+
@@ -1768,7 +1770,7 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
message = utils.generate_blank_report(
submitas or package, pkgversion, severity, justification,
depinfo, conftext, foundfile, incfiles, bts, exinfo, rtype,
- klass, subject, tags, body, mode, pseudos)
+ klass, subject, tags, body, mode, pseudos, debsumsoutput)
# Substitute server email address
if submitto and '@' not in sendto:
diff --git a/reportbug/bugreport.py b/reportbug/bugreport.py
index 3209954..b503e95 100644
--- a/reportbug/bugreport.py
+++ b/reportbug/bugreport.py
@@ -39,7 +39,7 @@ class bugreport(object):
def __init__(self, package, subject='', body='', system='debian',
incfiles='', sysinfo=True,
followup=False, type='debbugs', mode=utils.MODE_STANDARD,
- **props):
+ debsumsoutput=None, **props):
self.type = type
for (k, v) in props.iteritems():
setattr(self, k, v)
@@ -51,6 +51,7 @@ class bugreport(object):
self.system = system
self.incfiles = incfiles
self.sysinfo = sysinfo
+ self.debsumsoutput = debsumsoutput
def tset(self, value):
if value not in ('debbugs', 'launchpad'):
@@ -165,6 +166,10 @@ class bugreport(object):
if hasattr(self, 'confinfo'):
report += self.confinfo
+ # add debsums output to the bug report
+ if self.debsumsoutput:
+ report += u"\n%s\n" % self.debsumsoutput
+
return report
def __str__(self):
diff --git a/reportbug/utils.py b/reportbug/utils.py
index 8eda059..820d6af 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -700,7 +700,7 @@ def generate_blank_report(package, pkgversion, severity, justification,
depinfo, confinfo, foundfile='', incfiles='',
system='debian', exinfo=0, type=None, klass='',
subject='', tags='', body='', mode=MODE_EXPERT,
- pseudos=None):
+ pseudos=None, debsumsoutput=None):
# For now...
import bugreport
@@ -711,7 +711,8 @@ def generate_blank_report(package, pkgversion, severity, justification,
mode=mode, subject=subject, tags=tags, body=body,
pseudoheaders=pseudos, exinfo=exinfo, type=type,
system=system, depinfo=depinfo, sysinfo=sysinfo,
- confinfo=confinfo, incfiles=incfiles)
+ confinfo=confinfo, incfiles=incfiles,
+ debsumsoutput=debsumsoutput)
return unicode(rep)
def get_cpu_cores():
--
1.5.4.3
--=-lgOxSeyFJC5oRbKE+xXE--
More information about the Reportbug-maint
mailing list