Bug 214761 - Should parse 'autodetect/*/ieee1284' foomatic entries
Summary: Should parse 'autodetect/*/ieee1284' foomatic entries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-printer
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC6Update 214765
TreeView+ depends on / blocked
 
Reported: 2006-11-09 11:46 UTC by Tim Waugh
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 0.7.40-1.fc6
Clone Of:
Environment:
Last Closed: 2006-11-30 12:53:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Waugh 2006-11-09 11:46:50 UTC
Description of problem:
Some devices, such as the Samsung ML-2010, have only 'ieee1284' entries for
their autodetect information in foomatic.  These should be parsed for MFG and
MDL strings for matching against as well (see bug #206907 for an example of the
problems caused by not doing so).

Version-Release number of selected component (if applicable):
0.7.35-1

Fix is:
--- foomatic.py 7 Nov 2006 17:15:19 -0000       1.38
+++ foomatic.py 9 Nov 2006 11:41:00 -0000
@@ -498,2 +498,15 @@
                 self._auto_ieee1284[dict["ieee1284"]] = printer.name
+                # Also parse the ID.
+                pieces = dict["ieee1284"].split(";")
+                mfg = mdl = None
+                for piece in pieces:
+                    if piece.find (":") == -1: continue
+                    name, value = piece.split(":",1)
+                    if name == "MFG":
+                        mfg = value
+                    elif name == "MDL":
+                        mdl = value
+                if mfg and mdl:
+                    d = self._auto_make.setdefault(mfg, {})
+                    d[mdl] = printer.name
             if dict.has_key("description"):

Comment 1 Tim Waugh 2006-11-09 11:47:31 UTC
Fixed in CVS.

Comment 2 Tim Waugh 2006-11-10 15:31:08 UTC
Update in testing: 0.7.36-1.fc6



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