hp-setup - "old algorithm" fails to set up printer in 3.9.10

Bug #497754 reported by Josh Kelley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
Unassigned

Bug Description

Since upgrading my Debian 5.0 system from hplip 3.9.4b to 3.9.10, hp-setup fails to configure my HP Deskjet D1430. Previously, the "new algorithm" for selecting a PPD would fail, but the "old algorithm" would work; now, it fails to find the PPD using either algorithm.

I'm cherry-picking packages from Debian Unstable for the latest printer support and have built hplip .deb's myself to reduce their dependencies, so it's entirely possible that I've messed something up with my installation (maybe that's why the new algorithm never worked?), but I think that the old algorithm's failure is caused by a change in prnt/cups.py in the hplip source:

Line 476 or so (part of the new algorithm) contains the following if statement:
                if (prop.hpcups_build and 'hpijs' not in f) or \
                    ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)):
                    matches.append((f, [p for p in pdls if p and p != 'hpijs']))

Line 498 or so (part of the old algorithm) contains the following if statement:
                    if (prop.hpcups_build and 'hpijs' not in f) and \
                       ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)):
                        matches.append((f, [p for p in pdls if p and p != 'hpijs']))

Note "or" versus "and" in the first line of each if statement. Based on my very limited understanding of the hplip source code, the first if statement is correct. The second if statement was not in hplip 3.9.4b, and it looks like removing it would fix autodetection.

I tried changing "and" to "or" in the second if statement and was able to set up my printer, so I suspect this is a bug in hplip.

Changed in hplip:
status: New → Confirmed
Changed in hplip:
status: Confirmed → Triaged
Changed in hplip:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.