[Reportbug-maint] Processed: Re: reportbug locks terminal, refuses echo, requires "reset" after viewing followup

2017-12-04 Thread Debian Bug Tracking System
Processing control commands:

> forcemerge 695887 849763 882983
Bug #695887 [reportbug] reportbug locks terminal, refuses echo, requires 
"reset" after viewing followup
Bug #849763 [reportbug] reportbug: aborts if you attempt to read "Common issues 
with reportbug:"
Marked as found in versions reportbug/7.1.7 and reportbug/6.4.3.
Bug #695887 [reportbug] reportbug locks terminal, refuses echo, requires 
"reset" after viewing followup
Marked as found in versions reportbug/7.1.7 and reportbug/7.1.1.
Bug #882983 {Done: Sandro Tosi } [reportbug] Doesn't ask for 
description anymore and break afterwards
Severity set to 'normal' from 'grave'
Bug reopened
Ignoring request to alter fixed versions of bug #882983 to the same values 
previously set
Marked as found in versions reportbug/6.4.3 and reportbug/7.1.1.
Merged 695887 849763 882983
> tags -1 patch
Bug #695887 [reportbug] reportbug locks terminal, refuses echo, requires 
"reset" after viewing followup
Bug #849763 [reportbug] reportbug: aborts if you attempt to read "Common issues 
with reportbug:"
Bug #882983 [reportbug] Doesn't ask for description anymore and break afterwards
Added tag(s) patch.
Added tag(s) patch.
Added tag(s) patch.

-- 
695887: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695887
849763: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849763
882983: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882983
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint


[Reportbug-maint] Bug#695887: reportbug locks terminal, refuses echo, requires "reset" after viewing followup

2017-12-04 Thread Nis Martensen
control: forcemerge 695887 849763 882983
control: tags -1 patch

These bugs are caused by file descriptors not being closed properly. The
attached patch should help.
>From 1dbc071c3b966f4fb351948412ffe438de11e62f Mon Sep 17 00:00:00 2001
From: Nis Martensen 
Date: Mon, 4 Dec 2017 21:33:15 +0100
Subject: [PATCH] Make sure some file descriptors will be closed properly

---
 bin/reportbug   |  3 ++-
 reportbug/submit.py |  3 ++-
 reportbug/ui/text_ui.py | 18 ++
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/bin/reportbug b/bin/reportbug
index 7eda598..6a554b6 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -339,7 +339,8 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
 skip_editing = True
 if x == 'l':
 pager = os.environ.get('PAGER', 'sensible-pager')
-os.popen(pager, 'w').write(message)
+with os.popen(pager, 'w') as p:
+p.write(message)
 else:
 sys.stdout.write(message)
 elif x == 't':
diff --git a/reportbug/submit.py b/reportbug/submit.py
index e6bd50b..ea613cb 100644
--- a/reportbug/submit.py
+++ b/reportbug/submit.py
@@ -265,7 +265,8 @@ def send_report(body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr,
 if paranoid and not (template or printonly):
 pager = os.environ.get('PAGER', 'sensible-pager')
 try:
-os.popen(pager, 'w').write(message)
+with os.popen(pager, 'w') as p:
+p.write(message)
 except  Exception as e:
 # if the PAGER exits before all the text has been sent,
 # it'd send a SIGPIPE, so crash only if that's not the case
diff --git a/reportbug/ui/text_ui.py b/reportbug/ui/text_ui.py
index b852b79..4a60ff8 100644
--- a/reportbug/ui/text_ui.py
+++ b/reportbug/ui/text_ui.py
@@ -451,10 +451,9 @@ def show_report(number, system, mirrors,
 text = 'Original report - %s\n\n%s' % (buginfo.subject, messages[0])
 
 if not skip_pager:
-fd = os.popen('sensible-pager', 'w')
 try:
-fd.write(text)
-fd.close()
+with os.popen('sensible-pager', 'w') as fd:
+fd.write(text)
 except IOError as x:
 if x.errno == errno.EPIPE:
 pass
@@ -1009,7 +1008,8 @@ def display_report(text, use_pager=True, presubj=False):
 
 pager = os.environ.get('PAGER', 'sensible-pager')
 try:
-os.popen(pager, 'w').write(text)
+with os.popen(pager, 'w') as p:
+p.write(text)
 except IOError:
 pass
 
@@ -1023,9 +1023,10 @@ def spawn_editor(message, filename, editor, charset='utf-8'):
 
 # Move the cursor for lazy buggers like me; add your editor here...
 ourline = 0
-for (lineno, line) in enumerate(open(filename)):
-if line == '\n' and not ourline:
-ourline = lineno + 2
+with open(filename) as f:
+for (lineno, line) in enumerate(f):
+if line == '\n' and not ourline:
+ourline = lineno + 2
 
 opts = ''
 if 'vim' in edname:
@@ -1061,7 +1062,8 @@ def spawn_editor(message, filename, editor, charset='utf-8'):
 if '&' in editor:
 return (None, 1)
 
-newmessage = open(filename).read()
+with open(filename) as f:
+newmessage = f.read()
 
 if newmessage == message:
 ewrite('No changes were made in the editor.\n')
-- 
2.11.0

___
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint

[Reportbug-maint] Bug#883372: marked as done (reportbug: can't open gui version of reportbug)

2017-12-04 Thread Debian Bug Tracking System
Your message dated Mon, 4 Dec 2017 09:58:24 -0500
with message-id 

and subject line Re: Bug#883372: reportbug: can't open gui version of reportbug
has caused the Debian Bug report #883372,
regarding reportbug: can't open gui version of reportbug
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
883372: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883372
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: reportbug
Version: 7.1.7+debiancn1
Severity: normal
Tags: upstream

Dear Maintainer,

I have used debootstrap to install debian, so my debian is
slim than normal installation.I find I can't open reportbug
with gui version.Then I try to install Suggests with reportbug
,it works good. So I Suggest moving package gir1.2-gtk-3.0
and gir1.2-vte-2.91 to Depends to avoid this situation.

Regards,
hosxy



-- Package-specific info:
** Environment settings:
INTERFACE="gtk2"

** /home/wang/.reportbugrc:
reportbug_version "7.1.7"
mode standard
ui gtk2
realname "hosxy"
email "ho...@live.com"
no-cc
header "X-Debbugs-CC: ho...@live.com"
smtphost reportbug.debian.org

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8), LANGUAGE=zh_CN 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages reportbug depends on:
ii  apt1.6~alpha5
ii  python33.6.3-2
ii  python3-reportbug  7.1.7+debiancn1

reportbug recommends no packages.

Versions of packages reportbug suggests:
pn  claws-mail   
pn  debconf-utils
pn  debsums  
pn  dlocate  
pn  emacs24-bin-common | emacs25-bin-common  
ii  file 1:5.32-1
ii  gir1.2-gtk-3.0   3.22.24-3
ii  gir1.2-vte-2.91  0.50.1-1
ii  gnupg2.2.2-1
pn  postfix | exim4 | mail-transport-agent   
ii  python3-gi   3.26.1-1
ii  python3-gi-cairo 3.26.1-1
pn  python3-gtkspellcheck
pn  python3-urwid
ii  xdg-utils1.1.2-1

Versions of packages python3-reportbug depends on:
ii  apt1.6~alpha5
ii  file   1:5.32-1
ii  python33.6.3-2
ii  python3-debian 0.1.31
ii  python3-debianbts  2.7.1
ii  python3-requests   2.18.1-1

python3-reportbug suggests no packages.

-- no debconf information
--- End Message ---
--- Begin Message ---
>.Then I try to install Suggests with reportbug
> ,it works good.

thats what the documentation says, so thanks for that!

> So I Suggest moving package gir1.2-gtk-3.0
> and gir1.2-vte-2.91 to Depends to avoid this situation.

nope, not everyone wants to use the reportbug GUI and we dont want to
pull in all the GTK libraries on every machine.

there's another bug suggesting to split reportbug gui on a separate
pacakge with the required dependencies, we'll eventually follow up on
that


-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
G+: https://plus.google.com/u/0/+SandroTosi--- End Message ---
___
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint

[Reportbug-maint] Processed: use python-apt to look up package short descriptions

2017-12-04 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 patch
Bug #564112 [reportbug] Checking status of source packages with many binaries 
can be slow
Added tag(s) patch.

-- 
564112: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564112
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint


[Reportbug-maint] Bug#564112: use python-apt to look up package short descriptions

2017-12-04 Thread Nis Martensen
control: tags -1 patch

This also fixes #876373

Other related bugs: #502860, #599290, #882130
>From 4612729648fd17955e80a250baca120ce9747251 Mon Sep 17 00:00:00 2001
From: Nis Martensen 
Date: Mon, 4 Dec 2017 13:39:38 +0100
Subject: [PATCH] Look up short package descriptions using python3-apt

---
 debian/control | 2 +-
 reportbug/utils.py | 8 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 9afcc7d..144dcfa 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Homepage: http://alioth.debian.org/projects/reportbug/
 
 Package: reportbug
 Architecture: all
-Depends: ${misc:Depends}, ${python3:Depends}, apt, python3-reportbug (= ${source:Version})
+Depends: ${misc:Depends}, ${python3:Depends}, apt, python3-reportbug (= ${source:Version}), python3-apt
 Suggests: postfix | exim4 | mail-transport-agent, gnupg | pgp, debconf-utils (>> 1.1.0), debsums (>= 2.0.47), file (>> 1.30), dlocate, python3-urwid, python3-gi, python3-gi-cairo, gir1.2-gtk-3.0, gir1.2-vte-2.91, python3-gtkspellcheck, xdg-utils, emacs24-bin-common | emacs25-bin-common, claws-mail (>= 3.8.0)
 Description: reports bugs in the Debian distribution
  reportbug is a tool designed to make the reporting of bugs in Debian
diff --git a/reportbug/utils.py b/reportbug/utils.py
index 8139668..c9eb73a 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -24,6 +24,7 @@ import sys
 import os
 import re
 import platform
+import apt
 
 try:
 import pwd
@@ -550,6 +551,8 @@ def get_source_package(package):
 retlist = []
 found = {}
 
+apt_cache = apt.Cache()
+
 data = get_command_output('apt-cache showsrc ' + pipes.quote(package))
 binre = re.compile(r'^Binary: (.*)$')
 for line in data.split('\n'):
@@ -560,7 +563,10 @@ def get_source_package(package):
 packages += packlist
 
 for p in packages:
-desc = available_package_description(p)
+try:
+desc = apt_cache[p].versions[0].summary
+except KeyError:
+continue
 if desc and (p not in found):
 retlist += [(p, desc)]
 found[p] = desc
-- 
2.11.0

___
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint