Commit 0860e93b authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 3.15.6

parent 17ed8b45

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -59,9 +59,9 @@ else
libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
endif
# The following is a interlibrary dependency that must be compiled first.
libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl
libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS)
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
endif # SCAN_BUILD
# hpmud library
......
......@@ -329,6 +329,7 @@ libhpmud_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
am__DEPENDENCIES_1 =
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_DEPENDENCIES = \
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@ libhpip.la libhpmud.la \
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@ libhpipp.la \
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@ $(am__DEPENDENCIES_1)
am__libsane_hpaio_la_SOURCES_DIST = scan/sane/hpaio.c \
scan/sane/mfpdtf.c scan/sane/pml.c scan/sane/scl.c \
......@@ -1057,6 +1058,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-laserjet_4v-ps.ppd.gz \
ppd/hpijs/hp-deskjet_d730-hpijs.ppd.gz \
ppd/hpijs/hp-officejet_6150_series-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_1120-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_3630_series-hpijs.ppd.gz \
ppd/hpijs/hp-laserjet_2430-hpijs-pcl3.ppd.gz \
ppd/hpijs/hp-officejet_g55-hpijs.ppd.gz \
ppd/hpijs/hp-laserjet_cm1415fn-hpijs-pcl3.ppd.gz \
......@@ -1393,6 +1395,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-laserjet_4v-ps.ppd.gz \
ppd/hpijs/hp-color_laserjet_3500-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_656c-hpijs.ppd.gz \
ppd/hpijs/hp-laserjet_pro_mfp_m128fn-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_2130_series-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_3900-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_930c-hpijs.ppd.gz \
ppd/hpijs/hp-photosmart_b8500_series-hpijs.ppd.gz \
......@@ -1795,6 +1798,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-laserjet_4v-ps.ppd.gz \
ppd/hpcups/hp-deskjet_2000_j210_series.ppd.gz \
ppd/hpcups/hp-deskjet_2020_series.ppd.gz \
ppd/hpcups/hp-deskjet_2050_j510_series.ppd.gz \
ppd/hpcups/hp-deskjet_2130_series.ppd.gz \
ppd/hpcups/hp-deskjet_2510_series.ppd.gz \
ppd/hpcups/hp-deskjet_2520_series.ppd.gz \
ppd/hpcups/hp-deskjet_2540_series.ppd.gz \
......@@ -1814,6 +1818,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-laserjet_4v-ps.ppd.gz \
ppd/hpcups/hp-deskjet_3540_series.ppd.gz \
ppd/hpcups/hp-deskjet_3550.ppd.gz \
ppd/hpcups/hp-deskjet_3600.ppd.gz \
ppd/hpcups/hp-deskjet_3630_series.ppd.gz \
ppd/hpcups/hp-deskjet_3650.ppd.gz \
ppd/hpcups/hp-deskjet_3740.ppd.gz \
ppd/hpcups/hp-deskjet_3810.ppd.gz \
......@@ -2860,6 +2865,7 @@ foomatic_ppd_printers = \
ppd/hpijs/hp-deskjet_d730-hpijs.ppd.gz \
ppd/hpijs/hp-officejet_6150_series-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_1120-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_3630_series-hpijs.ppd.gz \
ppd/hpijs/hp-laserjet_2430-hpijs-pcl3.ppd.gz \
ppd/hpijs/hp-officejet_g55-hpijs.ppd.gz \
ppd/hpijs/hp-laserjet_cm1415fn-hpijs-pcl3.ppd.gz \
......@@ -3196,6 +3202,7 @@ foomatic_ppd_printers = \
ppd/hpijs/hp-color_laserjet_3500-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_656c-hpijs.ppd.gz \
ppd/hpijs/hp-laserjet_pro_mfp_m128fn-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_2130_series-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_3900-hpijs.ppd.gz \
ppd/hpijs/hp-deskjet_930c-hpijs.ppd.gz \
ppd/hpijs/hp-photosmart_b8500_series-hpijs.ppd.gz \
......@@ -3860,6 +3867,7 @@ cups_ppd_printers = \
ppd/hpcups/hp-deskjet_2000_j210_series.ppd.gz \
ppd/hpcups/hp-deskjet_2020_series.ppd.gz \
ppd/hpcups/hp-deskjet_2050_j510_series.ppd.gz \
ppd/hpcups/hp-deskjet_2130_series.ppd.gz \
ppd/hpcups/hp-deskjet_2510_series.ppd.gz \
ppd/hpcups/hp-deskjet_2520_series.ppd.gz \
ppd/hpcups/hp-deskjet_2540_series.ppd.gz \
......@@ -3879,6 +3887,7 @@ cups_ppd_printers = \
ppd/hpcups/hp-deskjet_3540_series.ppd.gz \
ppd/hpcups/hp-deskjet_3550.ppd.gz \
ppd/hpcups/hp-deskjet_3600.ppd.gz \
ppd/hpcups/hp-deskjet_3630_series.ppd.gz \
ppd/hpcups/hp-deskjet_3650.ppd.gz \
ppd/hpcups/hp-deskjet_3740.ppd.gz \
ppd/hpcups/hp-deskjet_3810.ppd.gz \
......@@ -4548,9 +4557,9 @@ cups_drv = prnt/drv/hpcups.drv
@DARWIN_BUILD_FALSE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
@DARWIN_BUILD_TRUE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -module -framework CoreFoundation -version-info 1:0:0
# The following is a interlibrary dependency that must be compiled first.
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS)
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
# hpmud library
@HPLIP_BUILD_TRUE@MUDNAME = hpmud
......
......@@ -229,6 +229,7 @@ STATUS_PRINTER_NO_TONER = 1805
STATUS_PRINTER_SERVICE_REQUEST = 1806
STATUS_PRINTER_FUSER_ERROR = 1807
STATUS_PRINTER_EMPTY_TONER = 1808
STATUS_PRINTER_MEDIA_EMPTY_ERROR = 1809
#end
# other derived codes
......@@ -449,6 +450,7 @@ STATUS_TO_ERROR_STATE_MAP = {
STATUS_PRINTER_CARTRIDGE_WRONG : ERROR_STATE_ERROR,
STATUS_PRINTER_PRINTHEAD_MISSING : ERROR_STATE_ERROR,
STATUS_PRINTER_EMPTY_TONER : ERROR_STATE_LOW_SUPPLIES,
STATUS_PRINTER_MEDIA_EMPTY_ERROR : ERROR_STATE_ERROR,
#Alert messages for Pentane products RQ 8888
STATUS_SCANNER_ADF_MISPICK : ERROR_STATE_ERROR,
......
......@@ -319,6 +319,47 @@ def cleanup_spinner():
sys.stdout.write("\b \b")
sys.stdout.flush()
# Convert string to int and return a list.
def xint(ver):
try:
l = [int(x) for x in ver.split('.')]
except:
pass
return l
# In case of import failure of extension modules, check whether its a mixed python environment issue.
def check_extension_module_env(ext_mod):
flag = 0
ext_mod_so = ext_mod + '.so'
python_ver = xint((sys.version).split(' ')[0]) #find the current python version ; xint() to convert string to int, returns a list
if python_ver[0] == 3 :
python_ver = 3
else :
python_ver = 2
for dirpath, dirname, filenames in os.walk('/usr/lib/'): #find the .so path
if ext_mod_so in filenames:
ext_path = dirpath
flag = 1
if flag == 0:
log.error('%s not present in the system. Please re-install HPLIP.' %ext_mod)
sys.exit(1)
m = re.search('python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found
ext_ver = xint(m.group(1))
if ext_ver[0] == 3:
ver = 3
else:
ver = 2
if python_ver != ver : #compare the python version and the version where .so files are present
log.error("%s Extension module is missing from Python's path." %ext_mod)
log.info("To fix this issue, please refer to this 'http://hplipopensource.com/node/372'")
sys.exit(1)
# Internal/messaging errors
......
......@@ -98,6 +98,7 @@ TECH_CLASSES = [
"Python",
"OJ7000",
"Pyramid",
"Pyramid15",
"Python10",
"Mimas",
"StingrayOJ",
......@@ -105,6 +106,7 @@ TECH_CLASSES = [
"CopperheadXLP",
"Copperhead12",
"CopperheadIPH",
"PyramidRefresh15",
"Ampere",
"Python11",
"Saipan",
......@@ -165,14 +167,16 @@ TECH_CLASS_PDLS = {
"Python10" : 'pcl3',
"Mimas" : 'pcl3',
"StingrayOJ" : 'pcl3',
"Pyramid15" : 'pcl3',
"Copperhead" : 'pcl3',
"CopperheadXLP" : 'pcl3',
"Copperhead12" : 'pcl3',
"CopperheadIPH" : 'pcl3',
"PyramidRefresh15": 'pcl3',
"Ampere" : 'pcl3',
"Hbpl1" : 'hbpl1',
"Kapan" : 'pcl3',
"MimasTDR" : 'pcl3'
"MimasTDR" : 'pcl3',
}
PDL_TYPE_PCL = 0 # less preferred
......
......@@ -40,7 +40,7 @@ class Module(object):
def __init__(self, mod, title, version, doc,
usage_data=None, avail_modes=None,
supported_ui_toolkits=None,
run_as_root_ok=False, quiet=False):
run_as_root_ok=False, quiet=False, deprecated=False):
self.mod = mod
self.title = title
......@@ -51,6 +51,7 @@ class Module(object):
log.set_module(mod)
self.args = []
self.quiet = quiet
self.deprecated = deprecated
self.lock_file = None
self.help_only_support = False
prop.prog = sys.argv[0]
......@@ -459,6 +460,9 @@ class Module(object):
log.info("This is free software, and you are welcome to distribute it")
log.info("under certain conditions. See COPYING file for more details.")
log.info("")
if self.deprecated:
log.warn(log.bold("%s support is deprecated. Feature can be used as is. Fixes or updates will not be provided" %self.title))
log.info("")
def getDeviceUri(self, device_uri=None, printer_name=None, back_end_filter=device.DEFAULT_BE_FILTER,
......
......@@ -108,6 +108,8 @@ def parseQueues(mode):
if device_uri.startswith("cups-pdf:/"):
continue
if device_uri.startswith("ipp:/"):
continue
log.debug(log.bold(printer_name))
log.debug(log.bold('-'*len(printer_name)))
......
......@@ -1850,8 +1850,8 @@ printer_state_reasons_xlate = { 'none' : STATUS_PRINTER_IDLE,
'cover-open' : STATUS_PRINTER_DOOR_OPEN,
'door-open' : STATUS_PRINTER_DOOR_OPEN,
'input-tray-missing' : STATUS_PRINTER_TRAY_2_3_DOOR_OPEN,
'media-low' : STATUS_PRINTER_OUT_OF_PAPER,
'media-empty' : STATUS_PRINTER_OUT_OF_PAPER,
'media-low' : STATUS_PRINTER_OUT_OF_PAPER,
'media-empty' : STATUS_PRINTER_MEDIA_EMPTY_ERROR,
'output-tray-missing' : STATUS_PRINTER_TRAY_2_MISSING,
'output-area-almost-full' : STATUS_PRINTER_CLEAR_OUTPUT_AREA,
'output-area-full' : STATUS_PRINTER_CLEAR_OUTPUT_AREA,
......
......@@ -161,6 +161,7 @@ class StringTable:
'1806' : (self.__tr('Service request'), '%try_again%'),
'1807' : (self.__tr('Fuser error'), '%try_again%'),
'1808' : (self.__tr('Empty toner'), ''),
'1809' : (self.__tr('Missing/Empty or incompatible toner'), ''),
'1900' : (self.__tr('Unsupported printer model'), ''),
'2000' : (self.__tr('Scan job started'), ''),
'2001' : (self.__tr('Scan job completed'), ''),
......
......@@ -157,7 +157,7 @@ def colorCal4():
try:
mod = module.Module(__mod__, __title__, __version__, __doc__, None,
(INTERACTIVE_MODE, GUI_MODE), (UI_TOOLKIT_QT4,))