- Avoid busy-looping when trying to shorten long PPD nicknames.

This commit is contained in:
Tim Waugh 2008-09-02 13:37:05 +00:00
parent c6c2bc002f
commit 7a2c77d87a
2 changed files with 20 additions and 0 deletions

15
foomatic-busyloop.patch Normal file
View File

@ -0,0 +1,15 @@
diff -up foomatic-db-engine-3.0-20080710/lib/Foomatic/DB.pm.busyloop foomatic-db-engine-3.0-20080710/lib/Foomatic/DB.pm
--- foomatic-db-engine-3.0-20080710/lib/Foomatic/DB.pm.busyloop 2008-07-10 08:20:10.000000000 +0100
+++ foomatic-db-engine-3.0-20080710/lib/Foomatic/DB.pm 2008-09-02 14:34:27.000000000 +0100
@@ -4237,8 +4237,10 @@ EOFPGSZ
# ShortNickName too long? Remove last words from model name.
$parts{'model'} =~
s/(?<=[a-zA-Z0-9])[^a-zA-Z0-9]+[a-zA-Z0-9]*$//;
- $shortnickname =
+ my $new =
"$parts{'make'} $parts{'model'}, $parts{'driver'}";
+ last if ($new == $shortnickname);
+ $shortnickname = $new;
}
if (length($shortnickname) > 31) {
# If nothing else helps ...

View File

@ -42,6 +42,7 @@ Patch15: foomatic-bad-utf8.patch
Patch18: foomatic-sigpipe.patch Patch18: foomatic-sigpipe.patch
Patch19: foomatic-459847.patch Patch19: foomatic-459847.patch
Patch20: foomatic-busyloop.patch
Url: http://www.linuxprinting.org Url: http://www.linuxprinting.org
BuildRequires: perl >= 3:5.8.1 BuildRequires: perl >= 3:5.8.1
@ -97,6 +98,7 @@ chmod a+x mkinstalldirs
%patch14 -p1 -b .ampathxml %patch14 -p1 -b .ampathxml
%patch10 -p1 -b .xml-cflags %patch10 -p1 -b .xml-cflags
%patch15 -p1 %patch15 -p1
%patch20 -p1 -b .busyloop
./make_configure ./make_configure
popd popd
@ -248,6 +250,9 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name}
%{_var}/cache/foomatic %{_var}/cache/foomatic
%changelog %changelog
* Tue Sep 2 2008 Tim Waugh <twaugh@redhat.com> 3.0.2-63
- Avoid busy-looping when trying to shorten long PPD nicknames.
* Tue Sep 2 2008 Tim Waugh <twaugh@redhat.com> 3.0.2-62 * Tue Sep 2 2008 Tim Waugh <twaugh@redhat.com> 3.0.2-62
- Removed patch fuzz. - Removed patch fuzz.
- Fixed PPD generation for HP LaserJet 4345 MFP (bug #459847). - Fixed PPD generation for HP LaserJet 4345 MFP (bug #459847).