[Pkg-privacy-commits] [tails-installer] 01/07: Run dd in the C locale

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:27:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.93.2
in repository tails-installer.

commit 097f73542f5179416a097c6a481ba80c6696f01e
Author: Martin Briza <mbriza at redhat.com>
Date:   Fri Apr 22 11:20:01 2016 +0200

    Run dd in the C locale
---
 liveusb/creator.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/liveusb/creator.py b/liveusb/creator.py
index 0c14538..815fa98 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -354,6 +354,14 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
     def dd_image(self, update_function=None):
         self.log.info(_('Overwriting device with live image'))
         drive = self.drive.device
+
+        # has to run in C locale
+        env = os.environ.copy()
+        for i in env.keys():
+            if i.startswith('LC_'):
+                del env[i]
+        env['LC_ALL'] = 'C'
+
         cmd = ['dd', 'if=%s'%self.iso, 'of=%s'%drive, 'bs=1M', 'iflag=direct', 'oflag=direct', 'conv=fdatasync', 'status=progress']
 
         if update_function:
@@ -366,7 +374,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
                 umount.wait()
 
         self.log.debug(_('Running'), cmd)
-        dd = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=0, universal_newlines=True)
+        dd = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=0, universal_newlines=True)
 
         if update_function:
             while dd.poll() is None:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list