Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 88291 - redhat-config-printer fails to write CUPS files
Summary: redhat-config-printer fails to write CUPS files
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-printer
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
: 92083 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-08 16:12 UTC by Christopher Wong
Modified: 2007-04-18 16:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-07-07 16:36:35 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:125 normal SHIPPED_LIVE New redhat-config-printer packages available 2003-07-07 04:00:00 UTC

Description Christopher Wong 2003-04-08 16:12:03 UTC
Description of problem:

redhat-config-printer fails to write CUPS files after applying changes. Subsequent running of the program shows the changes I selected, but the files in /etc/cups (cupsd.conf, printers.conf) do not reflect the changes.

I tried running "printconf-backend --force-rebuild" to see if it would update the files, but I got the following error message:

Traceback (most recent call last):
  File "/usr/sbin/printconf-backend", line 7, in ?
    import backend
  File "/usr/share/printconf/util/", line 762, in ?
    (ipaddr, broadcast) = grok_sysconfig_files (interfaces)
  File "/usr/share/printconf/util/", line 644, in grok_sysconfig_files
    network = "NETWORK=%s.%s.%s.%s\n" % quad[:4]
UnboundLocalError: local variable 'quad' referenced before assignment

How reproducible:

This is a fresh install of Red Hat 9. I had created a local print queue and several remote ones. I had also hand-edited /etc/cups/cupsd.conf before discovering that this file would get overwritten. Finally, I fired up redhat-config-printer again and edited the sharing settings for the local print queue, specifying a network address of On checking cupsd.conf at this point, I found that no changes were being saved.

Comment 1 Tim Waugh 2003-04-08 16:26:10 UTC
Oops.  Please add 'quad = match.groups ()' above that line and see if that helps.

Comment 2 Christopher Wong 2003-04-08 16:48:57 UTC
That "quad = match.groups()" fix works. Thanks.

Comment 3 Tim Waugh 2003-06-02 16:21:18 UTC
*** Bug 92083 has been marked as a duplicate of this bug. ***

Comment 4 Ross Johnson 2003-06-03 14:16:11 UTC
I get a different traceback when I run the following commands:

# redhat-config-printer-tui --Ximport < exported.xml
# printconf-backend --force-rebuild
Traceback (most recent call last):
  File "/usr/sbin/printconf-backend", line 7, in ?
    import backend
  File "/usr/share/printconf/util/", line 763, in ?
    (ipaddr, broadcast) = grok_sysconfig_files (interfaces)
  File "/usr/share/printconf/util/", line 619, in grok_sysconfig_files
   quad[2] = '255'
TypeError: object doesn't support item assignment

I live in a address domain so this is the first line that attempts to
do an assignment.

I think I fixed it with:

        if match:
            ipaddr.append (each)
            quad = match.groups ()
            bcast = quad[0]
            bcast += '.'
            if int (quad[0]) < 128:
                bcast += '255'
                bcast += quad[1]
            bcast += '.'
            if int (quad[0]) < 192:
                bcast += '255'
                bcast += quad[2]
            bcast += '.'
            bcast += '255'
            broadcast.append (bcast)

Comment 5 Tim Waugh 2003-06-03 15:36:48 UTC
Thanks.  I've used your approach to fix this in 0.6.61-1 in rawhide.

Comment 6 Tim Waugh 2003-07-07 16:36:35 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

Comment 7 Evan Chang 2004-06-23 16:47:21 UTC

Comment 8 Evan Chang 2004-06-23 17:28:59 UTC
1.redhat-config-printer tool cannot create cups.* file correctly 
after I modify /etc/cups/cups.conf by vi. Due to I found an un-
erasiable print-device in samba server.
2. But , cups.* file could be created correctly by " printconf-
backend --force-rebuild " command .

1. mv /usr/share/printconf /usr/share/printconf.backup
2. rpm -Uhv --force redhat-config-printer-0.6.47-1.i386.rpm ; that 
means reinstall it 
3. the redhat-config-printer tool cannot create cups.* file correctly
4. I found that the /usr/share/printconf/util/printconf_tui.pyo 
does't be created.

Copy a file from another RedHat 9 machine . All system working well.

How to generate printconf_tui.pyo by in the same 
machine ?

Comment 9 Tim Waugh 2004-06-28 09:42:32 UTC
Evan: it's not clear to me what you mean.  Please file a separate bug
report and include all error messages you get (in full).  Thanks.

Note You need to log in before you can comment on or make changes to this bug.