Bug 214761

Summary: Should parse 'autodetect/*/ieee1284' foomatic entries
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.7.40-1.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-30 12:53:34 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:
Bug Depends On:    
Bug Blocks: 207681, 214765    

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