summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/BinpkgFetcher.py4
-rw-r--r--pym/_emerge/EbuildFetcher.py6
-rw-r--r--pym/_emerge/EbuildMetadataPhase.py4
-rw-r--r--pym/_emerge/SpawnProcess.py2
4 files changed, 8 insertions, 8 deletions
diff --git a/pym/_emerge/BinpkgFetcher.py b/pym/_emerge/BinpkgFetcher.py
index 5677419e7..0032e601d 100644
--- a/pym/_emerge/BinpkgFetcher.py
+++ b/pym/_emerge/BinpkgFetcher.py
@@ -63,7 +63,7 @@ class BinpkgFetcher(SpawnProcess):
if pretend:
portage.writemsg_stdout("\n%s\n" % uri, noiselevel=-1)
- self.returncode = os.EX_OK
+ self._set_returncode((self.pid, os.EX_OK))
self.wait()
return
@@ -102,7 +102,7 @@ class BinpkgFetcher(SpawnProcess):
def _set_returncode(self, wait_retval):
SpawnProcess._set_returncode(self, wait_retval)
- if self.returncode == os.EX_OK:
+ if not self.pretend and self.returncode == os.EX_OK:
# If possible, update the mtime to match the remote package if
# the fetcher didn't already do it automatically.
bintree = self.pkg.root_config.trees["bintree"]
diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py
index 732a4be73..7f5bc6df4 100644
--- a/pym/_emerge/EbuildFetcher.py
+++ b/pym/_emerge/EbuildFetcher.py
@@ -33,13 +33,13 @@ class EbuildFetcher(SpawnProcess):
(self.pkg.cpv, e)
msg_lines.append(msg)
self._eerror(msg_lines)
- self.returncode = 1
+ self._set_returncode((self.pid, 1))
self.wait()
return
if not uri_map:
# Nothing to fetch.
- self.returncode = os.EX_OK
+ self._set_returncode((self.pid, os.EX_OK))
self.wait()
return
@@ -49,7 +49,7 @@ class EbuildFetcher(SpawnProcess):
if self.prefetch and \
self._prefetch_size_ok(uri_map, settings, ebuild_path):
self.config_pool.deallocate(settings)
- self.returncode = os.EX_OK
+ self._set_returncode((self.pid, os.EX_OK))
self.wait()
return
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py
index 1ad72b549..eaa7f40b2 100644
--- a/pym/_emerge/EbuildMetadataPhase.py
+++ b/pym/_emerge/EbuildMetadataPhase.py
@@ -46,7 +46,7 @@ class EbuildMetadataPhase(SubProcess):
if not portage.eapi_is_supported(eapi):
self.metadata_callback(self.cpv, self.ebuild_path,
self.repo_path, {'EAPI' : eapi}, self.ebuild_mtime)
- self.returncode = os.EX_OK
+ self._set_returncode((self.pid, os.EX_OK))
self.wait()
return
@@ -98,7 +98,7 @@ class EbuildMetadataPhase(SubProcess):
if isinstance(retval, int):
# doebuild failed before spawning
self._unregister()
- self.returncode = retval
+ self._set_returncode((self.pid, retval))
self.wait()
return
diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py
index e3acdc44c..6e0586815 100644
--- a/pym/_emerge/SpawnProcess.py
+++ b/pym/_emerge/SpawnProcess.py
@@ -120,7 +120,7 @@ class SpawnProcess(SubProcess):
if isinstance(retval, int):
# spawn failed
self._unregister()
- self.returncode = retval
+ self._set_returncode((self.pid, retval))
self.wait()
return