diff options
author | Julian Andres Klode <jak@debian.org> | 2016-05-06 14:27:25 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-05-06 14:27:25 +0200 |
commit | 66cd3216fa88509be6aeabd4a020e8a84145d0c7 (patch) | |
tree | a2d23d8509ee324fe17f883aa4a81577910e1940 /installer | |
parent | f5c6afb8deed038452916505b5f4f415329c1350 (diff) |
Imported Upstream version 3.16.5
Diffstat (limited to 'installer')
-rw-r--r-- | installer/core_install.py | 68 | ||||
-rw-r--r-- | installer/dcheck.py | 14 | ||||
-rw-r--r-- | installer/distros.dat | 321 | ||||
-rwxr-xr-x | installer/text_install.py | 21 |
4 files changed, 406 insertions, 18 deletions
diff --git a/installer/core_install.py b/installer/core_install.py index 0f1807f28..bb9bf8488 100644 --- a/installer/core_install.py +++ b/installer/core_install.py @@ -174,6 +174,8 @@ PYTHON_STR = "Python 2.2 or greater - Python programming language" PYNTF_STR = "Python libnotify - Python bindings for the libnotify Desktop notifications" QT4DBUS_STR = "PyQt 4 DBus - DBus Support for PyQt4" QT4_STR = "PyQt 4- Qt interface for Python (for Qt version 4.x)" +QT5DBUS_STR = "PyQt 5 DBus - DBus Support for PyQt5" +QT5_STR = "PyQt 5- Qt interface for Python (for Qt version 4.x)" PYDBUS_STR = "Python DBus - Python bindings for DBus" PYXML_STR = "Python XML libraries" PY_DEV_STR = "Python devel - Python development files" @@ -215,7 +217,8 @@ else: # using Python 2.5+ class CoreInstall(object): - def __init__(self, mode=MODE_INSTALLER, ui_mode=INTERACTIVE_MODE, ui_toolkit='qt4'): + def __init__(self, mode=MODE_INSTALLER, ui_mode=INTERACTIVE_MODE, + ui_toolkit='qt4'): os.umask(0o022) self.mode = mode self.ui_mode = ui_mode @@ -289,7 +292,7 @@ class CoreInstall(object): # 'name': ('description', [<option list>]) self.components = { 'hplip': ("HP Linux Imaging and Printing System", ['base', 'network', 'gui_qt4', - 'fax', 'scan', 'docs']), + 'gui_qt5', 'fax', 'scan', 'docs']), } self.selected_component = 'hplip' @@ -300,6 +303,8 @@ class CoreInstall(object): 'base': (True, 'Required HPLIP base components (including hpcups)', []), # HPLIP 'network' : (False, 'Network/JetDirect I/O', []), 'gui_qt4' : (False, 'Graphical User Interfaces (Qt4)', []), + 'gui_qt5' : (False, 'Graphical User Interfaces (Qt5)', []), + 'gui_qt' : (False, 'Graphical User Interfaces (Qt)', []), 'fax' : (False, 'PC Send Fax support', []), 'scan': (False, 'Scanning support', []), 'docs': (False, 'HPLIP documentation (HTML)', []), @@ -314,7 +319,9 @@ class CoreInstall(object): self.selected_options = { 'base': True, 'network': True, - 'gui_qt4': True, + 'gui_qt4': False, + 'gui_qt5': False, + 'gui_qt': False, 'fax': True, 'scan': True, 'docs': True, @@ -356,7 +363,7 @@ class CoreInstall(object): 'dbus': (True, ['fax'], DBUS_STR, self.check_dbus, DEPENDENCY_RUN_AND_COMPILE_TIME, '-','dbus-daemon --version', EXTERNALDEP), # Required and optional qt4 GUI packages - 'policykit': (False, ['gui_qt4'], POLKIT_STR, self.check_policykit, DEPENDENCY_RUN_TIME,'-','pkexec --version', EXTERNALDEP), # optional for non-sudo behavior of plugins (only optional for Qt4 option) + 'policykit': (False, ['gui_qt4', 'gui_qt5'], POLKIT_STR, self.check_policykit, DEPENDENCY_RUN_TIME,'-','pkexec --version', EXTERNALDEP), # optional for non-sudo behavior of plugins (only optional for Qt4 option) # Required network I/O packages 'libnetsnmp-devel': (True, ['network'], SNMP_DEV_STR, self.check_libnetsnmp, DEPENDENCY_RUN_AND_COMPILE_TIME,'5.0.9','net-snmp-config --version', GENERALDEP), @@ -364,12 +371,14 @@ class CoreInstall(object): 'network': (False, ['network'], NETWORK_STR, self.check_wget, DEPENDENCY_RUN_TIME,'-','wget --version', EXTERNALDEP), 'avahi-utils': (False, ['network'], AVAHI_STR, self.check_avahi_utils, DEPENDENCY_RUN_TIME, '-','avahi-browse --version', EXTERNALDEP), } - + python2_dep = { 'python2X': (True, ['base'], PYTHON_STR, self.check_python, DEPENDENCY_RUN_AND_COMPILE_TIME,'2.2','python --version',GENERALDEP), - 'python-notify' : (False, ['gui_qt4'], PYNTF_STR, self.check_pynotify, DEPENDENCY_RUN_TIME,'-','python-notify --version',GENERALDEP), # Optional for libnotify style popups from hp-systray + 'python-notify' : (False, ['gui_qt5', 'gui_qt4'], PYNTF_STR, self.check_pynotify, DEPENDENCY_RUN_TIME,'-','python-notify --version',GENERALDEP), # Optional for libnotify style popups from hp-systray 'pyqt4-dbus' : (True, ['gui_qt4'], QT4DBUS_STR, self.check_pyqt4_dbus, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), 'pyqt4': (True, ['gui_qt4'], QT4_STR, self.check_pyqt4, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), # PyQt 4.x ) + 'pyqt5-dbus' : (True, ['gui_qt5'], QT5DBUS_STR, self.check_pyqt5_dbus, DEPENDENCY_RUN_TIME,'5.0','FUNC#get_pyQt5_version', GENERALDEP), + 'pyqt5': (True, ['gui_qt5'], QT5_STR, self.check_pyqt5, DEPENDENCY_RUN_TIME,'5.0','FUNC#get_pyQt5_version', GENERALDEP), # PyQt 5.x ) 'python-dbus': (True, ['fax'], PYDBUS_STR, self.check_python_dbus, DEPENDENCY_RUN_TIME,'0.80.0','FUNC#get_python_dbus_ver', GENERALDEP), 'python-xml' : (True, ['base'], PYXML_STR, self.check_python_xml, DEPENDENCY_RUN_TIME,'-','FUNC#get_python_xml_version',GENERALDEP), 'python-devel' : (True, ['base'], PY_DEV_STR, self.check_python_devel, DEPENDENCY_COMPILE_TIME,'2.2','python --version',GENERALDEP), @@ -381,9 +390,11 @@ class CoreInstall(object): python3_dep = { 'python3X': (True, ['base'], PYTHON_STR, self.check_python, DEPENDENCY_RUN_AND_COMPILE_TIME,'2.2','python3 --version',GENERALDEP), - 'python3-notify2' : (False, ['gui_qt4'], PYNTF_STR, self.check_pynotify, DEPENDENCY_RUN_TIME,'-','python-notify --version',GENERALDEP), # Optional for libnotify style popups from hp-systray - 'python3-pyqt4-dbus': (False, ['gui_qt4'], QT4DBUS_STR, self.check_pyqt4_dbus, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), + 'python3-notify2' : (False, ['gui_qt5', 'gui_qt4'], PYNTF_STR, self.check_pynotify, DEPENDENCY_RUN_TIME,'-','python-notify --version',GENERALDEP), # Optional for libnotify style popups from hp-systray + 'python3-pyqt4-dbus': (False, ['gui_qt4'], QT4DBUS_STR, self.check_pyqt4_dbus, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), 'python3-pyqt4': (True, ['gui_qt4'], QT4_STR, self.check_pyqt4, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), # PyQt 4.x ) + 'python3-pyqt5-dbus': (False, ['gui_qt5'], QT5DBUS_STR, self.check_pyqt5_dbus, DEPENDENCY_RUN_TIME,'5.0','FUNC#get_pyQt5_version', GENERALDEP), + 'python3-pyqt5': (True, ['gui_qt5'], QT5_STR, self.check_pyqt5, DEPENDENCY_RUN_TIME,'5.0','FUNC#get_pyQt5_version', GENERALDEP), # PyQt 5.x ) 'python3-dbus': (True, ['fax'], PYDBUS_STR, self.check_python_dbus, DEPENDENCY_RUN_TIME,'0.80.0','FUNC#get_python_dbus_ver', GENERALDEP), 'python3-xml' : (True, ['base'], PYXML_STR, self.check_python_xml, DEPENDENCY_RUN_TIME,'-','FUNC#get_python_xml_version',GENERALDEP), 'python3-devel' : (True, ['base'], PY_DEV_STR, self.check_python_devel, DEPENDENCY_COMPILE_TIME,'2.2','python3 --version',GENERALDEP), @@ -409,6 +420,7 @@ class CoreInstall(object): self.version_func={ 'FUNC#get_python_dbus_ver':get_python_dbus_ver, + 'FUNC#get_pyQt5_version':get_pyQt5_version, 'FUNC#get_pyQt4_version':get_pyQt4_version, 'FUNC#get_pyQt_version':get_pyQt_version, 'FUNC#get_reportlab_version':get_reportlab_version, @@ -686,28 +698,38 @@ class CoreInstall(object): self.native_cups = self.get_distro_ver_data('native_cups', False) # Adjust required flag based on the distro ver ui_toolkit value - ui_toolkit = self.get_distro_ver_data('ui_toolkit', 'qt4').lower() + ui_toolkit = self.get_distro_ver_data('ui_toolkit', 'qt4').lower() if ui_toolkit == 'qt4': log.debug("Default UI toolkit: Qt4") self.ui_toolkit = 'qt4' self.selected_options['gui_qt4'] = True + elif ui_toolkit == 'qt5': + log.debug("Default UI toolkit: Qt5") + self.ui_toolkit = 'qt5' + self.selected_options['gui_qt5'] = True # todo: gtk - else: - self.selected_options['gui_qt4'] = False - # Override with --qt4 command args if self.enable is not None: if 'qt4' in self.enable: log.debug("User selected UI toolkit: Qt4") self.ui_toolkit = 'qt4' self.selected_options['gui_qt4'] = True + elif 'qt5' in self.enable: + log.debug("User selected UI toolkit: Qt5") + self.ui_toolkit = 'qt5' + self.selected_options['gui_qt5'] = True + if self.disable is not None: if 'qt4' in self.disable: log.debug("User deselected UI toolkit: Qt4") self.selected_options['gui_qt4'] = False + elif 'qt5' in self.disable: + log.debug("User deselected UI toolkit: Qt5") + self.selected_options['gui_qt5'] = False + def __fixup_data(self, key, data): @@ -962,7 +984,17 @@ class CoreInstall(object): return False else: return True + else: + return False + def check_pyqt5(self): + if self.ui_toolkit == 'qt5': + try: + import PyQt5 + except ImportError: + return False + else: + return True else: return False @@ -978,6 +1010,17 @@ class CoreInstall(object): else: return False + def check_pyqt5_dbus(self): + if self.ui_toolkit == 'qt5': + try: + from dbus.mainloop.pyqt5 import DBusQtMainLoop + except ImportError: + return False + else: + return True + else: + return False + def check_pyqt(self): if self.ui_toolkit == 'qt3': try: @@ -1291,6 +1334,7 @@ class CoreInstall(object): configuration['fax-build'] = self.selected_options['fax'] and dbus_avail configuration['dbus-build'] = dbus_avail configuration['qt4'] = self.selected_options['gui_qt4'] + configuration['qt5'] =self.selected_options['gui_qt5'] configuration['scan-build'] = self.selected_options['scan'] configuration['doc-build'] = self.selected_options['docs'] configuration['policykit'] = self.selected_options['policykit'] diff --git a/installer/dcheck.py b/installer/dcheck.py index ab5d3bbe9..a4db82be9 100644 --- a/installer/dcheck.py +++ b/installer/dcheck.py @@ -304,6 +304,20 @@ def get_pyQt4_version(): ver = QtCore.PYQT_VERSION_STR return ver + +def get_pyQt5_version(): + log.debug("Checking PyQt 5.x version...") + ver ='-' + # PyQt 5 + try: + import PyQt5 + except ImportError: + ver='-' + else: + from PyQt5 import QtCore + ver = QtCore.PYQT_VERSION_STR + return ver + def get_reportlab_version(): try: log.debug("Trying to import 'reportlab'...") diff --git a/installer/distros.dat b/installer/distros.dat index 8d180dcc0..6df8c755e 100644 --- a/installer/distros.dat +++ b/installer/distros.dat @@ -3629,15 +3629,163 @@ packages=python3-dev,python3.4-dev,python3.5-dev [ubuntu:16.04] code_name=Xenial -packaged_version=3.16.2 -release_date=21/04/2016 supported=1 -same_as_version=15.04 +scan_supported=1 +fax_supported=1 +pcard_supported=1 +network_supported=1 +parallel_supported=1 +usb_supported=1 +packaged_version=3.15.2 +release_date=17/04/2016 +notes=Enable the universe/multiverse repositories. Also be sure you are using the Ubuntu "Main" Repositories. See: https://help.ubuntu.com/community/Repositories/Ubuntu for more information. Disable the CD-ROM/DVD source if you do not have the Ubuntu installation media inserted in the drive. +ppd_install=drv +udev_mode_fix=1 +ppd_dir=/usr/share/ppd/HP +fix_ppd_symlink=0 +drv_dir=/usr/share/cups/drv/HP +ui_toolkit=qt4 +native_cups=1 +acl_rules=1 + +libdir_path=/usr/lib +[ubuntu:16.04:cups] +packages=libcups2 + +[ubuntu:16.04:cups-devel] +packages=libcups2-dev,cups-bsd,cups-client + +[ubuntu:16.04:gcc] +packages=build-essential + +[ubuntu:16.04:gs] +packages=ghostscript + +[ubuntu:16.04:libcrypto] +packages=openssl + +[ubuntu:16.04:libjpeg] +packages=libjpeg-dev + +[ubuntu:16.04:libnetsnmp-devel] +packages=libsnmp-dev,snmp-mibs-downloader + +[ubuntu:16.04:libpthread] +packages=build-essential + +[ubuntu:16.04:libtool] +packages=libtool,libtool-bin + +[ubuntu:16.04:libusb] +packages=libusb-1.0.0-dev + +[ubuntu:16.04:make] +packages=build-essential + +[ubuntu:16.04:pil] +packages=python-imaging + +[ubuntu:16.04:ppdev] +packages= +commands=sudo modprobe ppdev,sudo cp -f /etc/modules /etc/modules.hplip,echo ppdev | sudo tee -a /etc/modules + +[ubuntu:16.04:pyqt] +packages=gtk2-engines-pixbuf,python-qt4 + +[ubuntu:16.04:python-devel] +packages=python-dev + +[ubuntu:16.04:pyqt4] +packages=gtk2-engines-pixbuf,python-qt4 + +[ubuntu:16.04:pyqt4-dbus] +packages=python-qt4-dbus + +[ubuntu:16.04:pyqt5] +packages=gtk2-engines-pixbuf,python-pyqt5 + +[ubuntu:16.04:pyqt5-dbus] +packages=python-dbus.mainloop.pyqt5 + +#[ubuntu:16.04:python23] +#packages=python + +[ubuntu:16.04:python2X] +packages=python + +[ubuntu:16.04:reportlab] +packages=python-reportlab + +[ubuntu:16.04:sane] +packages=libsane + +[ubuntu:16.04:sane-devel] +packages=libsane-dev + +[ubuntu:16.04:scanimage] +packages=sane-utils + +[ubuntu:16.04:xsane] +packages=gtk2-engines-pixbuf,xsane + +[ubuntu:16.04:python-dbus] +packages=python-dbus,python-gobject + +[ubuntu:16.04:dbus] +packages=libdbus-1-dev + +[ubuntu:16.04:cups-image] +packages=libcupsimage2-dev + +[ubuntu:16.04:cups-ddk] +packages=cups + +[ubuntu:16.04:policykit] +packages=policykit-1,policykit-1-gnome + +[ubuntu:16.04:python-notify] +packages=python-notify + +[ubuntu:16.04:network] +packages=wget + +[ubuntu:16.04:avahi-utils] +packages=avahi-utils + +[ubuntu:16.04:python3-notify2] +packages=python3-notify2 + +[ubuntu:16.04:python3-pyqt4-dbus] +packages=python3-dbus.mainloop.qt + +[ubuntu:16.04:python3-pyqt4] +packages=python3-pyqt4,gtk2-engines-pixbuf + +[ubuntu:16.04:python3-pyqt5-dbus] +packages=python3-dbus.mainloop.pyqt5 + +[ubuntu:16.04:python3-pyqt5] +packages=python3-pyqt5,gtk2-engines-pixbuf + +[ubuntu:16.04:python3-dbus] +packages=python3-dbus,python3-gi + +[ubuntu:16.04:python3-xml] +packages=python3-lxml + +[ubuntu:16.04:python3-devel] +packages=python3-dev + +[ubuntu:16.04:python3-pil] +packages=python3-pil + +[ubuntu:16.04:python3-reportlab] +packages=python3-reportlab # **************************************** [debian] index=2 -versions=7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8.0,8.1,8.2,8.3 +versions=7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4 display_name=Debian alt_names= display=1 @@ -4157,6 +4305,171 @@ same_as_version=8.0 # ********************* +[debian:8.4] +code_name=Jessie +supported=1 +scan_supported=1 +fax_supported=1 +pcard_supported=1 +network_supported=1 +parallel_supported=1 +usb_supported=1 +packaged_version=3.14.6 +release_date=04/05/2016 +notes=NOTE: Disable the CD Sources in your apt sources.list or the install will fail and hang. +ppd_install=drv +udev_mode_fix=1 +ppd_dir=/usr/share/ppd/HP +fix_ppd_symlink=0 +drv_dir=/usr/share/cups/drv/HP +ui_toolkit=qt4 +native_cups=1 +policykit=0 + +# This libdir_path will be used only for 64 bit machine. +libdir_path=/usr/lib/x86_64-linux-gnu + +[debian:8.4:cups] +packages=cups,libcups2 + +[debian:8.4:cups-devel] +packages=libcups2-dev,cups-bsd,cups-client + +[debian:8.4:gcc] +packages=g++ + +[debian:8.4:gs] +packages=ghostscript,ghostscript-cups,ghostscript-x + +[debian:8.4:libcrypto] +packages=libssl-dev + +[debian:8.4:libjpeg] +packages=libjpeg62-turbo-dev + +[debian:8.4:libnetsnmp-devel] +packages=libsnmp-dev,snmp + +[debian:8.4:libpthread] +packages=libc6 + +[debian:8.4:libtool] +packages=libtool,libtool-bin + +[debian:8.4:libusb] +packages=libusb-1.0.0-dev + +[debian:8.4:make] +packages=make + +[debian:8.4:pil] +packages=python-imaging + +[debian:8.4:ppdev] +packages= +commands=su -c "modprobe ppdev",su -c cp -f /etc/modules /etc/modules.hplip,echo ppdev | su -c tee -a /etc/modules + +[debian:8.4:pyqt] +packages=python-qt3 + +[debian:8.4:python-devel] +packages=python-dev + +[debian:8.4:pyqt4] +packages=python-qt4 + +[debian:8.4:pyqt4-dbus] +packages=python-qt4-dbus + +[debian:8.4:python23] +packages=python + +[debian:8.4:python2X] +packages=python + +[debian:8.4:reportlab] +packages=python-reportlab + +[debian:8.4:sane] +packages=sane + +[debian:8.4:sane-devel] +packages=libsane-dev + +[debian:8.4:scanimage] +packages=sane-utils + +[debian:8.4:xsane] +packages=xsane + +[debian:8.4:cups-ddk] +packages= + +[debian:8.4:python-dbus] +packages=python-dbus,python-gobject + +[debian:8.4:dbus] +packages=libdbus-1-dev + +[debian:8.4:python-ctypes] +packages=python-ctypes + +[debian:8.4:cups-image] +packages=libcupsimage2,libcupsimage2-dev + +[debian:8.4:policykit] +packages=policykit-1,policykit-1-gnome + +[debian:8.4:python-notify] +packages=python-notify + +[debian:8.4:network] +packages=wget + +[debian:8.4:avahi-utils] +packages=avahi-utils + +[debian:8.4:gtk] +packages=libcanberra-gtk-module + +[debian:8.4:python3-notify2] +packages=python3-notify2 + +[debian:8.4:python3-pyqt4-dbus] +packages=python3-dbus.mainloop.qt + +[debian:8.4:python3-pyqt4] +packages=python3-pyqt4,gtk2-engines-pixbuf + +[debian:8.4:python3-dbus] +packages=python3-dbus,python3-gi + +[debian:8.4:python3-xml] +packages=python3-lxml + +[debian:8.4:python3-devel] +packages=python3-dev + +[debian:8.4:python3-pil] +packages=python3-pil + +[debian:8.4:python3-reportlab] +packages=python3-reportlab + +[debian:8.4:python3-pyqt5-dbus] +packages=python3-dbus.mainloop.pyqt5 + +[debian:8.4:python3-pyqt5] +packages=python3-pyqt5,gtk2-engines-pixbuf + +[debian:8.4:pyqt5] +packages=gtk2-engines-pixbuf,python-pyqt5 + +[debian:8.4:pyqt5-dbus] +packages=python-dbus.mainloop.pyqt5 + +# ********************* + [xandros] index=13 versions=any diff --git a/installer/text_install.py b/installer/text_install.py index 99446339b..32fa00926 100755 --- a/installer/text_install.py +++ b/installer/text_install.py @@ -399,13 +399,28 @@ def start(language, auto=True, test_depends=False, log.info("%-20s %-20s %-20s"%( "Package-Name", "Component", "Required/Optional")) for d in core.dependencies: - if (not core.have_dependencies[d]): + comp_list = core.dependencies[d][1] + comp_tuple = [(x, core.selected_options[x]) for x in comp_list if + core.selected_options[x]] + + # if not core.have_dependencies[d] and core.selected_options[core.dependencies[d][1][0]]: + # if core.dependencies[d][0]: + # deptype = "REQUIRED" + # else: + # deptype = "OPTIONAL" + + # log.info("%-20s %-20s %-20s" %(d, + # core.dependencies[d][1][0], deptype)) + + if not core.have_dependencies[d] and comp_tuple and comp_tuple[0][1]: if core.dependencies[d][0]: deptype = "REQUIRED" else: deptype = "OPTIONAL" - log.info("%-20s %-20s %-20s" %(d, core.dependencies[d][1][0], deptype)) + log.info("%-20s %-20s %-20s" %(d, comp_tuple[0][0], + deptype)) + ok, ans = tui.enter_yes_no("Do you want to install these missing dependencies") if not ok: @@ -996,6 +1011,8 @@ def start(language, auto=True, test_depends=False, setup_cmd = 'hp-setup -u' if os_utils.execute(setup_cmd) != 0: log.error("hp-setup failed. Please run hp-setup manually.") + #if not services.run_hp_tools_with_auth('hp-setup', core.passwordObj): + #log.error("hp-setup failed. Please run hp-setup manually.") elif ok and choice == 'i': setup_cmd = 'hp-setup -i' |