packages: gtk+2/gtk+2.spec, gtk+2/cups-auth.patch (NEW)=?UTF-8?Q?=20?=- rel 3 - fix cups ...

baggins baggins at pld-linux.org
Fri May 25 13:05:21 CEST 2012


Author: baggins                      Date: Fri May 25 11:05:21 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 3
- fix cups auth, https://bugzilla.gnome.org/show_bug.cgi?id=664640

---- Files affected:
packages/gtk+2:
   gtk+2.spec (1.361 -> 1.362) , cups-auth.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gtk+2/gtk+2.spec
diff -u packages/gtk+2/gtk+2.spec:1.361 packages/gtk+2/gtk+2.spec:1.362
--- packages/gtk+2/gtk+2.spec:1.361	Mon Feb 20 12:16:29 2012
+++ packages/gtk+2/gtk+2.spec	Fri May 25 13:05:16 2012
@@ -16,7 +16,7 @@
 Summary(tr.UTF-8):	GIMP ToolKit arayüz kitaplığı
 Name:		gtk+2
 Version:	2.24.10
-Release:	2
+Release:	3
 Epoch:		2
 License:	LGPL v2+
 Group:		X11/Libraries
@@ -25,6 +25,7 @@
 Patch0:		%{name}-arch_confdir.patch
 Patch1:		gobject-introspection.patch
 Patch2:		%{name}-papi.patch
+Patch3:		cups-auth.patch
 URL:		http://www.gtk.org/
 BuildRequires:	atk-devel >= 1:1.30.0-3
 BuildRequires:	autoconf >= 2.62
@@ -250,6 +251,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' gtk/gtk-builder-convert
 
@@ -451,6 +453,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.362  2012/05/25 11:05:16  baggins
+- rel 3
+- fix cups auth, https://bugzilla.gnome.org/show_bug.cgi?id=664640
+
 Revision 1.361  2012/02/20 11:16:29  megabajt
 - missing epoch in -papi deps
 - release 2

================================================================
Index: packages/gtk+2/cups-auth.patch
diff -u /dev/null packages/gtk+2/cups-auth.patch:1.1
--- /dev/null	Fri May 25 13:05:21 2012
+++ packages/gtk+2/cups-auth.patch	Fri May 25 13:05:16 2012
@@ -0,0 +1,82 @@
+diff -ur gtk+-3.2.2/modules/printbackends/cups.orig/gtkcupsutils.c gtk+-3.2.2/modules/printbackends/cups/gtkcupsutils.c
+--- gtk+-3.2.2/modules/printbackends/cups.orig/gtkcupsutils.c	2011-11-07 19:47:37.000000000 +0100
++++ gtk+-3.2.2/modules/printbackends/cups/gtkcupsutils.c	2011-11-23 11:50:56.413671604 +0100
+@@ -265,6 +265,10 @@
+       else if (request->type == GTK_CUPS_GET)
+         get_states[request->state] (request);
+ 
++      if (gtk_cups_result_is_error (request->result)) {
++          request->state = GTK_CUPS_REQUEST_DONE;
++      }
++
+       if (request->attempts > _GTK_CUPS_MAX_ATTEMPTS &&
+           request->state != GTK_CUPS_REQUEST_DONE)
+         {
+@@ -918,8 +922,8 @@
+  * The callback sets cups_password to NULL to signal that the 
+  * password has been used.
+  */
+-static char *cups_password;
+-static char *cups_username;
++static char *cups_password = NULL;
++static char *cups_username = NULL;
+ 
+ static const char *
+ passwordCB (const char *prompt)
+@@ -955,6 +959,7 @@
+ 
+       if (request->password_state == GTK_CUPS_PASSWORD_APPLIED)
+         {
++          request->poll_state = GTK_CUPS_HTTP_IDLE;
+           request->password_state = GTK_CUPS_PASSWORD_NOT_VALID;
+           request->state = GTK_CUPS_POST_AUTH;
+           request->need_password = TRUE;
+@@ -972,7 +976,6 @@
+         {
+           if (request->password_state == GTK_CUPS_PASSWORD_NONE)
+             {
+-              cups_password = g_strdup ("");
+               cups_username = request->username;
+               cupsSetPasswordCB (passwordCB);
+ 
+@@ -984,6 +987,7 @@
+                   /* move to AUTH state to let the backend 
+                    * ask for a password
+                    */ 
++                  request->poll_state = GTK_CUPS_HTTP_IDLE;
+                   request->state = GTK_CUPS_POST_AUTH;
+                   request->need_password = TRUE;
+ 
+@@ -1247,6 +1287,7 @@
+ 
+       if (request->password_state == GTK_CUPS_PASSWORD_APPLIED)
+         {
++          request->poll_state = GTK_CUPS_HTTP_IDLE;
+           request->password_state = GTK_CUPS_PASSWORD_NOT_VALID;
+           request->state = GTK_CUPS_GET_AUTH;
+           request->need_password = TRUE;
+@@ -1264,7 +1311,6 @@
+         {
+           if (request->password_state == GTK_CUPS_PASSWORD_NONE)
+             {
+-              cups_password = g_strdup ("");
+               cups_username = request->username;
+               cupsSetPasswordCB (passwordCB);
+ 
+@@ -1284,6 +1331,7 @@
+                   /* move to AUTH state to let the backend
+                    * ask for a password
+                    */
++                  request->poll_state = GTK_CUPS_HTTP_IDLE;
+                   request->state = GTK_CUPS_GET_AUTH;
+                   request->need_password = TRUE;
+ 
+@@ -1324,7 +1385,7 @@
+           return;
+         }
+ 
+-      request->state = GTK_CUPS_GET_SEND;
++      request->state = GTK_CUPS_GET_CONNECT;
+       request->last_status = HTTP_CONTINUE;
+ 
+      return;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/gtk+2/gtk+2.spec?r1=1.361&r2=1.362



More information about the pld-cvs-commit mailing list