Package: reportbug
Version: 3.45
Severity: normal
Tags: patch

Hello. I have modified the configuration file /etc/dhcp3/dhclient.conf
that was installed by the package dhcp3-client:

$ md5sum /etc/dhcp3/dhclient.conf
1c128bc5590714d1688fb6944c7e4128  /etc/dhcp3/dhclient.conf

$ dpkg -s dhcp3-client | grep /etc/dhcp3/dhclient.conf
 /etc/dhcp3/dhclient.conf 6e3910d75cd5cde0042ecb6d48492ae9

However, if I try to run reportbug on the package, for example with
the command below, it doesn't ask whether to include this file in the
bug report, as the description of --no-config-files in the man page
suggests that it should (given that --no-config-files is actually not
specified on the command-line).

$ reportbug --no-check-available --no-query-bts --no-debconf -S normal \
  -s test -T none --print dhcp3-client

I've attached a patch which seems to fix this issue. Though, I've not
thoroughly tested it: only with my installtion of the dhcp3-client
package mentioned above.

-- Package-specific info:
** Environment settings:
EDITOR="emacs"
INTERFACE="text"

** /home/haakonst/.reportbugrc:
mode standard
ui text
realname "Håkon Stordahl"
email "[EMAIL PROTECTED]"

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages reportbug depends on:
ii  apt                           0.7.16+b1  Advanced front-end for dpkg
ii  python                        2.5.2-2    An interactive high-level object-o
ii  python-central                0.6.8      register and build utility for Pyt

reportbug recommends no packages.

Versions of packages reportbug suggests:
ii  debconf-utils                 1.5.24     debconf utilities
ii  debsums                       2.0.38     verification of installed package 
ii  dlocate                       0.96.1     fast alternative to dpkg -L and dp
ii  exim4                         4.69-9     metapackage to ease Exim MTA (v4) 
ii  exim4-daemon-light [mail-tran 4.69-9     lightweight Exim MTA (v4) daemon
ii  file                          4.26-1     Determines file type using "magic"
ii  gnupg                         1.4.9-3    GNU privacy guard - a free PGP rep
ii  python-urwid                  0.9.8.3-1  curses-based UI/widget library for

-- no debconf information

--- a/reportbug	2008-08-06 21:52:48.000000000 +0000
+++ b/reportbug	2008-10-21 22:05:20.000000000 +0000
@@ -1454,14 +1454,14 @@
         if conffiles and not self.options.kudos:
             ewrite("Getting changed configuration files...\n")
             confinfo, changed = reportbug.get_changed_config_files(
-                conffiles, nocompress)
+                conffiles, self.options.nocompress)
 
             if self.options.noconf and changed:
                 for f in changed:
                     confinfo[f] = 'changed [not included]'
             elif changed and not notatty:
                 while 1:
-                    x = ui.select_self.options(
+                    x = ui.select_options(
                         "*** WARNING: The following configuration files have been "
                         "modified:\n"+ "\n".join(changed)+
                         "\nSend modified configuration files", 'Ynd',
--- a/reportbuglib/reportbug.py	2008-07-06 23:05:14.000000000 +0000
+++ b/reportbuglib/reportbug.py	2008-10-21 22:05:16.000000000 +0000
@@ -277,7 +277,7 @@
     dependsre = re.compile('(Pre-)?Depends: ')
     recsre = re.compile('Recommends: ')
     suggestsre = re.compile('Suggests: ')
-    conffilesre = re.compile('Conffiles: ')
+    conffilesre = re.compile('Conffiles:')
     maintre = re.compile('Maintainer: ')
     statusre = re.compile('Status: ')
     originre = re.compile('Origin: ')
@@ -317,10 +317,10 @@
         if not line: continue
 
         if confmode:
-            if line[0] != '/':
+            if line[:2] != ' /':
                 confmode = False
             else:
-                conffiles = conffiles + (line.split(),)
+                conffiles = conffiles + [tuple(line.split())]
 
         if versionre.match(line):
             (crud, pkgversion) = line.split(": ", 1)

Reply via email to