From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EA181138453 for ; Wed, 9 Sep 2015 17:43:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BE77121C010; Wed, 9 Sep 2015 17:43:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 546F321C010 for ; Wed, 9 Sep 2015 17:43:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 436043409DB for ; Wed, 9 Sep 2015 17:42:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BC98A182 for ; Wed, 9 Sep 2015 17:42:57 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1441820053.d8fd5aa979d2629173afed65dc4b406f9491fa5a.dolsen@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/targets/snapshot.py X-VCS-Directories: catalyst/targets/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: d8fd5aa979d2629173afed65dc4b406f9491fa5a X-VCS-Branch: master Date: Wed, 9 Sep 2015 17:42:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9eb4a789-b936-4d63-9333-679e687cf89b X-Archives-Hash: 830b00edbda32ae60e207ae7d3619ae6 commit: d8fd5aa979d2629173afed65dc4b406f9491fa5a Author: Brian Dolbec gentoo org> AuthorDate: Wed Sep 9 17:33:48 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Wed Sep 9 17:34:13 2015 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d8fd5aa9 snapshot.py: Update the run() to return True/False same as stagebase Fixes Rick's issue with generating a snapshot exiting with 2. catalyst/targets/snapshot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py index 1edcd02..87340b7 100644 --- a/catalyst/targets/snapshot.py +++ b/catalyst/targets/snapshot.py @@ -42,11 +42,12 @@ class snapshot(TargetBase, GenBase): def run(self): if "purgeonly" in self.settings["options"]: self.purge() - return + return True if "purge" in self.settings["options"]: self.purge() + success = True self.setup() print "Creating Portage tree snapshot "+self.settings["version_stamp"]+\ " from "+self.settings["portdir"]+"..." @@ -72,6 +73,7 @@ class snapshot(TargetBase, GenBase): auto_extension=True ) if not compressor.compress(infodict): + success = False print "Snapshot compression failure" else: filename = '.'.join([self.settings["snapshot_path"], @@ -81,7 +83,9 @@ class snapshot(TargetBase, GenBase): self.gen_digest_file(filename) self.cleanup() - print "snapshot: complete!" + if success: + print "snapshot: complete!" + return success def kill_chroot_pids(self): pass