Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37386775
en ru br
Репозитории ALT
S:3.23.8-alt1
5.1: 3.11.5-alt0.M51.1
4.1: 2.8.10-alt2.M41.1
4.0: 2.7.12-alt2.M40.1
+backports:2.8.10-alt2.M40.1
3.0:
+backports:1.6.6a-alt0.M30.4.1
www.altlinux.org/Changes

Группа :: Издательство
Пакет: hplip

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: hplip-hpsetup-noscanjets.patch
Скачать


diff --git a/setup.py b/setup.py
index 5d48aaa..88e663f 100755
--- a/setup.py
+++ b/setup.py
@@ -399,9 +399,19 @@ else: # INTERACTIVE_MODE
             #log.warning("Cannot setup fax - device does not have fax feature.")
             setup_fax = False
 
+        norm_model = models.normalizeModelName(model).lower()
+
+        # get out if the found model is standalone scanner, hp-setup is printer/fax setup tool
+        if 'scanjet' in norm_model:
+            log.error('The device {} is a standalone scanner. '
+                      'hp-setup is a printer/MFD setup tool, '
+                      'not scanner installation tool. '.format(model))
+            log.info(log.bold('Scanners do not need a installation, but they may '
+                              'require a binary plugin (install by \'hp-plugin -i\').'))
+            clean_exit(1)
+
         # ******************************* PLUGIN
 
-        norm_model = models.normalizeModelName(model).lower()
         plugin = mq.get('plugin', PLUGIN_NONE)
 
         if ignore_plugin_check is False and plugin > PLUGIN_NONE:
diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py
index c6f234b..a5041c1 100644
--- a/ui5/setupdialog.py
+++ b/ui5/setupdialog.py
@@ -1326,6 +1326,18 @@ class SetupDialog(QDialog, Ui_Dialog):
             self.mq = device.queryModelByURI(self.device_uri)
             back_end, is_hp, bus, model, serial, dev_file, host, zc, port = device.parseDeviceURI(self.device_uri)
             self.model = models.normalizeModelName(model).lower()
+            if 'scanjet' in self.model:
+                FailureUI(self,
+                          self.__tr('<b>The device {} is a standalone '
+                                    'scanner.</b> <p>\'hp-setup\' is a tool '
+                                    'for installing printers and multifunction '
+                                    'devices. Scanners supported by HPLIP '
+                                    'work out-of-the-box after HPLIP installation, '
+                                    'or they may require a binary plugin, which you '
+                                    'can install by \'hp-plugin -i\'.</p>'.format(model)))
+                self.displayPage(PAGE_DEVICES)
+                return
+
             self.showAddPrinterPage()
 
         elif p == PAGE_ADD_PRINTER:
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin