HP Linux Imaging and Printing

hplip 3.9.6b, hp-plugin option -i not recognized

Reported by charles on 2009-07-14
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
Medium
Unassigned
Gentoo Linux
Fix Released
Medium

Bug Description

when using hp-setup a call (at line 378) is made to hp-plugin (hp-plugin -i).
hp-plugin does not accept run mode -i or --interactive.

i suspect that hplip-3.9.6b-plugin.run makes a similar call because it also produces the error.

"error: option -i not recognized"

because the plugin does not install i am unable to print to (3) hp2600n which require use of the plugin.

please see output of:
hp-plugin --required -l debug

HP Linux Imaging and Printing System (ver. 3.9.6b)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-9 Hewlett-Packard 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.)

hp-plugin[30043]: debug: Unable to open file installer/distros.dat for reading.
hp-plugin[30043]: debug: []
hp-plugin[30043]: debug: Plug-in version=3.9.6b
hp-plugin[30043]: debug: Plug-in=hplip-3.9.6b-plugin.run

-----------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.9.6b |
-----------------------------------------

hp-plugin[30043]: debug: plugin is not installed
  Option Description
  ---------- --------------------------------------------------
  d Download plug-in from HP (recomended)
  p Specify a path to the plug-in (advanced)
  q Quit hp-plugin (skip installation)

Enter option (d=download*, p=specify path, q=quit) ? d
hp-plugin[30043]: debug: Plugin.conf url: http://hplip.sf.net/plugin.conf

--------------------------
| DOWNLOAD CONFIGURATION |
--------------------------

Checking for network connection...
hp-plugin[30043]: debug: /usr/bin/wget --timeout=10 --output-document=- http://www.google.com
hp-plugin[30043]: debug: --16:41:33-- http://www.google.com/
           => `-'
Resolving www.google.com... 208.69.32.230, 208.69.32.231
Connecting to www.google.com|208.69.32.230|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.google.com.bz/ [following]
--16:41:33-- http://www.google.com.bz/
           => `-'
Resolving www.google.com.bz... 208.69.32.231, 208.69.32.230
Reusing existing connection to www.google.com:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

....

16:41:34 (24.45 KB/s) - `-' saved [5621]

YES

hp-plugin[30043]: debug: wget returned: 0
Downloading configuration file from: http://hplip.sf.net/plugin.conf
Downloading configuration: [************************************************************************************************************************************************************] 100% 8.0 KB

-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
hp-plugin[30043]: debug: /usr/bin/wget --timeout=10 --output-document=- http://www.google.com
hp-plugin[30043]: debug: --16:41:35-- http://www.google.com/
           => `-'
Resolving www.google.com... 208.69.32.230, 208.69.32.231
Connecting to www.google.com|208.69.32.230|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.google.com.bz/ [following]
--16:41:35-- http://www.google.com.bz/
           => `-'
Resolving www.google.com.bz... 208.69.32.231, 208.69.32.230
Reusing existing connection to www.google.com:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

....

16:41:35 (35.80 KB/s) - `-' saved [5698]

YES

hp-plugin[30043]: debug: wget returned: 0
Downloading plug-in from: http://www.linuxprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.9.6b-plugin.run
Downloading plug-in: [\ ] 0% hp-plugin[30043]: debug: DDownloading plug-in: [******************************************************************************************************************************************************************] 100% 1.2 MB hp-plugin[30043]: debug: File error page score: 0.000000
hp-plugin[30043]: debug: D/L file checksum=0b416933b4cc1a577fd52976b8e4bd5d6bf069dc
hp-plugin[30043]: debug: Downloading 3.9.6b plug-in digital signature file from 'http://www.linuxprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.9.6b-plugin.run.asc' to '/tmp/hplip-3.9.6b-plugin.run.Downloading plug-in: [******************************************************************************************************************************************************************] 100% 8.0 KB hp-plugin[30043]: debug: File error page score: 0.000000
Receiving digital keys: /usr/bin/gpg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x9013c005
hp-plugin[30043]: debug: gpg: requesting key 9013C005 from hkp server pgp.mit.edu

hp-plugin[30043]: debug: gpg: key 9013C005: "HPLIP (HP Linux Imaging and Printing) <email address hidden>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1

hp-plugin[30043]: debug: Verifying plugin with digital keys: /usr/bin/gpg --no-permission-warning --verify /tmp/hplip-3.9.6b-plugin.run.asc /tmp/hplip-3.9.6b-plugin.run
hp-plugin[30043]: debug: gpg: Signature made Thu 25 Jun 2009 01:12:03 PM CST using DSA key ID 9013C005
gpg: Good signature from "HPLIP (HP Linux Imaging and Printing) <email address hidden>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: EFBA BBAD D764 D44E 9D52 BD60 840E DA9E 9013 C005

hp-plugin[30043]: debug: gpg: Signature made Thu 25 Jun 2009 01:12:03 PM CST using DSA key ID 9013C005
gpg: Good signature from "HPLIP (HP Linux Imaging and Printing) <email address hidden>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: EFBA BBAD D764 D44E 9D52 BD60 840E DA9E 9013 C005

hp-plugin[30043]: debug: /usr/bin/gpg status: 0

----------------------
| INSTALLING PLUG-IN |
----------------------

Verifying archive integrity... All good.
Uncompressing HPLIP 3.9.6b Plugin Self Extracting Archive.................................

HP Linux Imaging and Printing System (ver. 3.9.6b)
Plugin Installer ver. 3.0

Copyright (c) 2001-9 Hewlett-Packard 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.

Self-installs the HPLIP plugin.

Usage: hplip-plugin-install [OPTIONS]

[OPTIONS]
  Set the logging level: -l<level> or --logging=<level>
                                                                 <level>: none, info*, error, warn, debug (*default)
  Run in debug mode: -g (same as option: -ldebug)
  This help information: -h or --help

error: option -i not recognized
hp-plugin[30043]: debug: Cache miss: hp_color_laserjet_3600
hp-plugin[30043]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Searching for section [hp_color_laserjet_3600] in file /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Found section [hp_color_laserjet_3600] in file /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Cache miss: hp_color_laserjet_2600n
hp-plugin[30043]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Searching for section [hp_color_laserjet_2600n] in file /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Found section [hp_color_laserjet_2600n] in file /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Cache miss: hp_color_laserjet_2840
hp-plugin[30043]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Searching for section [hp_color_laserjet_2840] in file /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Found section [hp_color_laserjet_2840] in file /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Cache miss: hp_laserjet_3055
hp-plugin[30043]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Searching for section [hp_laserjet_3055] in file /usr/share/hplip/data/models/models.dat
hp-plugin[30043]: debug: Found section [hp_laserjet_3055] in file /usr/share/hplip/data/models/models.dat

Done.

Download full text (7.0 KiB)

-----------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.9.4b |
-----------------------------------------

  Option Description
  ---------- --------------------------------------------------
  d Download plug-in from HP (recomended)
  p Specify a path to the plug-in (advanced)
  q Quit hp-plugin (skip installation)

Enter option (d=download*, p=specify path, q=quit) ?

--------------------------
| DOWNLOAD CONFIGURATION |
--------------------------

Checking for network connection...
Downloading configuration file from: http://hplip.sf.net/plugin.conf
Downloading configuration: [***********************************************************************************************************************************************************************] 100% 8.0 KB

-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
Downloading plug-in from: http://www.linuxprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.9.4b-plugin.run
Downloading plug-in: [*****************************************************************************************************************************************************************************] 100% 8.0 KB Receiving digital keys: /usr/bin/gpg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x9013c005

----------------------
| INSTALLING PLUG-IN |
----------------------

Verifying archive integrity... All good.
Uncompressing HPLIP 3.9.4b Plugin Self Extracting Archive................................

HP Linux Imaging and Printing System (ver. 3.9.4b)
Plugin Installer ver. 3.0

Copyright (c) 2001-9 Hewlett-Packard 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.

Self-installs the HPLIP plugin.

Usage: hplip-plugin-install [OPTIONS]

[OPTIONS]
  Set the logging level: -l<level> or --logging=<level>
                                                                    <level>: none, info*, error, warn, debug (*default)
  Run in debug mode: -g (same as option: -ldebug)
  This help information: -h or --help

error: option -i not recognized

------------------------
| DOWNLOADING FIRMWARE |
------------------------

Downloading firmware to device hp:/usb/HP_LaserJet_P1005?serial=BC123L9...
error: Firmware file '/usr/share/hplip/data/firmware/hp_laserjet_p1005.fw.gz' not found.

Done.

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

warning: One or more print queues already exist for this device: LPUSB.

Would you like to install another print queue for this device (y=yes, n=no*, q=quit) ?

Done.
Portage 2.2_rc33 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-rc6 i686)
=================================================================
System uname: Linux-2.6.30-rc6-i686-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with...

Read more...

Same problem here. I suspect the hplip-3.9.4b-plugin.run has changed, to lose the -i option, or it was not tested during the bump and the newer version has changed.

charles (charlesaburrell) wrote :

tested fix:

1) modify hp-setup:
      line 373 (NOT 378 as above)
           change: os.system("hp-plugin -i")
           to: os.system("hp-plugin --required")

2) manual download and install:
    wget http://www.linuxprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.9.6b-plugin.run
    set execute bit
    ./hplip-3.9.6b-plugin.run

3) run hp-setup to install printer

Does the solution from the upstream bug work?

(In reply to comment #3)
> Does the solution from the upstream bug work?
>

yes it works fine

Can anybody try this with hplip-3.9.10. Running "hp-plugin -i" works fine here, but I can not check with hp-setup because my printer does not require a plugin.

Whith 3.9.12 did not work.

Making the change sugested in the upstream AND instaling pygobject (as sugested by this thread https://answers.launchpad.net/hplip/+question/68660)
I can finally install my printer.

(In reply to comment #6)
> Whith 3.9.12 did not work.
>
> Making the change sugested in the upstream AND instaling pygobject (as sugested
> by this thread https://answers.launchpad.net/hplip/+question/68660)
> I can finally install my printer.
>

The link you posted above seems unrelated to our problem here. The launchpad question is about missing dependencies which should be installed when installing hplip.

From Petteri's output there must be a problem after hp-setup is trying to run the the downloaded run script.

From hp-setup it is called with: "sh hplip-3.9.12-plugin.run -- -i" or "-u" depending on how hp-setup is called.

When I run this command the plugin installs successfully. I tested with the -u and with the -i switch. As mentioned above I can not run it from hp-setup as this part is only executed if the printer in question needs a plugin.

Please can anybody experiencing this problem run "sh hplip-3.9.12-plugin.run -- -ig". This should give extra debug output.

I misscopy the link. The correct one was:

https://bugs.launchpad.net/hplip/+bug/399522

But after doing this I hit the problem that the other link said.

(In reply to comment #8)
> I misscopy the link. The correct one was:
>
> https://bugs.launchpad.net/hplip/+bug/399522
>
> But after doing this I hit the problem that the other link said.
>

I guess you have the qt4 use flag disabled for hplip as enabling it pulls in
the required dependencies. Probably the python dbus bindings and pygobject are
also needed when using the non gui mode but this would be another issue.

Can you please download the plugin from
http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/ and run
the command I mentioned above.

I forgot to said that after intaling pygobject I can finally run hp-plugin and the command you provide.

And I haven't enable de qt4 flag, so I think this would be the problem.

Thanks for the help ;)

Which distribution are you using, or asked otherwise do you have the dui parts of hplip installed?

It seems if gui-build is set to no in hplip.conf the -i and -u options are not available for all hp-tools. This also counts for the plugin run file. hp-plugin executes run_plugin from core_install.py which in turn executes the downloaded plugin run file with the -i or -u option depending on whether GUI_MODE is available or not. This fails as -i and -u are not available.

Just for reference there is also a Gentoo bug open about this issue. http://bugs.gentoo.org/274538

Sorry, I wanted to ask if you have the gui parts of hplip installed or not.

*** Bug 309013 has been marked as a duplicate of this bug. ***

+*hplip-3.10.2-r1 (20 Mar 2010)
+
+ 20 Mar 2010; Daniel Pielmeier <email address hidden>
+ -files/hplip-3.9.4+glibc-2.10.patch, +hplip-3.10.2-r1.ebuild,
+ +files/hplip-3.10.2-plugin.patch:
+ Revision bump. Update ebuild to use newer python eclass related functions.
+ Add a patch which fixes plugin installation from bug #274538. Remove
+ unused patch.

Please test if this version fixes the plugin installation.

The attached patch should fix the problem. See also comment #2.

*** Bug 316777 has been marked as a duplicate of this bug. ***

+ 04 May 2010; Daniel Pielmeier <email address hidden>
+ files/hplip-3.10.2-plugin.patch:
+ Another try to fix plugin installation. This should fix bug #274538 and
+ #316777.

Apparently the upstream patch did not fix the problem so I replaced it with a new one. See also bug #316777. The user confirmed that the issue is fixed with the new patch, so I will close this for now. If there are still issues please reopen.

charles (charlesaburrell) wrote :

sorry for not replying to your comments.

distribution was ubuntu 9.04 server as such it was a non-gui build of hplip

as for the patch, i'm not able to test, we now use raw printer queues with hp supplied windows drivers.

hopefully some have benefited.

Changed in gentoo:
status: Unknown → Fix Released
Changed in hplip:
status: New → Confirmed

Patch has provided at comment #4
    Once python-dbus and python-gobject has installed removing -i option leads to launch GUI Version of hp-plugin.
    So given patch will not work.
    If Packages are not installed then hp-plugin leads to interactive mode of running.

So, Providing instruction to user about install python gobject package so that -i option will work.
user requires to install python gobject and dbus if they are not installed.

Thanks!
Naga Samrat Chowdary, Narla

Changed in hplip:
status: Confirmed → Triaged
status: Triaged → Fix Committed
Changed in hplip:
status: Fix Committed → Fix Released
Changed in hplip:
importance: Undecided → Medium

(In reply to comment #14)
> + 04 May 2010; Daniel Pielmeier <email address hidden>
> + files/hplip-3.10.2-plugin.patch:
> + Another try to fix plugin installation. This should fix bug #274538 and
> + #316777.
>
> Apparently the upstream patch did not fix the problem so I replaced it with a
> new one. See also bug #316777. The user confirmed that the issue is fixed with
> the new patch, so I will close this for now. If there are still issues please
> reopen.
>

I just had the same problem with 3.10.6. It appears the plugin patch was dropped between the 3.10.5 and 3.10.6 ebuilds. I applied a similar patch (solved the issue on my own before I found this bug) and it fixed the issue.

(In reply to comment #15)
> I just had the same problem with 3.10.6. It appears the plugin patch was
> dropped between the 3.10.5 and 3.10.6 ebuilds. I applied a similar patch
> (solved the issue on my own before I found this bug) and it fixed the issue.
>

The patch was dropped intentionally as upstream added a fix for this problem. They did not apply the patch [1] I provided in [2] but this [3] one instead.

This is also why you experience bug #331163.

[1] http://launchpadlibrarian.net/47809379/hplip-3.10.2-plugin.patch
[2] https://bugs.launchpad.net/hplip/+bug/399522
[3] http://launchpadlibrarian.net/49192341/core_install.patch

I ran some tests that are documented in Bug 331163 Comment 2 [1] that shows that my system does not work with the new patch (Listed as [3] above).
  [1] http://bugs.gentoo.org/show_bug.cgi?id=331163#c2
  [3] http://launchpadlibrarian.net/49192341/core_install.patch

I think that part of the problem is that I don't have the qt4 use flag enabled. The documentation states that -u is for gui (normal default) and -i is for interactive. If I run hp-setup -i, it gives an error indicating an unrecognized option. Running hp-setup with no arguments works and run in interactive mode. This is also true of hp-plugin. To me, the correct solution is to find out why -i is not accepted when USE=-qt4 and fix that (then the old patch is not needed). The error message from hp-setup -i is attached. The funny part is that the error message shows usage info for -i and even includes examples of using -i and then complains that -i is invalid.

Here are my use flags for hplip:
qwerty ~ $ emerge -pv =net-print/hplip-3.10.6

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild UD] net-print/hplip-3.10.6 [3.10.6-r1] USE="X hpcups libnotify
scanner -doc -fax -hpijs -minimal -parport -policykit -qt4 -snmp -static-ppds
-udev-acl" 0 kB [1=>0]

Total: 1 package (1 downgrade), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/overlay/

Note that I currently have a version my a local overlay installed that requires
dbus-python and applies the "old" patch (I want printing to work while this bug
is being processed). I had the portage version installed when I ran the tests in bug 331163.

Created attachment 241515
Error message of hp-setup -i with USE=-qt4

(In reply to comment #17)
> I think that part of the problem is that I don't have the qt4 use flag enabled.
> The documentation states that -u is for gui (normal default) and -i is for
> interactive. If I run hp-setup -i, it gives an error indicating an
> unrecognized option. Running hp-setup with no arguments works and run in
> interactive mode. This is also true of hp-plugin. To me, the correct solution
> is to find out why -i is not accepted when USE=-qt4 and fix that (then the old
> patch is not needed). The error message from hp-setup -i is attached. The
> funny part is that the error message shows usage info for -i and even includes
> examples of using -i and then complains that -i is invalid.

If you build hplip without GUI (USE="-qt4") there is no -i or -u flag available because only interactive mode is possible. The confusing thing is that hp-setup lists the options as available.

I think there will still be issues with the patch from comment #6

What happens if there is no GUI installed but python-dbus and python-gobject are. hp-setup will then launch the plugin installer with the -i option, but if there is no gui the -i and -u options are not available. I already wrote about this in comment #2.

marathon (junk4me46806) wrote :

Here is a patch that seems to fix this bug. It works on my machine.

The issue, as I understand it is:
   A) Python scripts pass -i to other python scripts when running in interactive mode.
   B) When built without the gt4 gui_build option, -i is not a valid option.

The previous patch from comment #4 attempted to fix issue part A. This patch was rejected because it affected the behavior when built with gui_build (hp-setup -i will still launch the gui because hp-plugin is called with no arguments and its default is to launch the gui.).

The patch from comment #6 did not affect code execution, but instead printed a message to the user to install python dbus and python gobject. The patch operated under the assumption that installing these packages would fix the issue. I have both of these packages installed (gentoo packages dev-python/dbus-python-0.83.0-r1 and dev-python/pygobject-2.20.0) and am still seeing this bug. Comment #7 reiterates this point.

The attached patch address issue part B, which I believe is the correct place to fix this bug. The attached patch always allows the -i option as long as interactive mode is available. Without this patch, if interactive mode was the only version, -i would receive an error even though the program could run in interactive mode just fine (in fact that is what the user desires). This patch has the advantage of not changing the current behavior of the code. When built with gui_build, this patch will have no effect since -i was already accepted in that case. When built without gui_build, this patch will fix this bug and allow proper execution.

Changed in gentoo:
importance: Unknown → Medium
marathon (junk4me46806) wrote :

Just downloaded and installed 3.11.1 and the issue persists. The patch suggested in #8 applied without a hitch and fixed the issue on my machine. This patch seems like a good solid fix to me. Can anyone confirm or deny?

Created attachment 292713
fix for hplip problem

It seems post #8 at the following site has a working patch for this problem:

https://bugs.launchpad.net/hplip/+bug/399522

From the post:

Here is a patch that seems to fix this bug. It works on my machine.

The issue, as I understand it is:
   A) Python scripts pass -i to other python scripts when running in interactive mode.
   B) When built without the gt4 gui_build option, -i is not a valid option.

The previous patch from comment #4 attempted to fix issue part A. This patch was rejected because it affected the behavior when built with gui_build (hp-setup -i will still launch the gui because hp-plugin is called with no arguments and its default is to launch the gui.).

The patch from comment #6 did not affect code execution, but instead printed a message to the user to install python dbus and python gobject. The patch operated under the assumption that installing these packages would fix the issue. I have both of these packages installed (gentoo packages dev-python/dbus-python-0.83.0-r1 and dev-python/pygobject-2.20.0) and am still seeing this bug. Comment #7 reiterates this point.

The attached patch address issue part B, which I believe is the correct place to fix this bug. The attached patch always allows the -i option as long as interactive mode is available. Without this patch, if interactive mode was the only version, -i would receive an error even though the program could run in interactive mode just fine (in fact that is what the user desires). This patch has the advantage of not changing the current behavior of the code. When built with gui_build, this patch will have no effect since -i was already accepted in that case. When built without gui_build, this patch will fix this bug and allow proper execution.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.