Bug 1912147

Summary: Enable matching for '<model>_series' drivers in PPD search algorithm
Product: [Fedora] Fedora Reporter: Salil Wadnerkar <bsdprg>
Component: hplipAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: jridky, riek, tkorbar, twaugh, zdohnal
Target Milestone: ---Flags: bsdprg: needinfo-
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/35290eeb0d5fbfacd229b0f3fd527f859d292d1c
Whiteboard: abrt_hash:78bf3c2a944c1fe8c581216a35ad6aec1280b3e1;VARIANT_ID=workstation;
Fixed In Version: hplip-3.20.11-5.fc33 hplip-3.20.11-5.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-08 01:30:02 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:
Attachments:
Description Flags
File: backtrace
none
File: cpuinfo
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds
none
journalctl -f output
none
hp-setup -ldebug -i output
none
journalctl -u cups -e output
none
printer ppd file none

Description Salil Wadnerkar 2021-01-03 20:36:50 UTC
Description of problem:
I ran:
hp-setup -i

Version-Release number of selected component:
hplip-3.20.11-1.fc33

Additional info:
reporter:       libreport-2.14.0
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.kde.konsole-502f26ce77cf4df6ab372295c03b10a7.scope
cmdline:        /usr/bin/python3 /usr/bin/hp-setup -i 192.168.1.66
crash_function: getPPDFile2
exception_type: ValueError
executable:     /usr/bin/hp-setup
interpreter:    python3-3.9.1-1.fc33.x86_64
kernel:         5.9.16-200.fc33.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
#1 [/usr/share/hplip/prnt/cups.py:596] getPPDFile2
#2 [/usr/bin/hp-setup:519] <module>

Comment 1 Salil Wadnerkar 2021-01-03 20:36:53 UTC
Created attachment 1744133 [details]
File: backtrace

Comment 2 Salil Wadnerkar 2021-01-03 20:36:53 UTC
Created attachment 1744134 [details]
File: cpuinfo

Comment 3 Salil Wadnerkar 2021-01-03 20:36:54 UTC
Created attachment 1744135 [details]
File: environ

Comment 4 Salil Wadnerkar 2021-01-03 20:36:56 UTC
Created attachment 1744136 [details]
File: mountinfo

Comment 5 Salil Wadnerkar 2021-01-03 20:36:57 UTC
Created attachment 1744137 [details]
File: namespaces

Comment 6 Salil Wadnerkar 2021-01-03 20:36:57 UTC
Created attachment 1744138 [details]
File: open_fds

Comment 7 Zdenek Dohnal 2021-01-25 06:22:12 UTC
Hi Salil,

thank you for reporting the issue!

Are you able to reproduce the issue?

Would you mind telling me the detailed steps how you reproduced the issue?


Thank you in advance!

Comment 8 Salil Wadnerkar 2021-01-29 05:10:43 UTC
Yes, this bug is still present:

Steps to reproduce:
1. Run hp-setup -i <ip-addr-of-printer>

This is my command output:

```
[swadnerkar@localhost ~]$ hp-setup -i 192.168.8.125

HP Linux Imaging and Printing System (ver. 3.20.11)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


Setting up device: hp:/net/ENVY_4500_series?ip=192.168.8.125



---------------------
| PRINT QUEUE SETUP |
---------------------


Please enter a name for this print queue (m=use model name:'ENVY_4500'*, q=quit) ?
Using queue name: ENVY_4500
Locating PPD file... Please wait.
Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 519, in <module>
    print_ppd = cups.getPPDFile2(mq, default_model, ppds)
  File "/usr/share/hplip/prnt/cups.py", line 596, in getPPDFile2
    for f, pdl_list, driver_list in matches:
ValueError: not enough values to unpack (expected 3, got 2)
```

Comment 9 Zdenek Dohnal 2021-01-29 06:36:13 UTC
Thanks, Salil!

I tried to reproduce the issue with my HP printer, but with no luck - so IMO it is a model specific issue.

Would you mind following the steps in https://fedoraproject.org/wiki/How_to_debug_printing_problems#I_have_HP_printer_and_have_a_problem_with_HPLIP_script and providing the mentioned data here?

Thank you in advance!

Comment 10 Salil Wadnerkar 2021-01-30 05:20:59 UTC
Created attachment 1752214 [details]
journalctl -f output

Comment 11 Salil Wadnerkar 2021-01-30 05:22:12 UTC
Created attachment 1752215 [details]
hp-setup -ldebug -i output

Comment 12 Salil Wadnerkar 2021-01-30 05:23:56 UTC
Created attachment 1752217 [details]
journalctl -u cups -e output

Comment 13 Salil Wadnerkar 2021-01-30 05:27:10 UTC
Created attachment 1752218 [details]
printer ppd file

Comment 14 Daniel Riek 2021-02-01 14:01:57 UTC
Seeing the same issue:
hp-setup -i xxx.xxx.xxx.xxx
[...]
Please enter a name for this print queue (m=use model name:'Photosmart_7520'*, q=quit) ?
Using queue name: Photosmart_7520
Locating PPD file... Please wait.
Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 519, in <module>
    print_ppd = cups.getPPDFile2(mq, default_model, ppds)
  File "/usr/share/hplip/prnt/cups.py", line 596, in getPPDFile2
    for f, pdl_list, driver_list in matches:
ValueError: not enough values to unpack (expected 3, got 2)

Comment 15 Zdenek Dohnal 2021-02-01 14:37:55 UTC
Hi Salil and Daniel,

I found the cause of the issue - the searching algorithm did the exact driver match and ignored <model>_series if models device id doesn't have '_series'.

The fix should be in this testing rpms (once they finish building), would you mind testing it?

https://koji.fedoraproject.org/koji/taskinfo?taskID=61038920

Comment 16 Daniel Riek 2021-02-02 12:31:50 UTC
I can confirm that this solved the problem for me.

Comment 17 Daniel Riek 2021-02-02 12:34:08 UTC
Thank you very much for fixing this so quickly, Zdenek.

Comment 18 Fedora Update System 2021-02-03 11:29:43 UTC
FEDORA-2021-ab42c9e8d3 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-ab42c9e8d3

Comment 19 Fedora Update System 2021-02-03 11:58:34 UTC
FEDORA-2021-3e0cfb2c53 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3e0cfb2c53

Comment 20 Fedora Update System 2021-02-04 01:10:27 UTC
FEDORA-2021-ab42c9e8d3 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-ab42c9e8d3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-ab42c9e8d3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2021-02-04 01:26:26 UTC
FEDORA-2021-3e0cfb2c53 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3e0cfb2c53`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3e0cfb2c53

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2021-02-06 01:58:37 UTC
FEDORA-2021-a400e2d576 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a400e2d576`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a400e2d576

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2021-02-06 02:13:19 UTC
FEDORA-2021-8b08af2e83 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-8b08af2e83`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-8b08af2e83

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2021-02-08 01:30:02 UTC
FEDORA-2021-8b08af2e83 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2021-02-14 01:45:14 UTC
FEDORA-2021-a400e2d576 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.