diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-06-09 11:19:38 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-06-09 11:19:38 -0700 |
commit | 501eef33b5ac990ae4b164a27e635be34cb9d14d (patch) | |
tree | b4cb14e8c8e4105b4f166e5ae595c98296d2bc00 | |
parent | ab6d03f3813318f9ba49e75a52d42972e14cdcc7 (diff) | |
download | portage-501eef33b5ac990ae4b164a27e635be34cb9d14d.tar.gz portage-501eef33b5ac990ae4b164a27e635be34cb9d14d.tar.bz2 portage-501eef33b5ac990ae4b164a27e635be34cb9d14d.zip |
SubProcess: fix status for _set_returncode caller
These callers don't intend to make WIFSIGNALED return True, so they
need to shift their codes 8 bits to the left. This ensures that
commit 88f5bf84e2fd23125910b2ecaffc035971445696 behaves as intended.
-rw-r--r-- | pym/_emerge/AbstractEbuildProcess.py | 2 | ||||
-rw-r--r-- | pym/_emerge/BinpkgFetcher.py | 2 | ||||
-rw-r--r-- | pym/_emerge/EbuildFetcher.py | 6 | ||||
-rw-r--r-- | pym/_emerge/EbuildMetadataPhase.py | 4 | ||||
-rw-r--r-- | pym/_emerge/SubProcess.py | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py index 434878887..0d1d991d4 100644 --- a/pym/_emerge/AbstractEbuildProcess.py +++ b/pym/_emerge/AbstractEbuildProcess.py @@ -57,7 +57,7 @@ class AbstractEbuildProcess(SpawnProcess): "since PORTAGE_BUILDIR does not exist: '%s'") % \ (self.phase, self.settings['PORTAGE_BUILDDIR']) self._eerror(textwrap.wrap(msg, 72)) - self._set_returncode((self.pid, 1)) + self._set_returncode((self.pid, 1 << 8)) self.wait() return diff --git a/pym/_emerge/BinpkgFetcher.py b/pym/_emerge/BinpkgFetcher.py index 12544d1be..6c1dde93e 100644 --- a/pym/_emerge/BinpkgFetcher.py +++ b/pym/_emerge/BinpkgFetcher.py @@ -65,7 +65,7 @@ class BinpkgFetcher(SpawnProcess): if pretend: portage.writemsg_stdout("\n%s\n" % uri, noiselevel=-1) - self._set_returncode((self.pid, os.EX_OK)) + self._set_returncode((self.pid, os.EX_OK << 8)) self.wait() return diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py index 0ea8dc775..c9a107dac 100644 --- a/pym/_emerge/EbuildFetcher.py +++ b/pym/_emerge/EbuildFetcher.py @@ -38,13 +38,13 @@ class EbuildFetcher(SpawnProcess): (self.pkg.cpv, e) msg_lines.append(msg) self._eerror(msg_lines) - self._set_returncode((self.pid, 1)) + self._set_returncode((self.pid, 1 << 8)) self.wait() return if not uri_map: # Nothing to fetch. - self._set_returncode((self.pid, os.EX_OK)) + self._set_returncode((self.pid, os.EX_OK << 8)) self.wait() return @@ -59,7 +59,7 @@ class EbuildFetcher(SpawnProcess): if self.prefetch and \ self._prefetch_size_ok(uri_map, settings, ebuild_path): self.config_pool.deallocate(settings) - self._set_returncode((self.pid, os.EX_OK)) + self._set_returncode((self.pid, os.EX_OK << 8)) self.wait() return diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py index 5925ec462..284622d69 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._set_returncode((self.pid, os.EX_OK)) + self._set_returncode((self.pid, os.EX_OK << 8)) self.wait() return @@ -98,7 +98,7 @@ class EbuildMetadataPhase(SubProcess): if isinstance(retval, int): # doebuild failed before spawning self._unregister() - self._set_returncode((self.pid, retval)) + self._set_returncode((self.pid, retval << 8)) self.wait() return diff --git a/pym/_emerge/SubProcess.py b/pym/_emerge/SubProcess.py index da2b301db..b99cf0bb1 100644 --- a/pym/_emerge/SubProcess.py +++ b/pym/_emerge/SubProcess.py @@ -87,7 +87,7 @@ class SubProcess(AbstractPollTask): if e.errno != errno.ECHILD: raise del e - self._set_returncode((self.pid, 1)) + self._set_returncode((self.pid, 1 << 8)) else: if wait_retval[0] != 0: self._set_returncode(wait_retval) @@ -98,7 +98,7 @@ class SubProcess(AbstractPollTask): if e.errno != errno.ECHILD: raise del e - self._set_returncode((self.pid, 1)) + self._set_returncode((self.pid, 1 << 8)) else: self._set_returncode(wait_retval) |