Bug 630058

Summary: Only match PPDs with compatible CMD fields
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: jpopelka, till.kamppeter, twaugh
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-printer-1.2.5-6.fc13 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-22 22:14:15 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 Tim Waugh 2010-09-03 15:44:53 UTC
It would be fantastic to be able to rely on the content of the CMD field in PPD 1284DeviceID attributes.  In that case, PackageKit would still download packages containing both PPDs but system-config-printer would be able to compare CMD fields.

If all the keywords present in the CMD field of a PPD's 1284DeviceID attribute are also present in the CMD field given by the printer, this PPD would be available as a choice.  If any are not present in the CMD field given by the printer, that PPD would not be considered as a match for that printer.

Comment 1 Till Kamppeter 2010-09-16 07:51:32 UTC
For the upcoming Ubuntu Maverick release I have already fixed the problem but due to Ubuntu's Finale Freeze today I had not yet the time to put up the patches. I will provide them in the next days.

Comment 2 Tim Waugh 2010-09-16 10:14:43 UTC
Better suggestion from George Liu about the matching algorithm:

If any word in the CMD field of the PPD's 1284DeviceID attribute appears in the printer MIB's CMD field, that PPD should be considered as matching the device.

This allows several spellings of e.g. PostScript to be used in the PPD in order to match a variety of spellings from different versions of a printer product e.g. PS3, PS, POSTSCRIPT.

Additionally, this allows for more than one type optional module in a device, e.g. PostScript and (say) CUPS-RASTER.

As a special case, if no CMD field is present in the PPD's 1284DeviceID attribute, CMD field filtering will not be performed and so it will considered as a match for any device with matching MFG and MDL fields.

Comment 3 Till Kamppeter 2010-09-16 14:16:09 UTC
Good idea, Tim. I have implemented it this way in Ubuntu Maverick now. Tim, I have sent you all patches by e-mail.

Note that my changes only prioritize the PPDs and do not remove the unsuitable PPDs from the list. So automatic setups (via udev-configure-printer or if a matching PPD is found and the make/model step of the wizard skipped) will always select the CMD:-wise correct PPD and in the case that the make/model step is displayed, the correct PPD is moved to the top and marked (so that simply clicking Next, Next, Next, ... will do the right thing). Unsuitable PPDs (like PostScript PPD if no PostScript add-on is installed) will not suppressed from the list though.

Therefore PPDs without device ID wth CMD: field will be considered non-matching. If there is no CMD:-prioritized PPD, only the old prioritization methods will get applied.

Comment 4 Tim Waugh 2010-10-12 16:44:00 UTC
I've fixed this upstream slightly differently.

Comment 5 Fedora Update System 2010-10-13 14:47:04 UTC
system-config-printer-1.2.5-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc14

Comment 6 Fedora Update System 2010-10-13 14:54:48 UTC
system-config-printer-1.2.5-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc13

Comment 7 Fedora Update System 2010-10-14 06:24:04 UTC
system-config-printer-1.2.5-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-printer'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc13

Comment 8 Fedora Update System 2010-11-16 23:23:13 UTC
system-config-printer-1.2.5-6.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2010-11-22 22:12:54 UTC
system-config-printer-1.2.5-6.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.