diff --git a/cups-str3279.patch b/cups-str3279.patch new file mode 100644 index 0000000..3fe0edb --- /dev/null +++ b/cups-str3279.patch @@ -0,0 +1,50 @@ +diff -up cups-1.4rc1/scheduler/cups-driverd.cxx.str3279 cups-1.4rc1/scheduler/cups-driverd.cxx +--- cups-1.4rc1/scheduler/cups-driverd.cxx.str3279 2009-06-08 23:00:14.000000000 +0100 ++++ cups-1.4rc1/scheduler/cups-driverd.cxx 2009-08-10 15:48:26.255839804 +0100 +@@ -1493,12 +1493,16 @@ load_ppds(const char *d, /* I - Actual + ppd->record.size == dent->fileinfo.st_size && + ppd->record.mtime == dent->fileinfo.st_mtime) + { +- do ++ /* Rewind to the beginning of this run. */ ++ while ((ppd = (ppd_info_t *)cupsArrayPrev(PPDsByName)) != NULL && ++ !strcmp(ppd->record.filename, name)) ++ ; ++ ++ while ((ppd = (ppd_info_t *)cupsArrayNext(PPDsByName)) != NULL && ++ !strcmp(ppd->record.filename, name)) + { + ppd->found = 1; + } +- while ((ppd = (ppd_info_t *)cupsArrayNext(PPDsByName)) != NULL && +- !strcmp(ppd->record.filename, name)); + + continue; + } +@@ -1929,7 +1933,7 @@ load_drv(const char *filename, /* I - + * Add a dummy entry for the file... + */ + +- add_ppd(filename, filename, "", "", "", "", "", "", mtime, size, 0, ++ add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0, + PPD_TYPE_DRV, "drv"); + ChangedPPD = 1; + +@@ -1988,7 +1992,7 @@ load_drv(const char *filename, /* I - + { + product_found = true; + +- add_ppd(filename, uri, "en", d->manufacturer->value, make_model, ++ add_ppd(name, uri, "en", d->manufacturer->value, make_model, + device_id ? device_id->value->value : "", + product->value->value, + ps_version ? ps_version->value->value : "(3010) 0", +@@ -1996,7 +2000,7 @@ load_drv(const char *filename, /* I - + } + + if (!product_found) +- add_ppd(filename, uri, "en", d->manufacturer->value, make_model, ++ add_ppd(name, uri, "en", d->manufacturer->value, make_model, + device_id ? device_id->value->value : "", + d->model_name->value, + ps_version ? ps_version->value->value : "(3010) 0", diff --git a/cups.spec b/cups.spec index 50a33c0..d0f1c03 100644 --- a/cups.spec +++ b/cups.spec @@ -65,6 +65,7 @@ Patch37: cups-avahi.patch Patch38: cups-str3277.patch Patch39: cups-str3284.patch Patch40: cups-str3285.patch +Patch41: cups-str3279.patch Patch100: cups-lspp.patch Epoch: 1 Url: http://www.cups.org/ @@ -230,6 +231,7 @@ module. %patch38 -p1 -b .str3277 %patch39 -p1 -b .str3284 %patch40 -p1 -b .str3285 +%patch41 -p1 -b .str3279 %if %lspp %patch100 -p1 -b .lspp @@ -525,6 +527,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Mon Aug 10 2009 Tim Waugh 1:1.4-0.rc1.14 +- Fixed ppds.dat handling of drv files (bug #515027, STR #3279). - Fixed udev rules file to avoid DEVTYPE warning messages. - Fixed cupsGetNamedDest() so it does not fall back to the default printer when a destination has been named (bug #516439, STR #3285).