rpms/cups/F-10 cups-getnameddest.patch, 1.3, 1.4 cups.spec, 1.456, 1.457
Tim Waugh
twaugh at fedoraproject.org
Mon Mar 9 16:01:03 UTC 2009
Author: twaugh
Update of /cvs/pkgs/rpms/cups/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13197
Modified Files:
cups-getnameddest.patch cups.spec
Log Message:
* Mon Mar 9 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.9-9
- Fixed getnameddest patch (bug #481481, STR #3082).
cups-getnameddest.patch:
Index: cups-getnameddest.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-10/cups-getnameddest.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cups-getnameddest.patch 10 Oct 2008 09:44:33 -0000 1.3
+++ cups-getnameddest.patch 9 Mar 2009 16:00:32 -0000 1.4
@@ -1,6 +1,6 @@
diff -up cups-1.3.9/berkeley/lpr.c.getnameddest cups-1.3.9/berkeley/lpr.c
---- cups-1.3.9/berkeley/lpr.c.getnameddest 2008-10-10 09:35:05.000000000 +0100
-+++ cups-1.3.9/berkeley/lpr.c 2008-10-10 09:35:05.000000000 +0100
+--- cups-1.3.9/berkeley/lpr.c.getnameddest 2009-03-09 15:56:30.000000000 +0000
++++ cups-1.3.9/berkeley/lpr.c 2009-03-09 15:56:38.000000000 +0000
@@ -92,9 +92,7 @@ main(int argc, /* I - Number of comm
int num_copies; /* Number of copies per file */
int num_files; /* Number of files to print */
@@ -57,7 +57,7 @@
"non-existent destination \"%s\"!\n"),
diff -up cups-1.3.9/cups/cups.h.getnameddest cups-1.3.9/cups/cups.h
--- cups-1.3.9/cups/cups.h.getnameddest 2008-07-23 01:06:46.000000000 +0100
-+++ cups-1.3.9/cups/cups.h 2008-10-10 09:35:05.000000000 +0100
++++ cups-1.3.9/cups/cups.h 2009-03-09 15:56:38.000000000 +0000
@@ -248,6 +248,9 @@ extern void cupsSetDefaultDest(const ch
int num_dests,
cups_dest_t *dests);
@@ -70,7 +70,16 @@
}
diff -up cups-1.3.9/cups/dest.c.getnameddest cups-1.3.9/cups/dest.c
--- cups-1.3.9/cups/dest.c.getnameddest 2008-09-17 00:37:56.000000000 +0100
-+++ cups-1.3.9/cups/dest.c 2008-10-10 09:36:02.000000000 +0100
++++ cups-1.3.9/cups/dest.c 2009-03-09 15:56:47.000000000 +0000
+@@ -4,7 +4,7 @@
+ * User-defined destination (and option) support for the Common UNIX
+ * Printing System (CUPS).
+ *
+- * Copyright 2007-2008 by Apple Inc.
++ * Copyright 2007-2009 by Apple Inc.
+ * Copyright 1997-2007 by Easy Software Products.
+ *
+ * These coded instructions, statements, and computer programs are the
@@ -25,6 +25,7 @@
* server.
* cupsGetDests2() - Get the list of destinations from the
@@ -158,7 +167,7 @@
}
/*
-@@ -460,6 +463,136 @@ cupsGetDests2(http_t *http, /* I -
+@@ -460,6 +463,147 @@ cupsGetDests2(http_t *http, /* I -
/*
@@ -261,7 +270,18 @@
+ */
+
+ if (!cups_get_sdests(http, op, name, 0, &dest))
-+ return (NULL);
++ {
++ if (op == CUPS_GET_DEFAULT)
++ return (NULL);
++
++ /*
++ * The default printer from environment variables or from a
++ * configuration file does not exist. Find out the real default.
++ */
++
++ if (!cups_get_sdests(http, CUPS_GET_DEFAULT, name, 0, &dest))
++ return (NULL);
++ }
+
+ if (instance)
+ dest->instance = _cupsStrAlloc(instance);
@@ -295,7 +315,7 @@
* 'cupsRemoveDest()' - Remove a destination from the destination list.
*
* Removing a destination/instance does not delete the class or printer
-@@ -556,19 +689,17 @@ void
+@@ -556,19 +700,17 @@ void
cupsSetDests(int num_dests, /* I - Number of destinations */
cups_dest_t *dests) /* I - Destinations */
{
@@ -319,7 +339,7 @@
}
-@@ -614,8 +745,8 @@ cupsSetDests2(http_t *http, /* I -
+@@ -614,8 +756,8 @@ cupsSetDests2(http_t *http, /* I -
* Get the server destinations...
*/
@@ -330,7 +350,7 @@
/*
* Figure out which file to write to...
-@@ -630,7 +761,7 @@ cupsSetDests2(http_t *http, /* I -
+@@ -630,7 +772,7 @@ cupsSetDests2(http_t *http, /* I -
* Merge in server defaults...
*/
@@ -339,7 +359,7 @@
/*
* Point to user defaults...
-@@ -797,24 +928,88 @@ cupsSetDests2(http_t *http, /* I -
+@@ -797,24 +939,88 @@ cupsSetDests2(http_t *http, /* I -
/*
@@ -429,7 +449,7 @@
/*
* Check environment variables...
*/
-@@ -824,12 +1019,8 @@ cups_get_dests(const char *filename, /*
+@@ -824,12 +1030,8 @@ cups_get_dests(const char *filename, /*
if (strcmp(printer, "lp") == 0)
printer = NULL;
@@ -444,7 +464,7 @@
/*
* Read each printer; each line looks like:
-@@ -838,28 +1029,22 @@ cups_get_dests(const char *filename, /*
+@@ -838,28 +1040,22 @@ cups_get_dests(const char *filename, /*
* Default name[/instance] options
*/
@@ -482,7 +502,7 @@
name = lineptr;
-@@ -870,9 +1055,6 @@ cups_get_dests(const char *filename, /*
+@@ -870,9 +1066,6 @@ cups_get_dests(const char *filename, /*
while (!isspace(*lineptr & 255) && *lineptr && *lineptr != '/')
lineptr ++;
@@ -492,7 +512,7 @@
if (*lineptr == '/')
{
/*
-@@ -892,30 +1074,49 @@ cups_get_dests(const char *filename, /*
+@@ -892,30 +1085,49 @@ cups_get_dests(const char *filename, /*
else
instance = NULL;
@@ -555,7 +575,7 @@
}
/*
-@@ -926,11 +1127,20 @@ cups_get_dests(const char *filename, /*
+@@ -926,11 +1138,20 @@ cups_get_dests(const char *filename, /*
&(dest->options));
/*
@@ -577,7 +597,7 @@
for (i = 0; i < num_dests; i ++)
(*dests)[i].is_default = 0;
-@@ -942,7 +1152,7 @@ cups_get_dests(const char *filename, /*
+@@ -942,7 +1163,7 @@ cups_get_dests(const char *filename, /*
* Close the file and return...
*/
@@ -586,7 +606,7 @@
return (num_dests);
}
-@@ -954,7 +1164,8 @@ cups_get_dests(const char *filename, /*
+@@ -954,7 +1175,8 @@ cups_get_dests(const char *filename, /*
static int /* O - Number of destinations */
cups_get_sdests(http_t *http, /* I - HTTP connection */
@@ -596,7 +616,7 @@
int num_dests, /* I - Number of destinations */
cups_dest_t **dests) /* IO - Destinations */
{
-@@ -971,8 +1182,9 @@ cups_get_sdests(http_t *http, /* I
+@@ -971,8 +1193,9 @@ cups_get_sdests(http_t *http, /* I
const char *info, /* printer-info attribute */
*location, /* printer-location attribute */
*make_model, /* printer-make-and-model attribute */
@@ -608,7 +628,7 @@
auth_info_req[1024], /* auth-info-required attribute */
reasons[1024]; /* printer-state-reasons attribute */
int num_options; /* Number of options */
-@@ -1016,6 +1228,14 @@ cups_get_sdests(http_t *http, /* I
+@@ -1016,6 +1239,14 @@ cups_get_sdests(http_t *http, /* I
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, cupsUser());
@@ -623,7 +643,7 @@
/*
* Do the request and get back a response...
*/
-@@ -1038,17 +1258,17 @@ cups_get_sdests(http_t *http, /* I
+@@ -1038,17 +1269,17 @@ cups_get_sdests(http_t *http, /* I
* Pull the needed attributes from this printer...
*/
@@ -652,7 +672,7 @@
auth_info_req[0] = '\0';
job_sheets[0] = '\0';
-@@ -1099,7 +1319,7 @@ cups_get_sdests(http_t *http, /* I
+@@ -1099,7 +1330,7 @@ cups_get_sdests(http_t *http, /* I
make_model = attr->values[0].string.text;
else if (!strcmp(attr->name, "printer-name") &&
attr->value_tag == IPP_TAG_NAME)
@@ -661,7 +681,7 @@
else if (!strcmp(attr->name, "printer-state") &&
attr->value_tag == IPP_TAG_ENUM)
state = attr->values[0].integer;
-@@ -1204,7 +1424,7 @@ cups_get_sdests(http_t *http, /* I
+@@ -1204,7 +1435,7 @@ cups_get_sdests(http_t *http, /* I
* See if we have everything needed...
*/
@@ -670,7 +690,7 @@
{
cupsFreeOptions(num_options, options);
-@@ -1214,9 +1434,9 @@ cups_get_sdests(http_t *http, /* I
+@@ -1214,9 +1445,9 @@ cups_get_sdests(http_t *http, /* I
continue;
}
@@ -684,7 +704,7 @@
dest->options = options;
diff -up cups-1.3.9/cups/libcups.exp.getnameddest cups-1.3.9/cups/libcups.exp
--- cups-1.3.9/cups/libcups.exp.getnameddest 2008-04-09 04:39:40.000000000 +0100
-+++ cups-1.3.9/cups/libcups.exp 2008-10-10 09:35:05.000000000 +0100
++++ cups-1.3.9/cups/libcups.exp 2009-03-09 15:56:38.000000000 +0000
@@ -114,6 +114,7 @@ _cupsGetFd
_cupsGetFile
_cupsGetJobs
@@ -695,7 +715,7 @@
_cupsGetPPD
diff -up cups-1.3.9/cups/Makefile.getnameddest cups-1.3.9/cups/Makefile
--- cups-1.3.9/cups/Makefile.getnameddest 2008-09-06 01:30:39.000000000 +0100
-+++ cups-1.3.9/cups/Makefile 2008-10-10 09:35:05.000000000 +0100
++++ cups-1.3.9/cups/Makefile 2009-03-09 15:56:38.000000000 +0000
@@ -263,7 +263,7 @@ libcups.so.2 libcups.sl.2: $(LIBOBJS)
# libcups.2.dylib
#
@@ -707,7 +727,7 @@
-install_name $(libdir)/$@ \
diff -up cups-1.3.9/cups/testcups.c.getnameddest cups-1.3.9/cups/testcups.c
--- cups-1.3.9/cups/testcups.c.getnameddest 2008-07-11 23:48:49.000000000 +0100
-+++ cups-1.3.9/cups/testcups.c 2008-10-10 09:35:05.000000000 +0100
++++ cups-1.3.9/cups/testcups.c 2009-03-09 15:56:38.000000000 +0000
@@ -16,7 +16,8 @@
*
* Contents:
@@ -950,7 +970,7 @@
*/
diff -up cups-1.3.9/systemv/lp.c.getnameddest cups-1.3.9/systemv/lp.c
--- cups-1.3.9/systemv/lp.c.getnameddest 2008-07-11 23:48:49.000000000 +0100
-+++ cups-1.3.9/systemv/lp.c 2008-10-10 09:35:05.000000000 +0100
++++ cups-1.3.9/systemv/lp.c 2009-03-09 15:56:38.000000000 +0000
@@ -73,9 +73,7 @@ main(int argc, /* I - Number of comm
int num_copies; /* Number of copies per file */
int num_files; /* Number of files to print */
Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-10/cups.spec,v
retrieving revision 1.456
retrieving revision 1.457
diff -u -r1.456 -r1.457
--- cups.spec 9 Mar 2009 12:11:44 -0000 1.456
+++ cups.spec 9 Mar 2009 16:00:32 -0000 1.457
@@ -492,6 +492,7 @@
%changelog
* Mon Mar 9 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.9-9
+- Fixed getnameddest patch (bug #481481, STR #3082).
- Handle https:// device URIs (bug #478677, STR #3122).
* Wed Jan 28 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.9-8
More information about the fedora-extras-commits
mailing list