instead of setting self.returncode directly.
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
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"]
(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
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
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
if isinstance(retval, int):
# doebuild failed before spawning
self._unregister()
- self.returncode = retval
+ self._set_returncode((self.pid, retval))
self.wait()
return
if isinstance(retval, int):
# spawn failed
self._unregister()
- self.returncode = retval
+ self._set_returncode((self.pid, retval))
self.wait()
return