3.9.10 fails to detect Deskjet D1430; software bug?

Asked by Josh Kelley

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.

Is this in fact a bug?

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Malcolmson
Solved:
Last query:
Last reply:
Revision history for this message
Andrew Malcolmson (andmalc) said :
#1

Since this is Python code and doesn't require compiling, you could make a backup copy of the file, delete the second line, save the file, and try hp-setup again.

Any reason you're upgrading the hplip version, though? This is an older printer that was supported by hplip 1.74.

Revision history for this message
Josh Kelley (joshkel) said :
#2

I should have tested that before posting. Thanks.

I changed the "and" to "or" in the second if statement and could successfully detect my printer. Should I file a bug report?

I'm upgrading hplip because we're putting together a Debian image for some customers who want the latest-and-greatest printer support. I'm testing against an older Deskjet D1430 just because that's what's available.

Revision history for this message
Best Andrew Malcolmson (andmalc) said :
#3

Yes, I'm sure Don Welch here would appreciate a bug report (plus a solution!).

Revision history for this message
Josh Kelley (joshkel) said :
#4

Thanks Andrew Malcolmson, that solved my question.