Created attachment 321190 [details] emerge --info When I plugged a scanner into the USB port before emerging net-print/hplip, no "loading HP Device" lines appeared in syslog. After emerging hplip, when I connected the scanner, syslog generated: [1384054.362287] hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 loading HP Device 001 008 [16343]: warning: python-dbus not installed. hp-config_usb_printer[16343]: error: hp-check-plugin Tool requires dBus and python-dbus Then I emerged dbus-python, and now connecting the scanner spits this into syslog: [1392812.803717] hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 loading HP Device 001 009 hp-config_usb_printer[23240]: error: This is not a valid device (Not the result I might have hoped for, but it's no longer complaining about a missing package...)
What is the name of your hp device? I guess it requires a plugin.
What name are you looking for? The scanner is an H-P ScanJet 4570c. Here's the full syslog generated upon connection of the USB cable: [1384053.984036] usb usb1: wakeup_rh (auto-start) [1384053.984080] hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 [1384053.984098] uhci_hcd 0000:00:1f.2: port 1 portsc 0093,00 [1384053.984111] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s [1384054.088029] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101 [1384054.189989] usb 1-1: new full-speed USB device number 8 using uhci_hcd [1384054.340989] usb 1-1: default language 0x0409 [1384054.358989] usb 1-1: udev 8, busnum 1, minor = 7 [1384054.358997] usb 1-1: New USB device found, idVendor=03f0, idProduct=1305 [1384054.359003] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [1384054.359009] usb 1-1: Product: hp scanjet scanner [1384054.359013] usb 1-1: Manufacturer: Hewlett-Packard [1384054.359233] usb 1-1: usb_probe_device [1384054.359243] usb 1-1: configuration #1 chosen from 1 choice [1384054.362024] usb 1-1: adding 1-1:1.0 (config #1, interface 0) [1384054.362229] drivers/usb/core/inode.c: creating file '008' [1384054.362287] hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 loading HP Device 001 008 [16343]: warning: python-dbus not installed. hp-config_usb_printer[16343]: error: hp-check-plugin Tool requires dBus and python-dbus
(In reply to comment #2) > What name are you looking for? The scanner is an H-P ScanJet 4570c. HP scanjet single function scanners are not supported by hplip[1]! Maybe the sane [2] drivers work for you. [1] http://hplipopensource.com/hplip-web/supported_devices/index.html [2] http://www.sane-project.org
(In reply to comment #3) > HP scanjet single function scanners are not supported by hplip[1]! That does explain the "This is not a valid device" error, so thank you for that. However, that error is not the bug I am reporting. The bug I am reporting is the missing dev-python/dbus-python dependency. Please reread comment #0 and note that it was only after I manually installed dev-python/dbus-python that I got the correct error message of "This is not a valid device".
(In reply to comment #4) > (In reply to comment #3) > > HP scanjet single function scanners are not supported by hplip[1]! > > That does explain the "This is not a valid device" error, so thank you for > that. Your're welcome > However, that error is not the bug I am reporting. The bug I am reporting > is the missing dev-python/dbus-python dependency. Please reread comment #0 > and note that it was only after I manually installed dev-python/dbus-python > that I got the correct error message of "This is not a valid device". That other message relates to the binary plugins required by some hp printers. The binary plugin is currently not supported in Gentoo. If there is a printer which requires a binary plugin the user has to install dbus-python manually.
Currently, hp-config_usb_printer appears to be running hp-check-plugin, which exits with a fatal error that apparently causes hp-config_usb_printer to bail. This fatal error, caused by the absence of python-dbus, prevents hp-config_usb_printer from doing what it is supposed to do. In the case of my hardware, what it is supposed to do is print the error saying my hardware isn't supported. I presume it does other useful things in cases where it finds hardware that is supported. But the point is, the absence of python-dbus prevents it from doing any of this. It cannot be considered correct behavior for a user to be told that a package is missing, install it manually, and only then be told, "Oh, yeah, I don't support your hardware." That error message should pop up right away. (In reply to comment #5) > [The python-dbus] message relates to the binary plugins required by some > hp printers. The binary plugin is currently not supported in Gentoo. Since I was not trying to use such a plugin, I shouldn't hit a fatal error based on them. Perhaps hp-config_usb_printer needs to run hp-check-plugin conditionally, say, only if python-dbus is installed, or only if the user indicates he is trying to use one of the (unsupported) binary plugins. I'm not familiar enough with the package to say what the condition should be, but it's clear that the current implementation is not doing the most logical thing.
(In reply to comment #6) I can not support the binary plugins as I do not own a printer which requires it and thus I can not test it. There is bug #352439 requesting an ebuild for the plugins but there is not much progress lately. You can however open a bug upstream at https://launchpad.net/hplip at any time. Personally I don't use hp-config_usb_printer. To be honest this is the first time I hear of it. I normally recommend hp-setup but I don't know if it calls hp-plugin too. Maybe hp-config_usb_printer checks if the device is supported without plugin. In your case this fails and afterwards it tries to find out if it is supported with a plugin.
(In reply to comment #7) > I can not support the binary plugins as I do not own a printer which > requires it and thus I can not test it. That's fine. I am not asking for such support. > Personally I don't use hp-config_usb_printer. I didn't ask to use it either. It was run automatically upon a USB connection. I had no control over it. I was aware I was running it only because it produced error output in syslog. Perhaps you're running it without realizing it when you make USB connections, but because it produces no errors for you, you see no evidence of it. > Maybe hp-config_usb_printer checks if the device is supported without > plugin. In your case this fails and afterwards it tries to find out if it is > supported with a plugin. That's possible. Whatever the internal workings, they need improvement, for reasons explained in the second paragraph of comment #6. I have no stake in this -- I unmerged hplip as soon as I realized it wouldn't work for me. But it would be a courtesy to future users if this problem were solved, and I think the fix would be simple to make. For some users (perhaps even you) it is run automatically, and tools that are run automatically should Do The Right Thing. In any case, I'm not sure why the status was changed to Fixed, as nothing has been fixed. If it's not going to be fixed, the bug status should be changed to Wontfix.
I took a look into the udev rules installed and recognised the relevant files which are responsible for the automatic printer and plugin detection. The hplip documentation about the required software is outdated. It only mentions dbus and dbus-python for fax devices which is covered in the ebuild. So it looks like this dependencies are required in any case. I will fix this. Regarding the plugins your first error message was misleading as it says: hp-config_usb_printer[16343]: error: *hp-check-plugin* Tool requires dBus and python-dbus But looking at the code it does not look like hp-config_usb_printer calls hp-check-plugin so it should probably spit out: hp-config_usb_printer[16343]: error: *hp-config_usb_printer* Tool requires dBus and python-dbus Looks like someone copied and pasted the code from hp-check-plugin to hp-config-usb-printer and forgot to adapt this message.
Ah, copy/paste: the efficient coder's best friend, the hurried coder's worst enemy. Thanks for tracking this down.
+ 18 Aug 2012; Daniel Pielmeier <billie@gentoo.org> hplip-3.12.6.ebuild, + hplip-3.12.6-r1.ebuild: + dbus-python is now needed in any case and not just for fax support. This + fixes bug #431202. Thanks to Dave Kemper for the report.
Could we please leave dbus optional? it isn't strictly required.
(In reply to comment #12) > Could we please leave dbus optional? it isn't strictly required. Recently dbus was only required with fax devices. Now there are some udev rules for automatic printer configuration and binary plugin check which need dbus and are installed in any case. Maybe it is a good idea to bug upstream about making all the automatic stuff a configuration option.