diff options
author | Didier Raboud <odyx@debian.org> | 2016-01-06 12:36:05 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2014-06-15 16:42:46 +1000 |
commit | 17ed8b458c64d84a7584c1e773b595bbf251c1dd (patch) | |
tree | 6f5502d6a6c444dff44d518e33530394140241c7 /installer | |
parent | 73367e4708f130e2d04b5b7c23f3224a8181d12d (diff) |
Imported Upstream version 3.15.4
Diffstat (limited to 'installer')
-rw-r--r-- | installer/core_install.py | 26 | ||||
-rw-r--r-- | installer/dcheck.py | 2 | ||||
-rw-r--r-- | installer/distros.dat | 338 | ||||
-rwxr-xr-x | installer/pluginhandler.py | 7 | ||||
-rwxr-xr-x | installer/text_install.py | 32 |
5 files changed, 369 insertions, 36 deletions
diff --git a/installer/core_install.py b/installer/core_install.py index 203d3c069..7baa94ff2 100644 --- a/installer/core_install.py +++ b/installer/core_install.py @@ -274,7 +274,6 @@ class CoreInstall(object): 'package_available' : TYPE_BOOL, 'package_arch' : TYPE_LIST, 'open_mdns_port' : TYPE_LIST, # command to use to open mdns multicast port 5353 - 'acl_rules' : TYPE_BOOL, # Use ACL uDEV rules (Ubuntu 9.10+) 'libdir_path' : TYPE_STRING, } @@ -318,7 +317,7 @@ class CoreInstall(object): } # dependencies - # 'name': (<required for option>, [<option list>], <display_name>, <check_func>, <runtime/compiletime>), ... + # 'name': (<required or option>, [<option list>], <display_name>, <check_func>, <runtime/compiletime>), ... # Note: any change to the list of dependencies must be reflected in base/distros.py self.dependencies = { # Required base packages @@ -880,20 +879,14 @@ class CoreInstall(object): log.debug("Trying to import 'reportlab'...") import reportlab - ver = reportlab.Version - try: - ver_f = float(ver) - except ValueError: - log.debug("Can't determine version.") - return False + ver = str(reportlab.Version) + log.debug("Version: %.1s" % ver) + if ver >= "2.0": + log.debug("Success.") + return True else: - log.debug("Version: %.1f" % ver_f) - if ver_f >= 2.0: - log.debug("Success.") - return True - else: - return False - + return False + except ImportError: log.debug("Failed.") return False @@ -1341,9 +1334,6 @@ class CoreInstall(object): if self.get_distro_ver_data('cups_path_with_bitness', False) and self.bitness == 64: configure_cmd += ' --with-cupsbackenddir=/usr/lib64/cups/backend --with-cupsfilterdir=/usr/lib64/cups/filter' - if self.get_distro_ver_data('acl_rules', False): - configure_cmd += ' --enable-udev-acl-rules' - if self.enable is not None: for c in self.enable: configuration[c] = True diff --git a/installer/dcheck.py b/installer/dcheck.py index 3e1522372..27d7b1a0a 100644 --- a/installer/dcheck.py +++ b/installer/dcheck.py @@ -308,7 +308,7 @@ def get_reportlab_version(): try: log.debug("Trying to import 'reportlab'...") import reportlab - ver = reportlab.Version + ver = str(reportlab.Version) except ImportError: return '-' else: diff --git a/installer/distros.dat b/installer/distros.dat index 1048ab350..bb8f8c8ac 100644 --- a/installer/distros.dat +++ b/installer/distros.dat @@ -408,6 +408,12 @@ packages=dbus-1-python3-devel,dbus-1-python3 [suse:12.3:python3-pil] packages=PKG_FROM_PIP:pillow +[suse:12.3:python3-reportlab] +packages=python3-reportlab + +[suse:12.3:python3-notify2] +packages=python3-notify2 + # **************************************** @@ -425,7 +431,7 @@ code_name=Harlequin supported=1 packaged_version=3.14.6 release_date=04.11.2014 -post_depend_cmd=su -c "zypper --non-interactive --no-gpg-checks in --force --auto-agree-with-licenses cups-filters-ghostscript", su -c"service cups restart" +post_depend_cmd=su -c "zypper --non-interactive --no-gpg-checks in --force --auto-agree-with-licenses cups-filters-ghostscript",su -c "service cups restart" scan_supported=1 fax_supported=1 pcard_supported=0 @@ -559,6 +565,12 @@ packages=dbus-1-python3-devel,dbus-1-python3 [suse:13.2:python3-pil] packages=python3-Pillow +[suse:13.2:python3-reportlab] +packages=python3-reportlab + +[suse:13.2:python3-notify2] +packages=python3-notify2 + # **************************************** @@ -2444,7 +2456,7 @@ packages=avahi # **************************************** [ubuntu] index=12 -versions=10.04,11.10,12.04,12.10,13.04,13.10,14.04,14.10 +versions=10.04,11.10,12.04,12.10,13.04,13.10,14.04,14.10,15.04 display_name=Ubuntu alt_names=kubuntu,edubuntu,xubuntu display=1 @@ -3141,7 +3153,7 @@ packages=python3-dev packages=python3-imaging [ubuntu:13.10:python3-reportlab] -packages= +packages=python3-reportlab # ******************** [ubuntu:14.04] @@ -3292,13 +3304,157 @@ packages=python3-dev packages=python3-pil [ubuntu:14.10:python3-reportlab] +packages=python3-reportlab + +# ******************** +[ubuntu:15.04] +code_name=Vivid +supported=1 +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/2015 +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:15.04:cups] +packages=libcups2 + +[ubuntu:15.04:cups-devel] +packages=libcups2-dev,cups-bsd,cups-client + +[ubuntu:15.04:gcc] +packages=build-essential + +[ubuntu:15.04:gs] +packages=ghostscript + +[ubuntu:15.04:libcrypto] +packages=openssl + +[ubuntu:15.04:libjpeg] +packages=libjpeg-dev + +[ubuntu:15.04:libnetsnmp-devel] +packages=libsnmp-dev,snmp-mibs-downloader + +[ubuntu:15.04:libpthread] +packages=build-essential + +[ubuntu:15.04:libtool] +packages=libtool,libtool-bin + +[ubuntu:15.04:libusb] +packages=libusb-1.0.0-dev + +[ubuntu:15.04:make] +packages=build-essential + +[ubuntu:15.04:pil] +packages=python-imaging + +[ubuntu:15.04:ppdev] packages= +commands=sudo modprobe ppdev,sudo cp -f /etc/modules /etc/modules.hplip,echo ppdev | sudo tee -a /etc/modules + +[ubuntu:15.04:pyqt] +packages=gtk2-engines-pixbuf,python-qt4 + +[ubuntu:15.04:python-devel] +packages=python-dev + +[ubuntu:15.04:pyqt4] +packages=gtk2-engines-pixbuf,python-qt4 + +[ubuntu:15.04:pyqt4-dbus] +packages=python-qt4-dbus + +#[ubuntu:15.04:python23] +#packages=python + +[ubuntu:15.04:python2X] +packages=python + +[ubuntu:15.04:reportlab] +packages=python-reportlab + +[ubuntu:15.04:sane] +packages=libsane + +[ubuntu:15.04:sane-devel] +packages=libsane-dev + +[ubuntu:15.04:scanimage] +packages=sane-utils + +[ubuntu:15.04:xsane] +packages=gtk2-engines-pixbuf,xsane + +[ubuntu:15.04:python-dbus] +packages=python-dbus,python-gobject + +[ubuntu:15.04:dbus] +packages=libdbus-1-dev + +[ubuntu:15.04:cups-image] +packages=libcupsimage2-dev + +[ubuntu:15.04:cups-ddk] +packages=cups + +[ubuntu:15.04:policykit] +packages=policykit-1,policykit-1-gnome + +[ubuntu:15.04:python-notify] +packages=python-notify + +[ubuntu:15.04:network] +packages=wget + +[ubuntu:15.04:avahi-utils] +packages=avahi-utils + +[ubuntu:15.04:python3-notify2] +packages=python3-notify2 + +[ubuntu:15.04:python3-pyqt4-dbus] +packages=python3-dbus.mainloop.qt + +[ubuntu:15.04:python3-pyqt4] +packages=python3-pyqt4,gtk2-engines-pixbuf + +[ubuntu:15.04:python3-dbus] +packages=python3-dbus,python3-gi + +[ubuntu:15.04:python3-xml] +packages=python3-lxml + +[ubuntu:15.04:python3-devel] +packages=python3-dev + +[ubuntu:15.04:python3-pil] +packages=python3-pil + +[ubuntu:15.04:python3-reportlab] +packages=python3-reportlab # **************************************** [debian] index=2 -versions=6.0,6.0.1,6.0.2,6.0.3,6.0.4,6.0.5,6.0.6,6.0.7,6.0.8,6.0.9,6.0.10,7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8 +versions=6.0,6.0.1,6.0.2,6.0.3,6.0.4,6.0.5,6.0.6,6.0.7,6.0.8,6.0.9,6.0.10,7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,8.0 display_name=Debian alt_names= display=1 @@ -3615,6 +3771,8 @@ packages=python3-dev [debian:7.0:python3-pil] packages=PKG_FROM_PIP:pillow +[debian:7.0:python3-reportlab] +packages=python3-reportlab # **************************************** @@ -3644,6 +3802,158 @@ same_as_version=7.0 # ********************* +[debian:8.0] +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.15.2 +release_date=04/05/2015 +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.0:cups] +packages=cups,libcups2 + +[debian:8.0:cups-devel] +packages=libcups2-dev,cups-bsd,cups-client + +[debian:8.0:gcc] +packages=g++ + +[debian:8.0:gs] +packages=ghostscript,ghostscript-cups,ghostscript-x + +[debian:8.0:libcrypto] +packages=libssl-dev + +[debian:8.0:libjpeg] +packages=libjpeg62-turbo-dev + +[debian:8.0:libnetsnmp-devel] +packages=libsnmp-dev + +[debian:8.0:libpthread] +packages=libc6 + +[debian:8.0:libtool] +packages=libtool,libtool-bin + +[debian:8.0:libusb] +packages=libusb-1.0.0-dev + +[debian:8.0:make] +packages=make + +[debian:8.0:pil] +packages=python-imaging + +[debian:8.0: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.0:pyqt] +packages=python-qt3 + +[debian:8.0:python-devel] +packages=python-dev + +[debian:8.0:pyqt4] +packages=python-qt4 + +[debian:8.0:pyqt4-dbus] +packages=python-qt4-dbus + +[debian:8.0:python23] +packages=python + +[debian:8.0:python2X] +packages=python + +[debian:8.0:reportlab] +packages=python-reportlab + +[debian:8.0:sane] +packages=sane + +[debian:8.0:sane-devel] +packages=libsane-dev + +[debian:8.0:scanimage] +packages=sane-utils + +[debian:8.0:xsane] +packages=xsane + +[debian:8.0:cups-ddk] +packages= + +[debian:8.0:python-dbus] +packages=python-dbus,python-gobject + +[debian:8.0:dbus] +packages=libdbus-1-dev + +[debian:8.0:python-ctypes] +packages=python-ctypes + +[debian:8.0:cups-image] +packages=libcupsimage2,libcupsimage2-dev + +[debian:8.0:policykit] +packages=policykit-1,policykit-1-gnome + +[debian:8.0:python-notify] +packages=python-notify + +[debian:8.0:network] +packages=wget + +[debian:8.0:avahi-utils] +packages=avahi-utils + +[debian:8.0:gtk] +packages=libcanberra-gtk-module + +[debian:8.0:python3-notify2] +packages=python3-notify2 + +[debian:8.0:python3-pyqt4-dbus] +packages=python3-dbus.mainloop.qt + +[debian:8.0:python3-pyqt4] +packages=python3-pyqt4,gtk2-engines-pixbuf + +[debian:8.0:python3-dbus] +packages=python3-dbus,python3-gi + +[debian:8.0:python3-xml] +packages=python3-lxml + +[debian:8.0:python3-devel] +packages=python3-dev + +[debian:8.0:python3-pil] +packages=python3-pil + +[debian:8.0:python3-reportlab] +packages=python3-reportlab +# ********************* + [xandros] index=13 versions=any @@ -5639,7 +5949,7 @@ packages=avahi # **************************************** [linuxmint] index=22 -versions=13,14,15,16,17 +versions=13,14,15,16,17,17.1 display_name=Linux Mint alt_names=mint, mint linux display=1 @@ -6216,10 +6526,6 @@ packages=wget [linuxmint:17:avahi-utils] packages=avahi-utils - -[linuxmint:17:python3-notify2] -packages=python3-notify2 - [linuxmint:17:python3-pyqt4-dbus] packages=python3-dbus.mainloop.qt @@ -6238,6 +6544,20 @@ packages=python3-dev [linuxmint:17:python3-pil] packages=python3-pil +[linuxmint:17:python3-reportlab] +packages=python3-reportlab + +[linuxmint:17:python3-notify2] +packages=python3-notify2 + + +# **************************************** + +[linuxmint:17.1] +code_name=Rebecca +packaged_version=3.14.3 +release_date=29/11/2014 +same_as_version=17 # **************************************** diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py index 9bd231401..7a922bb31 100755 --- a/installer/pluginhandler.py +++ b/installer/pluginhandler.py @@ -91,6 +91,8 @@ class PluginHandle(object): processor = utils.getProcessor() if processor == 'power_machintosh': ARCH = 'ppc' + elif (processor == 'armv6l' or processor == 'armv7l' or processor == 'aarch64' or processor == 'aarch32'): + ARCH = 'arm%d' % BITNESS else: ARCH = 'x86_%d' % BITNESS @@ -345,10 +347,11 @@ class PluginHandle(object): cwd = os.getcwd() os.chdir(self.__plugin_path) + exec_str = sys.executable if mode == GUI_MODE: - cmd = "sh %s --keep --nox11 -- -u" % plugin_file + cmd = "sh %s --keep --nox11 -- -u %s" % (plugin_file, exec_str) else: - cmd = "sh %s --keep --nox11 -- -i" % plugin_file + cmd = "sh %s --keep --nox11 -- -i %s" % (plugin_file, exec_str) if os_utils.execute(cmd) == 0: result = True diff --git a/installer/text_install.py b/installer/text_install.py index 3404b5702..49aaa1179 100755 --- a/installer/text_install.py +++ b/installer/text_install.py @@ -375,12 +375,34 @@ def start(language, auto=True, test_depends=False, package_mgr_cmd = core.get_distro_data('package_mgr_cmd') depends_to_install = [] depends_to_install_using_pip = [] + + if num_req_missing or num_opt_missing: + tui.title("MISSING DEPENDENCIES") + log.info("Following dependencies are not installed. HPLIP will not work if all REQUIRED dependencies are not installed and some of the HPLIP features will not work if OPTIONAL dependencies are not installed.") + + log.info("%-20s %-20s %-20s"%( "Package-Name", "Component", "Required/Optional")) + for d in core.dependencies: + if (not core.have_dependencies[d]): + if core.dependencies[d][0]: + deptype = "REQUIRED" + else: + deptype = "OPTIONAL" + + log.info("%-20s %-20s %-20s" %(d, core.dependencies[d][1][0], deptype)) + + ok, ans = tui.enter_yes_no("Do you want to install these missing dependencies") + if not ok: + sys.exit(0) + + if not ans and num_req_missing: + log.error("Installation can not continue because all REQUIRED dependencies are not installed.") + sys.exit(0) + + if num_req_missing: tui.title("INSTALL MISSING REQUIRED DEPENDENCIES") - - log.warn("There are %d missing REQUIRED dependencies." % num_req_missing) log.notice("Installation of dependencies requires an active internet connection.") - + for depend, desc, option in core.missing_required_dependencies(): log.warning("Missing REQUIRED dependency: %s (%s)" % (depend, desc)) if Fedora_Py3: # Workaround due to incomplete Python3 support in Linux distros. @@ -431,8 +453,6 @@ def start(language, auto=True, test_depends=False, # if num_opt_missing: tui.title("INSTALL MISSING OPTIONAL DEPENDENCIES") - log.warn("There are %d missing OPTIONAL dependencies." % num_opt_missing) - log.notice("Installation of dependencies requires an active internet connection.") for depend, desc, required_for_opt, opt in core.missing_optional_dependencies(): @@ -626,7 +646,7 @@ def start(language, auto=True, test_depends=False, log.error("Package install command failed with error code %d" % status) if PY3: - log.notice("Some installation may not get installed on python3 due to distro incompatibilites") + log.notice("Some packages may not get installed on python3 due to distro incompatibilites") log.info("") log.notice("Please check for more information at http://hplipopensource.com/node/369") ok, ans = tui.enter_yes_no("Would you like to retry installing the missing package(s)") |