[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#368446: cupsys-driver-gutenprint: patch for cups-genppdupdate.5.0



Hi,

I think I found the problem: cups-genppdupdate.5.0 was trying to grep
from STDIN. I've included a patch.


- Felix

-- 
Felix C. Stegerman <flx@obfusk.net>

"Any sufficiently advanced bug is indistinguishable from a feature."
 -- R. Kulawiec
--- cups-genppdupdate.5.0.original	2006-05-22 17:36:45.000000000 +0200
+++ cups-genppdupdate.5.0	2006-05-22 17:37:50.000000000 +0200
@@ -131,13 +131,15 @@
 	chomp;
 	push @ppd_files,  $_;
     }
-    open PPDFILES, '-|', 'egrep', '-i', '-L', 'Foomatic', @ppd_files or die "can't grep $ppdlist: $!";
-    @ppd_files = ();
-    while (<PPDFILES>) {
-	chomp;
-	push @ppd_files,  $_;
+    if (@ppd_files) {
+        open PPDFILES, '-|', 'egrep', '-i', '-L', 'Foomatic', @ppd_files or die "can't grep $ppdlist: $!";
+        @ppd_files = ();
+        while (<PPDFILES>) {
+	    chomp;
+	    push @ppd_files,  $_;
+        }
+        close PPDFILES or ($! == 0) or die "can't close grep pipe: $!";
     }
-    close PPDFILES or ($! == 0) or die "can't close grep pipe: $!";
 }
 
 

Attachment: pgpYB4U6kKlPY.pgp
Description: PGP signature


Reply to: