summaryrefslogtreecommitdiff
blob: 4b426847147205656bb4ed18e1e6d9c3806886b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From a34717465da31b1d5519e09b3e32202380c0a6ab Mon Sep 17 00:00:00 2001
From: Brian Harring <ferringb@gmail.com>
Date: Sat, 19 May 2012 17:28:54 -0700
Subject: [PATCH] ebuild envs assert: ensure a zero exit code.

_unpacker within unpacker eclass is sensitive to it, thus
match portage behaviour.
---
 NEWS                                       |    4 ++++
 pkgcore/ebuild/eapi-bash/exit-handling.lib |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/pkgcore/ebuild/eapi-bash/exit-handling.lib b/pkgcore/ebuild/eapi-bash/exit-handling.lib
index bf2fcdb..c02b2db 100644
--- a/pkgcore/ebuild/eapi-bash/exit-handling.lib
+++ b/pkgcore/ebuild/eapi-bash/exit-handling.lib
@@ -5,7 +5,7 @@ assert() {
 	local _pipestatus=${PIPESTATUS[*]}
 	local x
 	for x in ${_pipestatus}; do
-		[ "$x" != 0 ] && die "$@"
+		[ "$x" -eq 0 ] || die "$@"
 	done
 }
 
-- 
1.7.8.5