diff --git a/hplip-hpaio-localonly.patch b/hplip-hpaio-localonly.patch new file mode 100644 index 0000000..44e3fc3 --- /dev/null +++ b/hplip-hpaio-localonly.patch @@ -0,0 +1,45 @@ +diff -up hplip-3.11.10/scan/sane/hpaio.c~ hplip-3.11.10/scan/sane/hpaio.c +--- hplip-3.11.10/scan/sane/hpaio.c~ 2011-10-02 04:04:48.000000000 +0100 ++++ hplip-3.11.10/scan/sane/hpaio.c 2011-10-20 16:00:38.016534755 +0100 +@@ -272,25 +272,28 @@ static int DevDiscovery(int localOnly) + } + } + +- /* Ignore localOnly flag (used by saned) and always look for network all-in-one scan devices (defined by cups). */ +- cnt = GetCupsPrinters(&cups_printer); +- for (i=0; i 0) +- { ++ cnt = GetCupsPrinters(&cups_printer); ++ for (i=0; i 0) ++ { + hpmud_get_uri_model(cups_printer[i], model, sizeof(model)); + AddDeviceList(cups_printer[i], model, &DeviceList); + total++; +- } +- else +- { ++ } ++ else ++ { + DBG6("unsupported scantype=%d %s\n", ma.scantype, cups_printer[i]); +- } +- free(cups_printer[i]); ++ } ++ free(cups_printer[i]); ++ } ++ if (cups_printer) ++ free(cups_printer); + } +- if (cups_printer) +- free(cups_printer); + + bugout: + return total; diff --git a/hplip.spec b/hplip.spec index 7086d1c..0291abd 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.11.10 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons Conflicts: system-config-printer < 0.6.132 @@ -46,6 +46,7 @@ Patch33: hplip-dbus-threads.patch Patch34: hplip-notification-exception.patch Patch35: hplip-CVE-2010-4267.patch Patch36: hplip-wifisetup.patch +Patch37: hplip-hpaio-localonly.patch Requires(pre): /sbin/service Requires(post): /sbin/chkconfig @@ -297,6 +298,9 @@ done # Avoid KeyError in ui4/wifisetupdialog.py (bug #680939). %patch36 -p1 -b .wifisetup +# Pay attention to the SANE localOnly flag in hpaio (bug #743593). +%patch37 -p1 -b .hpaio-localonly + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -523,6 +527,9 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Thu Oct 20 2011 Tim Waugh 3.11.10-5 +- Pay attention to the SANE localOnly flag in hpaio (bug #743593). + * Mon Oct 17 2011 Tim Waugh 3.11.10-4 - Corrected IEEE 1284 Device ID for LaserJet M1319f MFP (bug #746614)