- Don't use popen2 in the foomatic PPD update script.
This commit is contained in:
parent
4e06115449
commit
54d76448f2
@ -25,7 +25,7 @@
|
||||
import sys
|
||||
import glob
|
||||
import os
|
||||
import popen2
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
import cups
|
||||
@ -38,15 +38,14 @@ gutenprint_version = sys.argv[1]
|
||||
dry_run = True
|
||||
|
||||
def generate_ppd (ppdfile, printer, driver):
|
||||
(r, w) = popen2.popen2 (["foomatic-ppdfile",
|
||||
"-p", printer,
|
||||
"-d", driver])
|
||||
w.close ()
|
||||
ppd = r.readlines ()
|
||||
r.close ()
|
||||
p = subprocess.Popen (["foomatic-ppdfile", "-p", printer, "-d", driver],
|
||||
stdin=file ("/dev/null"),
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
(ppd, stderr) = p.communicate ()
|
||||
fname = ppdfile + ".tmp"
|
||||
try:
|
||||
file(fname, "w").writelines (ppd)
|
||||
file(fname, "w").write (ppd)
|
||||
except IOError, e:
|
||||
print e
|
||||
raise
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name: gutenprint
|
||||
Summary: Printer Drivers Package.
|
||||
Version: 5.2.3
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Group: System Environment/Base
|
||||
URL: http://gimp-print.sourceforge.net/
|
||||
Source0: http://dl.sf.net/gimp-print/gutenprint-%{version}.tar.bz2
|
||||
@ -254,6 +254,9 @@ fi
|
||||
/bin/rm -f /var/cache/foomatic/*
|
||||
|
||||
%changelog
|
||||
* Sat Jan 10 2009 Tim Waugh <twaugh@redhat.com> 5.2.3-3
|
||||
- Don't use popen2 in the foomatic PPD update script.
|
||||
|
||||
* Thu Jan 8 2009 Tim Waugh <twaugh@redhat.com> 5.2.3-2
|
||||
- Only run the foomatic PPD update script on update, and make sure the
|
||||
script can deal with major version upgrades (bug #478328).
|
||||
|
Loading…
Reference in New Issue
Block a user