aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'templates/use-snippet')
-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;