diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:36:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:36:37 +0000 |
commit | 9cde75d21dc83eb89d3602c09460153008d07390 (patch) | |
tree | 617de37f8c9bfb49ab53eaac68341fb757cffffc | |
parent | 31cab64adde50d804cddd9b0b58eb67615ed8366 (diff) | |
download | portage-9cde75d21dc83eb89d3602c09460153008d07390.tar.gz portage-9cde75d21dc83eb89d3602c09460153008d07390.tar.bz2 portage-9cde75d21dc83eb89d3602c09460153008d07390.zip |
Make emerge --regen return non-zero if that are any failures. Thanks to Daniel
Robbins for reporting. (trunk r12575)
svn path=/main/branches/2.1.6/; revision=12856
-rw-r--r-- | pym/_emerge/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 7dbf3c14b..0e6a7f443 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -11129,6 +11129,8 @@ class MetadataRegen(PollScheduler): self._valid_pkgs = set() self._process_iter = self._iter_metadata_processes() + self.returncode = os.EX_OK + self._error_count = 0 def _iter_metadata_processes(self): portdb = self._portdb @@ -11206,6 +11208,8 @@ class MetadataRegen(PollScheduler): def _metadata_exit(self, metadata_process): self._jobs -= 1 if metadata_process.returncode != os.EX_OK: + self.returncode = 1 + self._error_count += 1 self._valid_pkgs.discard(metadata_process.cpv) portage.writemsg("Error processing %s, continuing...\n" % \ (metadata_process.cpv,)) @@ -12697,6 +12701,7 @@ def action_regen(settings, portdb, max_jobs, max_load): regen.run() portage.writemsg_stdout("done!\n") + return regen.returncode def action_config(settings, trees, myopts, myfiles): if len(myfiles) != 1: @@ -14705,7 +14710,7 @@ def emerge_main(): action_metadata(settings, portdb, myopts) elif myaction=="regen": validate_ebuild_environment(trees) - action_regen(settings, portdb, myopts.get("--jobs"), + return action_regen(settings, portdb, myopts.get("--jobs"), myopts.get("--load-average")) # HELP action elif "config"==myaction: |