FS#22788 - [hplip] hp-setup downloads script which calls python binary, which is no longer in depends (python2)

Attached to Project: Arch Linux
Opened by Jiri Appl (jirik) - Sunday, 06 February 2011, 16:59 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Friday, 18 February 2011, 22:55 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Rémy Oudompheng (remyoudompheng)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
When hplip tool hp-setup wants to install certain printers (eg HP LaserJet 1018), it downloads a script from HP site which is calling python binary. However hplip depends only on python2, which binary is no longer called python (the installed binary is called python2). Therefore the script fails.

It should therefore either depend on python3 (afaik there the binary is called python, not sure if it is compatible though) or it should notify user to create a symlink python --> python2.

Additional info:
* package version(s): 3.10.9-2

Steps to reproduce:
1) run hp-setup
2) have for example LaserJet 1018 printer connected
3) have the plugin automatically downloaded
4) it fails because of nonexisting file python

Alternatively download appropriate .plugin.run file from http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/ and run it yourself.

Please let me know if you need more clarification.
This task depends upon

Closed by  Rémy Oudompheng (remyoudompheng)
Friday, 18 February 2011, 22:55 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Binary installers should not be used.
Comment by Jiri Appl (jirik) - Sunday, 06 February 2011, 17:22 GMT
Now that I am looking at it for a second time, the reference to python binary is not in the downloaded plugin file, it is in hp-setup script.
Comment by Rémy Oudompheng (remyoudompheng) - Friday, 11 February 2011, 05:18 GMT
There is no reachable reference to python in hp-setup. Actually I don't think you are supposed to run hp-setup. You are supposed to install hplip-plugin, which is available on the AUR. Keep us informed.
Comment by Jiri Appl (jirik) - Friday, 11 February 2011, 11:01 GMT
/usr/bin/hp-setup is symlink to /usr/share/hplip/setup.py which calls python on line 896.

As for not running hp-setup, it almost seemed like hp-toolbox (which is hp utility for handling their printers etc. on Linux) is internally calling hp-setup, when you want to add a new printer.

Also, as I have stated in my previous comment, my original hypothesis was wrong, python was not called from the plugin file, it was from hp-setup (/usr/share/hplip/setup.py).

I will next time try hplip-plugin. However, I still believe the hp-setup should not call python binary, it should be calling python2 (see the line 896 in /usr/share/hplip/setup.py).

Thanks for your help.
Comment by Rémy Oudompheng (remyoudompheng) - Saturday, 12 February 2011, 12:02 GMT
Wrong, line 896 in hp-setup only calls python if hp-testpage is not found in PATH. hp-testpage comes with hplip. We could of course patch all occurrences of python to python2, but I think minimising the differences with upstream version is better when they are not needed.
Comment by Rémy Oudompheng (remyoudompheng) - Sunday, 13 February 2011, 10:05 GMT
I reported the problem upstream : https://bugs.launchpad.net/hplip/+bug/718069
Comment by Jiri Appl (jirik) - Monday, 14 February 2011, 13:55 GMT
You are right with the hp-testpage.

I did a bit of additional digging and probably found the original problem, which is afaik not addressed in your patch. In the original description I mentioned that a plugin is downloaded from hp site. For the current version, this is the file: http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.11.1-plugin.run

Anyway, if you run that script with --keep switch, then cd ./plugin_tmp, you will find there hplip-plugin-install. This one is called from hp-plugin (which is called by hp-setup). This one is also referencing python (not python2) binary.
Comment by Rémy Oudompheng (remyoudompheng) - Monday, 14 February 2011, 18:46 GMT
Yes, I noticed the problem with the plugin installer, that's why I redirected you to the AUR package. You are never supposed to run an installer supplied by upstream, but instead make a PKGBUILD that converts it into a genuine Archlinux package.
Comment by Jiri Appl (jirik) - Monday, 14 February 2011, 18:59 GMT
Shouldn't then hplip package at least recommend hplip-plugin from AUR?

Thanks for your help.

Loading...