Bug 156605

Summary: Hang when editing Epson EPL-2050 print queue
Product: [Fedora] Fedora Reporter: chris
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.6.130-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-11 09:40:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description chris 2005-05-02 13:16:39 UTC
A while back I added a network printer which was attached to a remote SMB
server.  Since then, my network administrator has taken that machine offline and
moved the printer across to a different server.  When I now select that printer
in system-config-printer and click "edit" (in order to change the server name),
I get an hourglass cursor and no further response - apparently indefinitely.

Comment 1 Tim Waugh 2005-05-03 12:36:33 UTC
Please try running 'system-config-printer' from a shell prompt and do the same
thing.  Is there any output in the terminal window?

Comment 2 chris 2005-05-03 13:59:10 UTC
Sorry - slight mistake in my diagnosis.  It wasn't due to the server being taken
offline: other printers on that server can be edited without problem.  It's just
one specific printer, an Epson EPL-2050.  Output in the terminal window (before
the hang) as follows:

Cannot read file /usr/share/foomatic/db/source/driver/epl2050.xml!
Driver file /usr/share/foomatic/db/source/driver/epl2050.xml corrupted, missing,
or not readable!
Couldn't load driver information.
Traceback (most recent call last):
  File "/usr/share/printconf/util/queueTree.py", line 600, in edit_button_clicked
    if self.editQueue.editQueueDialog (iter):
  File "/usr/share/printconf/util/editQueue.py", line 414, in editQueueDialog
    self.write_driver_options ()
  File "/usr/share/printconf/util/editQueue.py", line 923, in write_driver_options
    for option_tuple in option_list:
TypeError: iteration over non-sequence

Comment 3 Tim Waugh 2005-05-03 14:04:37 UTC
1. What does 'rpm -q foomatic' say, and
2. What does 'rpm -V foomatic' say?

Have you installed a version of foomatic from a different source than Fedora Core?

Comment 4 chris 2005-05-04 10:45:10 UTC
[root@chris chris]# rpm -q foomatic
foomatic-3.0.2-13.4
[root@chris chris]# rpm -V foomatic
[root@chris chris]#

No, I've only updated to foomatic-3.0.2-13.4.i386.rpm from Fedora Updates
(released 20-Apr-2005).

I've just done an rpm -qlp on it, though, and that package doesn't contain the
file epl2050.xml.

But presumably system-config-printer shouldn't just hang forever, even if the
printer driver file is missing?

Comment 5 Tim Waugh 2005-05-04 11:00:02 UTC
The file isn't missing: it's broken.  printconf requires foomatic to be working
-- it can't do anything without it.  Having a broken database is the cause of
this problem.

Where did the epl2050.xml file come from?  Does the datestamp give any clues? 
What is the history of this installation?  Could you attach the file please?

Comment 6 chris 2005-05-09 13:51:29 UTC
No, it really is definitely missing:

[root@chris chris]# locate -i epl2050
[root@chris chris]#

epl2050.xml was present in foomatic-3.0.2-3.i386.rpm as distributed with Fedora
Core 3, but (see above) it's not contained in the latest
foomatic-3.0.2-13.4.i386.rpm from Fedora Updates.

According to /usr/share/foomatic/db/source/printer/Epson-EPL-N2050.xml, that
printer can now use the epkowa-laser.xml driver.  So I suppose the simple
solution is just to delete the printer in system-config-printer and add a new
one which uses that driver.  I still think it should be possible to do that by
editing the old one, though, rather than having to delete it and create a
completely new one.

Thanks for the help.

Comment 7 Tim Waugh 2005-05-09 16:10:32 UTC
Aha, the problem is that the queue configuration didn't get upgraded to reflect
the change of driver.  I've added that to
/usr/share/printconf/util/updateconf.py like this:

changed_driver_names = {
    'stp': 'gimp-print-ijs',
    'gimp-print': 'gimp-print-ijs',
    'hpijs-rss': 'hpijs',
    'ep2050': 'eplaser'
    }

Fixed in CVS.

Comment 8 chris 2005-05-10 13:26:33 UTC
Thanks, but bad news: I've made that change here, but still no joy (same error
message as above, including the reference to epl2050.xml).

I then changed 'ep2050' to 'epl2050' (same result), and then changed 'eplaser'
to 'epkowa-laser' (same result).

Sorry...

Comment 9 Tim Waugh 2005-05-10 13:34:08 UTC
I should have been clearer: the updateconf.py program gets run when
system-config-printer is upgraded (it happens in the %post scriptlet).

What about if you run it by hand?:

/usr/share/printconf/util/updateconf.py

Does that fix the queue?

Comment 10 chris 2005-05-11 09:36:41 UTC
Ah, I see - sorry.  Running it with your modification as-is doesn't do the job,
I'm afraid.  But changing the line you've added to:

    'epl2050': 'epkowa-laser'

works a treat.  Thanks again for the help!

Comment 11 Tim Waugh 2005-05-11 09:40:32 UTC
Ah, okay -- this driver name has changed once again(!) to 'eplaser' in the
version of foomatic in Fedora development.


Comment 12 chris 2005-05-12 09:45:18 UTC
OK, great.  The left-hand part should still be changed to 'epl2050', though (not
'ep2050').

Comment 13 Tim Waugh 2005-05-12 10:09:15 UTC
Oops, fixed.  Sorry, I missed that from your earlier comment.