[Python-apps-commits] r6136 - in packages/ocrodjvu/branches/0.4.6/debian (3 files)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Sun Sep 26 14:48:29 UTC 2010
Date: Sunday, September 26, 2010 @ 14:48:21
Author: jwilk
Revision: 6136
Preserve environment variables when calling external programs.
Added:
packages/ocrodjvu/branches/0.4.6/debian/patches/preserve-environment.diff
Modified:
packages/ocrodjvu/branches/0.4.6/debian/changelog
packages/ocrodjvu/branches/0.4.6/debian/patches/series
Modified: packages/ocrodjvu/branches/0.4.6/debian/changelog
===================================================================
--- packages/ocrodjvu/branches/0.4.6/debian/changelog 2010-09-26 14:23:55 UTC (rev 6135)
+++ packages/ocrodjvu/branches/0.4.6/debian/changelog 2010-09-26 14:48:21 UTC (rev 6136)
@@ -1,8 +1,10 @@
ocrodjvu (0.4.6-2) UNRELEASED; urgency=low
* Fix URL in changelog-0.4.6.diff.
+ * Preserve environment variables (except LC_*, LANG and LANGUAGE) when
+ calling external programs (closes: #594385). [preserve-environment.diff]
- -- Jakub Wilk <jwilk at debian.org> Sun, 26 Sep 2010 16:23:07 +0200
+ -- Jakub Wilk <jwilk at debian.org> Sun, 26 Sep 2010 16:47:48 +0200
ocrodjvu (0.4.6-1) unstable; urgency=low
Added: packages/ocrodjvu/branches/0.4.6/debian/patches/preserve-environment.diff
===================================================================
--- packages/ocrodjvu/branches/0.4.6/debian/patches/preserve-environment.diff (rev 0)
+++ packages/ocrodjvu/branches/0.4.6/debian/patches/preserve-environment.diff 2010-09-26 14:48:21 UTC (rev 6136)
@@ -0,0 +1,28 @@
+Description: Preserve environment variables (except LC_*, LANG and LANGUAGE)
+ when calling external programs.
+Author: Jakub Wilk <jwilk at debian.org>
+Bug-Debian: http://bugs.debian.org/594385
+
+--- a/lib/ipc.py
++++ b/lib/ipc.py
+@@ -11,6 +11,7 @@
+ # General Public License for more details.
+
+ import re
++import os
+ import signal
+ import subprocess
+
+@@ -46,6 +47,12 @@
+ class Subprocess(subprocess.Popen):
+
+ def __init__(self, *args, **kwargs):
++ env = kwargs.get('env', None)
++ if env is not None:
++ env.update(
++ (k, v) for k, v in os.environ.iteritems()
++ if not (k.startswith('LC_') or k in ('LANG', 'LANGUAGE'))
++ )
+ subprocess.Popen.__init__(self, *args, **kwargs)
+ try:
+ self.__command = kwargs['args'][0]
Modified: packages/ocrodjvu/branches/0.4.6/debian/patches/series
===================================================================
--- packages/ocrodjvu/branches/0.4.6/debian/patches/series 2010-09-26 14:23:55 UTC (rev 6135)
+++ packages/ocrodjvu/branches/0.4.6/debian/patches/series 2010-09-26 14:48:21 UTC (rev 6136)
@@ -1,2 +1,3 @@
changelog-0.4.6.diff
tests-version.diff
+preserve-environment.diff
More information about the Python-apps-commits
mailing list