Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 789489 - net-print/hplip: unexpected traceback on hp-scan when USE=-scanner
Summary: net-print/hplip: unexpected traceback on hp-scan when USE=-scanner
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-11 18:22 UTC by Marco Sirabella
Modified: 2023-01-28 20:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Sirabella 2021-05-11 18:22:51 UTC
Hello,

Messing around with my HP printer, the `hp-scan` command provides a traceback:

```
Traceback (most recent call last):
  File "/usr/bin/hp-scan", line 40, in <module>
    import scanext
ModuleNotFoundError: No module named 'scanext'
```

This is both confusing and unhelpful, as it doesn't really clue me in that I forgot to emerge net-print/hplip with USE=scanner

Can this binary be removed if USE=-scanner? It will at least remove the command that will never run successfully. I believe a "Why isn't this command on my system?" is more helpful than "why is this command buggy / giving me a module not found?", especially without python knowledge.

Thanks,

-- Marco Sirabella
Comment 1 Daniel Pielmeier gentoo-dev 2023-01-28 14:23:05 UTC
It is possible to remove hp-scan if scan support is disabled.

However I think this should be done upstream. I guess this is the case for more tools than just hpscan.

Also in this case I think it is really straightforward that if the ebuild has a scanner USE flag scanning features only work if it is enabled.
Comment 2 Marco Sirabella 2023-01-28 20:31:51 UTC
Makes sense to me, I'll forward it along to upstream

> Also in this case I think it is really straightforward that if the ebuild has a scanner USE flag scanning features only work if it is enabled.

Disagree with this though, not everyone is looking at the use flags of every package they install, checking the use flags might be a reasonable step in debugging the traceback issue but there shouldn't even be a "debugging" step for commands that will never run successfully.
Comment 3 Daniel Pielmeier gentoo-dev 2023-01-28 20:37:47 UTC
Well then bring it upstrwam.