[Reportbug-maint] Bug#863322: reportbug: Wrong subject and package description while filling a WNPP RFA
One more patch on top, with some improvements. >From 1e965eb715d80dd07f4b930db0e22a8011c03bae Mon Sep 17 00:00:00 2001 From: Nis MartensenDate: Sun, 28 May 2017 13:07:25 +0200 Subject: [PATCH 3/3] utils.py: Do not use localized package description .. and unify the regexps used for getting the description, so that we never accidentally use the Description-md5 field. --- reportbug/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reportbug/utils.py b/reportbug/utils.py index 51c9d23..e238a8d 100644 --- a/reportbug/utils.py +++ b/reportbug/utils.py @@ -362,7 +362,7 @@ def get_package_status(package, avail=False): packarg = pipes.quote(package) if avail: output = get_command_output( -"apt-cache show %s 2>/dev/null" % packarg) +"LC_ALL=C.UTF-8 apt-cache show %s 2>/dev/null" % packarg) else: output = get_command_output( "COLUMNS=79 dpkg --status %s 2>/dev/null" % packarg) @@ -525,7 +525,7 @@ def get_avail_database(): def available_package_description(package): data = get_command_output('apt-cache show ' + pipes.quote(package)) -descre = re.compile('^Description(?:-.*)?: (.*)$') +descre = re.compile('^Description(?:-[a-zA-Z]+)?: (.*)$') for line in data.split('\n'): m = descre.match(line) if m: @@ -599,7 +599,7 @@ def get_package_info(packages, skip_notfound=False): packob = re.compile('^Package: (?P.*)$', re.MULTILINE) statob = re.compile('^Status: (?P.*)$', re.MULTILINE) versob = re.compile('^Version: (?P.*)$', re.MULTILINE) -descob = re.compile('^Description(?:-.*)?: (?P.*)$', re.MULTILINE) +descob = re.compile('^Description(?:-[a-zA-Z]+)?: (?P.*)$', re.MULTILINE) ret = [] for p in packinfo: -- 2.1.4 ___ Reportbug-maint mailing list Reportbug-maint@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint
[Reportbug-maint] Bug#863322: reportbug: Wrong subject and package description while filling a WNPP RFA
Package: reportbug Version: 7.1.6 Severity: normal Hi! While filling a reportbug against wnpp and seleting RFA (package is pngnq) I got this: = Subject: RFA: pngnq -- 8dc4366236a6a8b60a7651dc12063d65 Package: wnpp Severity: normal I request an adopter for the pngnq package. The package description is: scope::utility, use::compressing, works-with-format::png, works-with::image, works-with::image:raster = ie, the package description in "Subject" is wrong (it's using "Description-md5" instead the short description) and the description itself is using text from tags. Thank you! Best regards, Nelson -- Package-specific info: ** Environment settings: DEBEMAIL="nao...@debian.org" INTERFACE="text" ** /home/naoliv/.reportbugrc: reportbug_version "4.12.4" mode advanced ui text no-cc header "X-Debbugs-CC: nao...@debian.org" smtphost reportbug.debian.org -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (200, 'unstable'), (100, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages reportbug depends on: ii apt1.4.1 ii python3-reportbug 7.1.6 pn python3:any reportbug recommends no packages. Versions of packages reportbug suggests: pn claws-mail ii debconf-utils1.5.60 ii debsums 2.2.2 pn dlocate ii dma [mail-transport-agent] 0.11-1+b1 pn emacs23-bin-common | emacs24-bin-common ii file 1:5.30-1 ii gir1.2-gtk-3.0 3.22.11-1 ii gir1.2-vte-2.91 0.46.1-1 ii gnupg2.1.18-6 ii python3-gi 3.22.0-2 ii python3-gi-cairo 3.22.0-2 pn python3-gtkspellcheck pn python3-urwid ii xdg-utils1.1.1-1 Versions of packages python3-reportbug depends on: ii apt1.4.1 ii file 1:5.30-1 ii python3-debian 0.1.30 ii python3-debianbts 2.6.1 ii python3-requests 2.12.4-1 pn python3:any python3-reportbug suggests no packages. -- no debconf information ___ Reportbug-maint mailing list Reportbug-maint@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint