Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274538 - net-print/hplip-3.9.4b hp-setup not working
Summary: net-print/hplip-3.9.4b hp-setup not working
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Denis Dupeyron (RETIRED)
URL: https://bugs.launchpad.net/hplip/+bug...
Whiteboard:
Keywords:
: 309013 316777 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-17 19:08 UTC by Petteri Räty (RETIRED)
Modified: 2011-11-15 23:57 UTC (History)
8 users (show)

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


Attachments
Error message of hp-setup -i with USE=-qt4 (hp-setup_-i.txt,6.33 KB, text/plain)
2010-08-05 13:36 UTC, maurerpe
Details
fix for hplip problem (hplip-3.10.9-interactive.patch,1.50 KB, patch)
2011-11-15 23:56 UTC, Joshua
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2009-06-17 19:08:20 UTC
-----------------------------------------
| 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-gentoo-2.0.1
Timestamp of tree: Unknown
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 1.3.7-r1, 2.1.8-r1
dev-lang/python:     2.5.4-r2, 2.6.2-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/var/distfiles"
FEATURES="ccache collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unmerge-orphans userfetch userpriv usersandbox verify-rdepend"
GENTOO_MIRRORS=" http://trumpetti.atm.tut.fi/gentoo"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,--as-needed -Wl,-O1"
LINGUAS="fi en"
MAKEOPTS="-j8"
PKGDIR="/home/pkg/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/checkouts/overlays/flameeyes-overlay /mnt/checkouts/overlays/openrc /mnt/checkouts/overlays/sunrise /mnt/checkouts/overlays/wschlich-testing /mnt/checkouts/overlays/finnish /mnt/checkouts/overlays/jokey"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="a52 aac acl acpi alsa audiofile bash-completion bluetooth branding bzip2 cairo caps cdb cddb cdparanoia cdr cli cracklib crypt cups custom-cxxflags dbus dri dts dvd dvdr dvdread emboss evo fam ffmpeg firefox gif glib hal iconv ipv6 isdnlog java jpeg kde kdeenablefinal kdehiddenvisibility libnotify logitech-mouse mad mikmod mjpeg mmx mp3 mp4 mpeg mudflap ncurses network nptl nptlonly nsplugin nvidia offensive ogg opengl openmp pam pcre pdf png ppds pppd pulseaudio qt3 qt3support quicktime readline reflection rtc samba session spell spl sse sse2 ssl ssse3 startup-notification subversion svg symlink sysfs theora threads tiff truetype udev unicode usb userlocales vim-syntax vorbis win32codecs x86 xcb xcomposite xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fi en" USERLAND="GNU" VIDEO_CARDS="none nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mart Raudsepp gentoo-dev 2009-06-29 02:57:19 UTC
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.
Comment 2 Pacho Ramos gentoo-dev 2009-07-17 17:30:52 UTC
Upstream report:
https://bugs.launchpad.net/hplip/+bug/399522
Comment 3 Daniel Pielmeier gentoo-dev 2009-10-14 19:16:33 UTC
Does the solution from the upstream bug work?
Comment 4 Sascha 2009-11-28 14:21:10 UTC
(In reply to comment #3)
> Does the solution from the upstream bug work?
> 

yes it works fine
Comment 5 Daniel Pielmeier gentoo-dev 2009-11-29 23:25:51 UTC
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.
Comment 6 cruzki 2010-02-19 13:11:51 UTC
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.
Comment 7 Daniel Pielmeier gentoo-dev 2010-02-23 19:37:09 UTC
(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.
Comment 8 cruzki 2010-02-23 19:57:09 UTC
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.
Comment 9 Daniel Pielmeier gentoo-dev 2010-02-23 20:15:28 UTC
(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.
Comment 10 cruzki 2010-02-23 20:24:50 UTC
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 ;)
Comment 11 Roman Fenkhuber 2010-03-18 00:29:42 UTC
*** Bug 309013 has been marked as a duplicate of this bug. ***
Comment 12 Daniel Pielmeier gentoo-dev 2010-03-20 18:45:55 UTC
+*hplip-3.10.2-r1 (20 Mar 2010)
+
+  20 Mar 2010; Daniel Pielmeier <billie@gentoo.org>
+  -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.
Comment 13 Daniel Pielmeier gentoo-dev 2010-05-04 17:54:25 UTC
*** Bug 316777 has been marked as a duplicate of this bug. ***
Comment 14 Daniel Pielmeier gentoo-dev 2010-05-04 17:55:06 UTC
+  04 May 2010; Daniel Pielmeier <billie@gentoo.org>
+  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.
Comment 15 maurerpe 2010-08-04 05:36:48 UTC
(In reply to comment #14)
> +  04 May 2010; Daniel Pielmeier <billie@gentoo.org>
> +  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.
Comment 16 Daniel Pielmeier gentoo-dev 2010-08-04 17:07:15 UTC
(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
Comment 17 maurerpe 2010-08-05 13:35:05 UTC
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.
Comment 18 maurerpe 2010-08-05 13:36:50 UTC
Created attachment 241515 [details]
Error message of hp-setup -i with USE=-qt4
Comment 19 Daniel Pielmeier gentoo-dev 2010-08-05 14:18:44 UTC
(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.
Comment 20 Joshua 2011-11-15 23:56:35 UTC
Created attachment 292713 [details, diff]
fix for hplip problem
Comment 21 Joshua 2011-11-15 23:57:18 UTC
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.