Summary: | net-print/hplip: hp-doctor/hp-check runs forever | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Brian Gloyer <brian.gloyer> |
Component: | Current packages | Assignee: | Daniel Pielmeier <billie> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | herrtimson, jstein, printing |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://launchpad.net/bugs/755441 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Fix issues related to hp-check and hp-doctor
Fix infinite loop when checking dependencies Fix infinite loop when checking dependencies |
Description
Brian Gloyer
2020-05-05 04:37:40 UTC
Do you have a /usr/include/jpeglib.h file? It should belong to media-libs/libjpeg-turbo. See also: https://forums.gentoo.org/viewtopic-p-8306276.html#8306276 I do have /usr/include/jpeglib.h from media-libs/libjpeg-turbo. I think I'm seeing the same hp-doctor problem mentioned in that forum post (that was on hplip 3.18.12). My printer is working fine so it is a problem with hp-doctor. There are a few more posts out there with the same problem, these are from 2017: https://forums.gentoo.org/viewtopic-t-1065638-highlight-hpdoctor.html https://forums.gentoo.org/viewtopic-t-1071492-highlight-hpdoctor.html this one from 2014 shows it working: https://forums.gentoo.org/viewtopic-t-952040-highlight-hpdoctor.html It worked for me in Feb 2019 so it doesn't seem to be tied to a particular version. hp-check also has the same problem. I think I found the cause. There is a symbolic link that points to its parent and hp-doctor goes into a loop expanding the tree. $ ls -l /usr/include/node/src lrwxrwxrwx 1 root root 1 Mar 27 00:06 /usr/include/node/src -> . $ qfile /usr/include/node/src net-libs/nodejs: /usr/include/node/src Pretty sure this problem existed before 3.18.6 as this has been reported upstream already for 3.11.3. I think it now pops up again because net-libs/nodejs introduced this symlink in a recent version. Created attachment 637524 [details, diff]
Fix issues related to hp-check and hp-doctor
I uncommented the symlink check as recommended in the upstream bug. Afterwards hp-check and hp-doctor rune although slower as I remember.
There were also problems detecting pillow versions > 7.0.0 as well as PyQT5.
This patch tries to fix all this issues although I am not sure about the PyQt5 fix.
Should be fixed in Git with hplip-3.20.5. I'm sorry, but this came back with net-print/hplip-3.20.6-r1, where hp-check keeps hanging in a deadlock. Problem can be solved by removing net-libs/nodejs, where it seems to have found a symlink it happily follows until eternity. Shall we reopen here and close my bug as duplicate? Apparently the fix does not work for everyone. *** Bug 740688 has been marked as a duplicate of this bug. *** Created attachment 664066 [details, diff] Fix infinite loop when checking dependencies (In reply to tt_1 from comment #7) > I'm sorry, but this came back with net-print/hplip-3.20.6-r1, where hp-check > keeps hanging in a deadlock. Problem can be solved by removing > net-libs/nodejs, where it seems to have found a symlink it happily follows > until eternity. > > Shall we reopen here and close my bug as duplicate? I took the time and tried to analyse the problem. To break the infinite loop it should stop if the object to check is a link and if this link points to a directory as the directories will be checked anyway. Can you please verify if the attached patch fixes the issue? yay, success! :) I need to use the reverted patch from https://bugs.gentoo.org/740688#c8 first, and add your new patch on top of it tested with hplip-3.20.6-r1 and python:3.7 as systems python (In reply to tt_1 from comment #11) > yay, success! :) Thanks for confirming. This time I took a look at it myself instead of blindly copying the code from others. My python skills are limited but I think the solution is somewhat same. > I need to use the reverted patch from https://bugs.gentoo.org/740688#c8 > first, and add your new patch on top of it Of course the patch is based on the original upstream release. > tested with hplip-3.20.6-r1 and python:3.7 as systems python This will go in hplip 3.20.9 however. It might take some time as other requirements have to be fulfilled before I can add the new version. Created attachment 664138 [details, diff]
Fix infinite loop when checking dependencies
Use continue instead of break. Only the link pointing to the directory should be omitted and not also everything else which follows.
Can you please check again if it also works for you this way?
Just added hplip-3.20.9. Please test if the new version fixes the issue. Yes, 3.20.9 works for me (In reply to Brian Gloyer from comment #15) > Yes, 3.20.9 works for me Thanks for confirming! I checked with python3.8, bug is solved indeed. And also it seems you have upstreamed it already in #755441? |