Package: hplip / 3.12.6-3.1+deb7u1

hp-check_debian.dpatch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/installer/core_install.py
+++ b/installer/core_install.py
@@ -1160,6 +1160,22 @@
                 if hpaiomatched:
                     found = True
                     break
+
+        # Debian/ Ubuntu place hpaio in /etc/sane.d/dll.d/hplip, so lets check there too
+        if not found:
+            log.debug("Checking for 'hpaio' in '/etc/sane.d/dll.d/hplip'...")
+            try:
+                f = file('/etc/sane.d/dll.d/hplip', 'r')
+            except IOError:
+                log.error("'/etc/sane.d/dll.d/hplip' not found.")
+            else:
+                for line in f:
+                    lineNoSpace = re.sub(r'\s', '', line) 
+                    hpaiomatched=re.match('hpaio',lineNoSpace)
+                    if hpaiomatched:
+                        found = True
+                        break
+
         return found
 
     def update_hpaio(self):