aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2012-11-01 21:44:37 -0700
committerThomas Kahle <tomka@gentoo.org>2012-11-01 21:44:37 -0700
commit791d021b960c9e7a724769854800d129412628dc (patch)
tree8450febf670321cfe39bb77f9fee5c2316b799fe /templates
parentIncrease bound on usecombis and rdeps options (diff)
downloadtatt-791d021b960c9e7a724769854800d129412628dc.tar.gz
tatt-791d021b960c9e7a724769854800d129412628dc.tar.bz2
tatt-791d021b960c9e7a724769854800d129412628dc.zip
Make use test scripts check if emerge failed with REQUIRED_USE not satisfied
Diffstat (limited to 'templates')
-rw-r--r--templates/use-snippet8
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/use-snippet b/templates/use-snippet
index c4b693f..1f9581d 100644
--- a/templates/use-snippet
+++ b/templates/use-snippet
@@ -1,4 +1,8 @@
-if @@USE@@ @@FEATURES@@ emerge -1 @@EMERGEOPTS@@ @@CPV@@ ; then
+eout=$( @@USE@@ @@FEATURES@@ emerge -1 @@EMERGEOPTS@@ @@CPV@@ 2>&1 1>/dev/tty )
+if [[ $? == 0 ]] ; then
echo "@@USE@@ @@FEATURES@@ succeeded for @@CPV@@" >> @@REPORTFILE@@;
-else echo "@@USE@@ @@FEATURES@@ failed for @@CPV@@" >> @@REPORTFILE@@;
+elif [[ "${eout}" =~ REQUIRED_USE ]] ; then
+ echo "@@USE@@ : REQUIRED_USE not satisfied (probably)" >> @@REPORTFILE@@;
+else
+ echo "@@USE@@ @@FEATURES@@ failed for @@CPV@@" >> @@REPORTFILE@@;
fi;