Commit 0422e14b authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 3.13.9

parent 72c0810f

Too many changes to show.

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

......@@ -380,16 +380,6 @@ hplip_systraydir = $(systraydir)
hplip_systray_DATA = hplip-systray.desktop
endif
# hpipjs (CUPS filter)
hplipjsdir = $(cupsfilterdir)
hplipjs_PROGRAMS = hplipjs
hplipjs_SOURCES = prnt/filters/hplipjs.c
# hpcac (CUPS filter, Color Access Control, ie: CLJ 4700)
cacdir = $(cupsfilterdir)
dist_cac_SCRIPTS = prnt/filters/hpcac
# hpps (Finishing PS filter)
findir = $(cupsfilterdir)
dist_fin_SCRIPTS = prnt/filters/hpps
......
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2007 Hewlett-Packard Development Company, L.P.
......
......@@ -87,7 +87,7 @@ DEFAULT_FILTER = None
VALID_FILTERS = ('print', 'scan', 'fax', 'pcard', 'copy')
DEFAULT_BE_FILTER = ('hp',)
pat_deviceuri = re.compile(r"""(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*)|zc=(\S+))(?:&port=(\d))?""", re.IGNORECASE)
pat_deviceuri = re.compile(r"""(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*)|zc=(\S+)|hostname=(\S+))(?:&port=(\d))?""", re.IGNORECASE)
http_pat_url = re.compile(r"""/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*))&loc=(\S*)""", re.IGNORECASE)
direct_pat = re.compile(r'direct (.*?) "(.*?)" "(.*?)" "(.*?)"', re.IGNORECASE)
......@@ -255,9 +255,9 @@ def init_dbus(dbus_loop=None):
session_bus = dbus.SessionBus(dbus_loop)
except dbus.exceptions.DBusException, e:
if os.getuid() != 0:
log.error("Unable to connect to dbus session bus.")
log.error("Unable to connect to dbus session bus. %s "%e)
else:
log.debug("Unable to connect to dbus session bus (running as root?)")
log.debug("Unable to connect to dbus session bus (running as root?). %s "%e)
dbus_avail = False
return dbus_avail, None, None
......@@ -368,8 +368,19 @@ def makeURI(param, port=1):
log.debug("Found: %s" % uri)
found = True
cups_uri = uri
else:
log.debug("Not found.")
else: # Try DNS hostname
log.debug("Device not found using mDNS hostname. Trying with DNS hostname %s" % param)
result_code, uri = hpmudext.make_net_uri(param, port)
if result_code == hpmudext.HPMUD_R_OK and uri:
uri = uri.replace("ip","hostname")
log.debug("Found: %s" % uri)
found = True
cups_uri = uri
else:
log.debug("Not found.")
if not found:
log.debug("Trying serial number %s" % param)
......@@ -825,9 +836,14 @@ def parseDeviceURI(device_uri):
serial = m.group(4) or ''
dev_file = m.group(5) or ''
host = m.group(6) or ''
zc = ''
if not host:
zc = host = m.group(7) or ''
zc = m.group(7) or ''
hostname = m.group(8) or ''
if hostname:
host = hostname
elif zc:
host = zc
port = m.group(8) or 1
if bus == 'net':
......@@ -1408,6 +1424,9 @@ class Device(object):
def getDeviceID(self):
needs_close = False
self.raw_deviceID = ''
self.deviceID = {}
if self.io_state != IO_STATE_HP_OPEN:
try:
self.open()
......@@ -1417,10 +1436,7 @@ class Device(object):
result_code, data = hpmudext.get_device_id(self.device_id)
if result_code != hpmudext.HPMUD_R_OK:
self.raw_deviceID = ''
self.deviceID = {}
else:
if result_code == hpmudext.HPMUD_R_OK:
self.raw_deviceID = data
self.deviceID = parseDeviceID(data)
......
......@@ -1656,7 +1656,7 @@ def StatusType10Media(func): # Low End Data Model
elif bin_name == "PhotoTray":
status_block['photo-tray'] = PHOTO_TRAY_ENGAGED
else:
log.error("found invalid bin name '%s'" % bin_name)
log.debug("found invalid bin name '%s'" % bin_name)
try:
elements = tree.findall("Accessories/MediaHandlingDeviceFunctionType")
......
......@@ -463,7 +463,7 @@ def sort_dict_by_value(d):
def commafy(val):
return unicode(locale.format("%d", val, grouping=True))
return locale.format("%d", val, grouping=True).decode(locale.getpreferredencoding())
def format_bytes(s, show_bytes=False):
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for HP Linux Imaging and Printing 3.13.8.
# Generated by GNU Autoconf 2.68 for HP Linux Imaging and Printing 3.13.9.
#
# Report bugs to <3.13.8>.
# Report bugs to <3.13.9>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
......@@ -246,7 +246,7 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and 3.13.8 about your
$as_echo "$0: Please tell bug-autoconf@gnu.org and 3.13.9 about your
$0: system, including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
......@@ -569,9 +569,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HP Linux Imaging and Printing'
PACKAGE_TARNAME='hplip'
PACKAGE_VERSION='3.13.8'
PACKAGE_STRING='HP Linux Imaging and Printing 3.13.8'
PACKAGE_BUGREPORT='3.13.8'
PACKAGE_VERSION='3.13.9'
PACKAGE_STRING='HP Linux Imaging and Printing 3.13.9'
PACKAGE_BUGREPORT='3.13.9'
PACKAGE_URL=''
# Factoring default headers for most tests.
......@@ -1465,7 +1465,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures HP Linux Imaging and Printing 3.13.8 to adapt to many kinds of systems.
\`configure' configures HP Linux Imaging and Printing 3.13.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1535,7 +1535,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of HP Linux Imaging and Printing 3.13.8:";;
short | recursive ) echo "Configuration of HP Linux Imaging and Printing 3.13.9:";;
esac
cat <<\_ACEOF
......@@ -1629,7 +1629,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <3.13.8>.
Report bugs to <3.13.9>.
_ACEOF
ac_status=$?
fi
......@@ -1692,7 +1692,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
HP Linux Imaging and Printing configure 3.13.8
HP Linux Imaging and Printing configure 3.13.9
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
......@@ -2159,7 +2159,7 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## --------------------- ##
## Report this to 3.13.8 ##
## Report this to 3.13.9 ##
## --------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
......@@ -2236,7 +2236,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by HP Linux Imaging and Printing $as_me 3.13.8, which was
It was created by HP Linux Imaging and Printing $as_me 3.13.9, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
......@@ -3052,7 +3052,7 @@ fi
# Define the identity of the package.
PACKAGE='hplip'
VERSION='3.13.8'
VERSION='3.13.9'
cat >>confdefs.h <<_ACEOF
......@@ -18237,7 +18237,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by HP Linux Imaging and Printing $as_me 3.13.8, which was
This file was extended by HP Linux Imaging and Printing $as_me 3.13.9, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -18288,13 +18288,13 @@ $config_files
Configuration commands:
$config_commands
Report bugs to <3.13.8>."
Report bugs to <3.13.9>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
HP Linux Imaging and Printing config.status 3.13.8
HP Linux Imaging and Printing config.status 3.13.9
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
......
......@@ -26,7 +26,7 @@
# 104 = no libdl
#AC_PREREQ(2.59)
AC_INIT([HP Linux Imaging and Printing], [3.13.8], [3.13.8], [hplip])
AC_INIT([HP Linux Imaging and Printing], [3.13.9], [3.13.9], [hplip])
#AM_INIT_AUTOMAKE([1.9 foreign])
AM_INIT_AUTOMAKE
AC_DISABLE_STATIC
......
......@@ -134,6 +134,7 @@ cups_ppd_printers = \
ppd/hpcups/hp-deskjet_3940.ppd.gz \
ppd/hpcups/hp-deskjet_400.ppd.gz \
ppd/hpcups/hp-deskjet_400l.ppd.gz \
ppd/hpcups/hp-deskjet_4510_series.ppd.gz \
ppd/hpcups/hp-deskjet_460.ppd.gz \
ppd/hpcups/hp-deskjet_4610_series.ppd.gz \
ppd/hpcups/hp-deskjet_4620_series.ppd.gz \
......@@ -492,6 +493,7 @@ cups_ppd_printers = \