chk_updated_info_files: fix merge fault and fix for Prefix
authorFabian Groffen <grobian@gentoo.org>
Sun, 30 Sep 2012 11:32:06 +0000 (13:32 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sun, 30 Sep 2012 11:32:06 +0000 (13:32 +0200)
We still used some old invalid code.  Patch by Alan Hourihane from
gentoo-alt ML.

pym/_emerge/main.py

index 92fae5c5bd422265ef770cf8e0c2da8c88be4997..8553bbc225d6ef01ce14a6b60e1c469b70c10d39 100644 (file)
@@ -181,9 +181,19 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
                                                                        raise
                                                                del e
                                        processed_count += 1
-                                       myso = portage.subprocess_getstatusoutput(
-                                               "LANG=C LANGUAGE=C %s/usr/bin/install-info " \
-                                               "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
+                                       try:
+                                               proc = subprocess.Popen(
+                                                       ['%s/usr/bin/install-info'
+                                                       '--dir-file=%s' % (EPREFIX, os.path.join(inforoot, "dir")),
+                                                       os.path.join(inforoot, x)],
+                                                       env=dict(os.environ, LANG="C", LANGUAGE="C"),
+                                                       stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+                                       except OSError:
+                                               myso = None
+                                       else:
+                                               myso = _unicode_decode(
+                                                       proc.communicate()[0]).rstrip("\n")
+                                               proc.wait()
                                        existsstr="already exists, for file `"
                                        if myso:
                                                if re.search(existsstr,myso):