pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: problems with hplip package
On Wed, 2026-08-26 at 22:39 +0200, Thomas Klausner wrote:
> On Wed, Aug 26, 2026 at 09:27:21PM +0100, Dave Tyson wrote:
> > Running any of the utilities results in an error. e.g:
> >
> > hp-probe -bnet
> > /usr/pkg/bin/hp-probe:45: SyntaxWarning: invalid escape sequence
> > '\*'
> > ("", "<bus>: cups, usb\*, net, bt, fw, par (\*default) (Note: bt
> > and
> > fw not supported in this release.)", "option", False),
> > /usr/pkg/bin/hp-probe:49: SyntaxWarning: invalid escape sequence
> > '\*'
> > ("", "<filter list>: comma separated list of one or more of:
> > scan,
> > pcard, fax, copy, or none\*. (\*none is the default)", "option",
> > False),
> > Traceback (most recent call last):
> > File "/usr/pkg/bin/hp-probe", line 37, in <module>
> > from base.g import *
> > File "/usr/pkg/share/hplip/base/g.py", line 240, in <module>
> > sys_conf = SysConfig()
> > File "/usr/pkg/share/hplip/base/g.py", line 185, in __init__
> > ConfigBase.__init__(self, '/usr/pkg/etc/hp/hplip.conf')
> > ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "/usr/pkg/share/hplip/base/g.py", line 90, in __init__
> > self.read()
> > ~~~~~~~~~^^
> > File "/usr/pkg/share/hplip/base/g.py", line 131, in read
> > self.conf.readfp(fp)
> > ^^^^^^^^^^^^^^^^
> > AttributeError: 'ConfigParser' object has no attribute 'readfp'.
> > Did
> > you mean: 'read'?
>
> This patch looks relevant, can you try it?
>
> https://gitlab.archlinux.org/archlinux/packaging/packages/hplip/-/commit/694b4720d7802f6c679e810551de39d242b0b1b6
>
> Cheers,
> Thomas
OK that fixed the problem! Thanks for your input! The patch files I
used are below:
cat patch-base-g.py
--- base/g.py.orig 2026-08-26 21:19:35.112512950 +0100
+++ base/g.py 2026-08-26 21:50:35.927591526 +0100
@@ -128,7 +128,7 @@
try:
fp = open(self.filename, "r")
try:
- self.conf.readfp(fp)
+ self.conf.read_file(fp, self.filename)
except configparser.MissingSectionHeaderError:
print("")
log.error("Found No Section in %s. Please set the
http proxy for root and try again." % self.filename)
cat patch-ui5-devmgr5.py
--- ui5/devmgr5.py.orig 2019-12-10 05:00:27.000000000 +0000
+++ ui5/devmgr5.py 2026-08-26 21:53:35.027077054 +0100
@@ -1069,7 +1069,7 @@
hplip_conf = configparser.ConfigParser()
fp = open("/etc/hp/hplip.conf", "r")
- hplip_conf.readfp(fp)
+ hplip_conf.read_file(fp, "/etc/hp/hplip.conf")
fp.close()
try:
cat distinfo
$NetBSD: distinfo,v 1.45 2025/01/27 14:00:53 wiz Exp $
BLAKE2s (hplip-3.19.12.tar.gz) =
24ea25e3ac4ab3c521ae65acb27a88a65a164f3d93b088e33f13f97ee8ad6eae
SHA512 (hplip-3.19.12.tar.gz) =
5552cd717ae082ee55cdb77d79e8d035d8ecb7cf23c79d659fda43468d8ed414a33c4d8
69eab4ab83dee836f0d1cceb74c3c4a249e26f904a5ab2350e08a5677
Size (hplip-3.19.12.tar.gz) = 25676247 bytes
SHA1 (patch-ab) = 82b8ab80f778a6a31c1031688d9a16dbd4c55462
SHA1 (patch-ae) = c67ea6d640175a1f0518640f41b5fb58241430f1
SHA1 (patch-base-g.py) = 4629a7d4d4fa0858e6838c484444ddf1bb680b63
SHA1 (patch-configure.in) = d6e20d8d4f0b1042a32149eeca45d2ddc319f65f
SHA1 (patch-diagnose_queues.py) =
1f15cffafd602cc23bad0094fc5c485f24171797
SHA1 (patch-installer_dcheck.py) =
3bfe3bd15c0a3fb968e03aa8250dc7939bfe14d1
SHA1 (patch-io_hpmud_musb.h) = ad634f5a1f426877e1c88916b6468fcdb7598555
SHA1 (patch-prnt_hpcups_HPCupsFilter.cpp) =
19a26044ce24433b0188c243925b4028bc388f1a
SHA1 (patch-prnt_hpijs_context2.cpp) =
f81148c1c334a9074453b27ac055833cd1669bd0
SHA1 (patch-prnt_hpijs_foomatic-rip-hplip) =
cfec38607572af9536e7c21cfe2e491d07d3838d
SHA1 (patch-prnt_hpijs_ljzjscolor.cpp) =
5ca9c828ba4aff17a54a803d79c2dc169975d50c
SHA1 (patch-prnt_hpps_hppsfilter.c) =
5a3e7f3f5504fb88d58cf2b79fa138066859aa00
SHA1 (patch-protocol_discovery_mdns.c) =
41427f6a381f6cdaa2f1d8f5c050d6b51eeb412e
SHA1 (patch-scan.py) = 3ca05c3569ec78b5752af364e4d0728900076c3c
SHA1 (patch-scan_sane_OrbliteScan_LinuxCommon.h) =
d15937ef6381ad046009493b024d4edb8220933d
SHA1 (patch-scan_sane_OrbliteScan_MacCommon.h) =
4a96cddccdaf8878c33f5523d9bf0ca4951a76dd
SHA1 (patch-ui5-devmgr5.py) = 156afe36ebd4f86b7cb6fbc4b687e51da9214f14
One thing which has always caused a problem for me with this package is
that as installed it fails to find printers and I found the issue was
in mdns.py and slp.py.
Both these files contain a line:
s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF,
socket.inet_aton(intf) + socket.inet_aton('0.0.0.0'))
which causes problems. Replacing the line with:
s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF,
socket.inet_aton(intf))
fixes the problem. I have never bothered to report this - I just
manually patch the files in /usr/pkg/share/hplip/base. Maybe see if
anyone else sees/reports this problem...
Cheers.
Dave
Home |
Main Index |
Thread Index |
Old Index