rpms/hplip/F-12 hplip-retry-open.patch, 1.2, 1.3 hplip.spec, 1.251, 1.252
Tim Waugh
twaugh at fedoraproject.org
Tue Jan 5 15:19:52 UTC 2010
Author: twaugh
Update of /cvs/pkgs/rpms/hplip/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12361
Modified Files:
hplip.spec
Added Files:
hplip-retry-open.patch
Log Message:
* Tue Jan 5 2010 Tim Waugh <twaugh at redhat.com> - 3.9.8-26
- Retry when connecting to device fails (bug #532112).
hplip-retry-open.patch:
hp.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
Index: hplip-retry-open.patch
===================================================================
RCS file: hplip-retry-open.patch
diff -N hplip-retry-open.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ hplip-retry-open.patch 5 Jan 2010 15:19:52 -0000 1.3
@@ -0,0 +1,30 @@
+diff -up hplip-3.9.8/prnt/backend/hp.c.retry-open hplip-3.9.8/prnt/backend/hp.c
+--- hplip-3.9.8/prnt/backend/hp.c.retry-open 2010-01-05 15:11:56.045911892 +0000
++++ hplip-3.9.8/prnt/backend/hp.c 2010-01-05 15:12:04.236911642 +0000
+@@ -724,11 +724,21 @@ int main(int argc, char *argv[])
+ /* Open hp device. */
+ while ((stat = hpmud_open_device(argv[0], ma.prt_mode, &hd)) != HPMUD_R_OK)
+ {
+- if (stat != HPMUD_R_DEVICE_BUSY)
+- {
+- BUG("ERROR: cannot open device stat=%d: %s\n", stat, argv[0]);
+- goto bugout;
+- }
++ if (getenv ("CLASS") != NULL)
++ {
++ /* If the CLASS environment variable is set we
++ * need to give other class members a chance in
++ * case their devices are ready to go.
++ */
++
++ BUG("INFO: cannot open device stat=%d: %s\n", stat, argv[0]);
++ BUG("INFO: queuing on next printer in class...\n");
++
++ /* Prevent job requeuing too quickly. */
++ sleep (5);
++
++ goto bugout;
++ }
+
+ /* Display user error. */
+ device_event(argv[0], printer, 5000+stat, argv[2], argv[1], argv[3]);
Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-12/hplip.spec,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -p -r1.251 -r1.252
--- hplip.spec 5 Jan 2010 13:27:00 -0000 1.251
+++ hplip.spec 5 Jan 2010 15:19:52 -0000 1.252
@@ -20,6 +20,7 @@ Patch4: hplip-no-asm.patch
Patch5: hplip-clear-previous-state-reasons.patch
Patch6: hplip-state-reasons-newline.patch
Patch7: hplip-parenths.patch
+Patch8: hplip-retry-open.patch
Patch9: hplip-requirespageregion.patch
Patch10: hplip-discovery-method.patch
Patch11: hplip-device-reconnected.patch
@@ -136,6 +137,9 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
# Fixed typos in page sizes (bug #515469).
%patch7 -p1 -b .parenths
+# Retry when connecting to device fails (bug #532112).
+%patch8 -p1 -b .retry-open
+
# Set RequiresPageRegion in hpcups PPDs (bug #518756).
%patch9 -p1 -b .requirespageregion
@@ -367,6 +371,7 @@ fi
%changelog
* Tue Jan 5 2010 Tim Waugh <twaugh at redhat.com> - 3.9.8-26
+- Retry when connecting to device fails (bug #532112).
- Don't ship PolicyKit mechanism (bug #551773).
- Don't run automake/autoconf etc as it causes build failures.
More information about the fedora-extras-commits
mailing list