From 50311ccddf9ce22318e54aa333cb25f1da43d441 Mon Sep 17 00:00:00 2001 From: Kacper Kornet Date: Thu, 21 Jun 2012 12:29:58 +0000 Subject: [PATCH] - fix empty output of lpstat if LANG=pl; part of 10321 in cups cvn Changed files: cups-locale.patch -> 1.1 cups.spec -> 1.327 --- cups-locale.patch | 63 +++++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 4 ++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 cups-locale.patch diff --git a/cups-locale.patch b/cups-locale.patch new file mode 100644 index 0000000..a99ab3e --- /dev/null +++ b/cups-locale.patch @@ -0,0 +1,63 @@ +Index: cups/language.c +=================================================================== +--- cups/language.c (revision 10320) ++++ cups/language.c (revision 10321) +@@ -3,7 +3,7 @@ + * + * I18N/language support for CUPS. + * +- * Copyright 2007-2011 by Apple Inc. ++ * Copyright 2007-2012 by Apple Inc. + * Copyright 1997-2007 by Easy Software Products. + * + * These coded instructions, statements, and computer programs are the +@@ -979,8 +979,23 @@ + */ + + if (m) +- cupsArrayAdd(a, m); ++ { ++ if (m->str[0]) ++ { ++ cupsArrayAdd(a, m); ++ } ++ else ++ { ++ /* ++ * Translation is empty, don't add it... (STR #4033) ++ */ + ++ free(m->id); ++ free(m->str); ++ free(m); ++ } ++ } ++ + /* + * Create a new message with the given msgid string... + */ +@@ -1057,8 +1072,23 @@ + */ + + if (m) +- cupsArrayAdd(a, m); ++ { ++ if (m->str[0]) ++ { ++ cupsArrayAdd(a, m); ++ } ++ else ++ { ++ /* ++ * Translation is empty, don't add it... (STR #4033) ++ */ + ++ free(m->id); ++ free(m->str); ++ free(m); ++ } ++ } ++ + /* + * Close the message catalog file and return the new array... + */ diff --git a/cups.spec b/cups.spec index a7e766b..7e85937 100644 --- a/cups.spec +++ b/cups.spec @@ -17,7 +17,7 @@ Summary(pl.UTF-8): Ogólny system druku dla Uniksa Summary(pt_BR.UTF-8): Sistema Unix de Impressão Name: cups Version: 1.5.2 -Release: 4 +Release: 5 Epoch: 1 License: LGPL v2 (libraries), GPL v2 (the rest) + openssl exception Group: Applications/Printing @@ -46,6 +46,7 @@ Patch12: %{name}-desktop.patch Patch13: %{name}-systemd-socket.patch # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638521 Patch14: ipp-revert-1.4.patch +Patch15: %{name}-locale.patch # avahi patches from fedora Patch100: %{name}-avahi-1-config.patch Patch101: %{name}-avahi-2-backend.patch @@ -327,6 +328,7 @@ Wsparcie dla LPD w serwerze wydruków CUPS. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p0 %if %{with avahi} %patch100 -p1 -- 2.44.0