rpms/hplip/F-11 hplip-plugin-error.patch, NONE, 1.1 hplip-retry-open.patch, 1.1, 1.2 hplip.spec, 1.234, 1.235

Tim Waugh twaugh at fedoraproject.org
Wed Oct 28 17:41:08 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/hplip/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4775

Modified Files:
	hplip-retry-open.patch hplip.spec 
Added Files:
	hplip-plugin-error.patch 
Log Message:
* Wed Oct 28 2009 Tim Waugh <twaugh at redhat.com> 3.9.8-16
- Set a printer-state-reason when there's a missing required plugin
  (bug #531330).


hplip-plugin-error.patch:
 backend/hp.c     |    2 +-
 hpijs/hpcups.cpp |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE hplip-plugin-error.patch ---
diff -up hplip-3.9.8/prnt/backend/hp.c~ hplip-3.9.8/prnt/backend/hp.c
--- hplip-3.9.8/prnt/backend/hp.c~	2009-10-28 17:03:27.435140391 +0000
+++ hplip-3.9.8/prnt/backend/hp.c	2009-10-28 17:12:15.709140073 +0000
@@ -575,7 +575,7 @@ static int loop_test(HPMUD_DEVICE dd, HP
    if (first_time)
    {
       first_time = 0;
-      old_state = ("media-empty-error,media-jam-error,"
+      old_state = ("media-empty-error,media-jam-error,hplip.plugin-error,"
 		   "cover-open-error,toner-empty-error,other");
    }
 
diff -up hplip-3.9.8/prnt/hpijs/hpcups.cpp~ hplip-3.9.8/prnt/hpijs/hpcups.cpp
--- hplip-3.9.8/prnt/hpijs/hpcups.cpp~	2009-10-28 17:03:27.390139541 +0000
+++ hplip-3.9.8/prnt/hpijs/hpcups.cpp	2009-10-28 17:11:18.980140742 +0000
@@ -384,6 +384,7 @@ int HPCups::initContext (char **argv)
 	SendDbusMessage (device_uri, printer,
 	                 EVENT_PRINT_FAILED_MISSING_PLUGIN,
 			 argv[2], atoi (argv[1]), argv[3]);
+	fputs ("STATE: +hplip.plugin-error\n", stderr);
 	BUG ("ERROR: unable to set device = %s, err = %d\n", attr->value, err);
 	return 1;
     }

hplip-retry-open.patch:
 hp.c |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

Index: hplip-retry-open.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-11/hplip-retry-open.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- hplip-retry-open.patch	23 Oct 2009 11:49:39 -0000	1.1
+++ hplip-retry-open.patch	28 Oct 2009 17:41:08 -0000	1.2
@@ -1,12 +1,30 @@
---- hplip-3.9.8/prnt/backend/hp.c~	2009-10-23 11:58:20.775792057 +0100
-+++ hplip-3.9.8/prnt/backend/hp.c	2009-10-23 12:12:18.142792641 +0100
-@@ -724,7 +724,8 @@ int main(int argc, char *argv[])
+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	2009-10-27 11:46:00.181457688 +0000
++++ hplip-3.9.8/prnt/backend/hp.c	2009-10-27 11:57:51.527583553 +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)
-+                  if (stat != HPMUD_R_DEVICE_BUSY &&
-+		      stat != HPMUD_R_IO_ERROR)
-                   {
-                      BUG("ERROR: cannot open device stat=%d: %s\n", stat, argv[0]);
-                      goto bugout;
+-                  {
+-                     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-11/hplip.spec,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -p -r1.234 -r1.235
--- hplip.spec	23 Oct 2009 11:49:39 -0000	1.234
+++ hplip.spec	28 Oct 2009 17:41:08 -0000	1.235
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 3.9.8
-Release: 15%{?dist}
+Release: 16%{?dist}
 License: GPLv2+ and MIT
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -26,6 +26,7 @@ Patch9: hplip-requirespageregion.patch
 Patch10: hplip-discovery-method.patch
 Patch11: hplip-device-reconnected.patch
 Patch12: hplip-retry-open.patch
+Patch13: hplip-plugin-error.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires(pre): /sbin/service
@@ -151,6 +152,10 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
 # Retry when connecting to device fails (bug #528483).
 %patch12 -p1 -b .retry-open
 
+# Set a printer-state-reason when there's a missing required plugin
+# (bug #531330).
+%patch13 -p1 -b .plugin-error
+
 %build
 aclocal
 automake --foreign --add-missing --copy
@@ -368,6 +373,10 @@ fi
 exit 0
 
 %changelog
+* Wed Oct 28 2009 Tim Waugh <twaugh at redhat.com> 3.9.8-16
+- Set a printer-state-reason when there's a missing required plugin
+  (bug #531330).
+
 * Fri Oct 23 2009 Tim Waugh <twaugh at redhat.com> 3.9.8-15
 - Retry when connecting to device fails (bug #528483).
 




More information about the fedora-extras-commits mailing list