Gentoo Archives: gentoo-user

From: Matthias Bethke <matthias@×××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] CUPS, HPLIP and BEH: solved?
Date: Mon, 26 Jun 2006 15:23:44
Message-Id: 20060626151240.GA13039@huxley
1 I just posted this on linuxprinting.foomatic.devel, but I guess some
2 here might have the same problem, namely that the HPLIP printer
3 drivers fail when combined with CUPS' Backend Error Handler:
4
5
6 To fully utilize the capabilities of our HP LaserJets I recently
7 installed HPLIP and was quite pissed off at the fact that it doesn't
8 work with BEH---I had almost forgotten how much work BEH had saved me
9 killing users' stuck print jobs and manually restarting the printer in
10 CUPS. So I started digging in the HPLIP sources today and got it working
11 with a trivial patch:
12
13 # diff /usr/share/hplip/base/device.py.orig
14 # /usr/share/hplip/base/device.py
15 47c47
16 < pat_deviceuri = re.compile(r"""(.*?):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*))(?:&port=(\d))?""", re.IGNORECASE)
17 ---
18 > pat_deviceuri = re.compile(r"""(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*))(?:&port=(\d))?""", re.IGNORECASE)
19
20 I.e. I just removed the first question mark in the RE to make it greedy
21 again. Now it seems to work fine with my printers.conf:
22 DeviceURI beh:/1/3/120/cupspykota:hp:/net/HP_LaserJet_4100_Series?ip=12.34.56.78
23
24 This hasn't been tested extensively yet so I may be missing something
25 and the patch might break more that it fixes on other configs, but maybe
26 some of you would like to give it a try. Comments welcome.
27
28 cheers!
29 Matthias
30 --
31 I prefer encrypted and signed messages. KeyID: FAC37665
32 Fingerprint: 8C16 3F0A A6FC DF0D 19B0 8DEF 48D9 1700 FAC3 7665

Replies

Subject Author
[gentoo-user] compilation option Pawel K <pawlaczus@×××××.com>