--- hplip-1.7.2/base/utils.py.ui-optional 2007-02-07 19:21:31.000000000 +0000 +++ hplip-1.7.2/base/utils.py 2007-06-11 14:29:16.000000000 +0100 @@ -644,6 +644,13 @@ log.error("PyQt not installed. GUI not available. Exiting.") return False + # hplip-gui sub-package (Fedora) + try: + import ui + except ImportError: + log.error("hplip-gui not installed. GUI not available. Exiting.") + return False + # check version of Qt qtMajor = int(qt.qVersion().split('.')[0]) --- hplip-2.7.10/unload.py.orig 2007-11-16 14:18:34.263284703 +0100 +++ hplip-2.7.10/unload.py 2007-11-16 14:20:46.243150346 +0100 @@ -702,17 +702,16 @@ if mode == GUI_MODE: if not prop.gui_build: - log.error("GUI mode disabled in build. Exiting.") - sys.exit(1) + log.warn("GUI mode disabled in build. Reverting to non-interactive mode.") + mode = NON_INTERACTIVE_MODE elif not os.getenv('DISPLAY'): - log.error("No display found. Exiting.") - sys.exit(1) + log.warn("No display found. Reverting to non-interactive mode.") + mode = NON_INTERACTIVE_MODE elif not utils.checkPyQtImport(): - log.error("PyQt init failed. Exiting.") - sys.exit(1) - + log.warn("PyQt init failed. Reverting to non-interactive mode.") + mode = NON_INTERACTIVE_MODE if mode == GUI_MODE: if not os.getenv('DISPLAY'): --- hplip-2.7.10/makecopies.py.orig 2007-11-16 14:21:42.234608500 +0100 +++ hplip-2.7.10/makecopies.py 2007-11-16 14:22:44.225151454 +0100 @@ -391,8 +391,9 @@ log.debug("reduction = %d" % reduction) log.debug("quality = %d" % quality) log.debug("fit_to_page = %d" % fit_to_page) - log.debug("max_reduction = %d" % max_reduction) - log.debug("max_enlargement = %d" % max_enlargement) +# it fails if max_reduction is undefined +# log.debug("max_reduction = %d" % max_reduction) +# log.debug("max_enlargement = %d" % max_enlargement) log.debug("scan_style = %d" % scan_style) update_queue = Queue.Queue()