a62e1106f47e6ac1d1d82191891d8e4668da03b2
[gentoo.git] /
1 diff -up system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp system-config-printer-1.2.2/asyncpk1.py
2 --- system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp  2010-05-07 15:19:03.000000000 +0100
3 +++ system-config-printer-1.2.2/asyncpk1.py     2010-05-13 13:00:57.759093485 +0100
4 @@ -153,7 +153,10 @@ class _WriteToTmpFile:
5      def __init__ (self, kwds, reply_handler, error_handler):
6          self._reply_handler = reply_handler
7          self._error_handler = error_handler
8 -        (tmpfd, tmpfname) = tempfile.mkstemp ()
9 +
10 +        # Create the temporary file in /tmp to ensure that
11 +        # cups-pk-helper-mechanism is able to write to it.
12 +        (tmpfd, tmpfname) = tempfile.mkstemp (dir="/tmp")
13          os.close (tmpfd)
14          self._filename = tmpfname
15          debugprint ("Created tempfile %s" % tmpfname)
16 diff -up system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp system-config-printer-1.2.2/cupspk.py
17 --- system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp    2010-04-15 00:11:33.000000000 +0100
18 +++ system-config-printer-1.2.2/cupspk.py       2010-05-13 13:00:57.760093336 +0100
19 @@ -385,7 +385,9 @@ class Connection:
20                      filename = None
21  
22          if (not use_pycups) and (fd != None or file_object != None):
23 -            (tmpfd, tmpfname) = tempfile.mkstemp()
24 +            # Create the temporary file in /tmp to ensure that
25 +            # cups-pk-helper-mechanism is able to write to it.
26 +            (tmpfd, tmpfname) = tempfile.mkstemp(dir="/tmp")
27              os.close (tmpfd)
28  
29              pk_args = (resource, tmpfname)