Skip to content
Browse files

Make use test scripts check if emerge failed with REQUIRED_USE not sa…

…tisfied
  • Loading branch information...
1 parent 676c12b commit 791d021b960c9e7a724769854800d129412628dc @tom111 committed Nov 1, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 templates/use-snippet
View
8 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;

0 comments on commit 791d021

Please sign in to comment.
Something went wrong with that request. Please try again.