Hi, I've written a small but efficient patch to make the -q option in portage do a decent job in making it... quiet :) I started using writemsg and writemsg_stdout as I think this is the good way to go. This patch is probably not very clean, but emerging without all those useless lines is really worth it and the people who tested it really found it great. So if the idea could be kept and put into portage, even with a different method or patch, this patch would not be useless :) and portage compiling would seem more 'clean' than what it is now.
Created attachment 87767 [details, diff] isolated-functions.sh.patch for portage 2.1_rc3
Created attachment 87768 [details, diff] portage.py.patch for portage 2.1_rc3
What it does basicly when the -q emerge flag is set: * hide all stdout output generated by spawned programs (configure, make, etc) * still print einfo, ewarn, eerror, and all portage error messages * still print stderr output, to track errors
Wow, amazing! I haven't applied this patch, and probably won't, but I thought I should speak up because as far as I can tell the --quiet switch has NO EFFECT at all. Unless it's implemented in individual ebuilds, in which case it seems most ebuild writers don't bother using it.
Well maybe you should at least give it a try, personnally I find installing so much more beautiful with it ;) The patch is quite straight forward you can read it for yourself, and the script provided to patch does a copy of the original patched files. Updates of this patch are published when I have time on http://loule.info/dev/
Comment on attachment 87768 [details, diff] portage.py.patch for portage 2.1_rc3 You can't just hide away errors. --quiet should only print the minimum required, but that does include errors. If I wanted no output at all, I'd just &>/dev/null
Comment on attachment 87767 [details, diff] isolated-functions.sh.patch for portage 2.1_rc3 This patch has no logic that only drops the output if --quiet was specified, so it's not suitable for inclusion.
(In reply to comment #6) > (From update of attachment 87768 [details, diff] [edit]) > You can't just hide away errors. --quiet should only print the minimum > required, but that does include errors. If I wanted no output at all, I'd just > &>/dev/null > I think you didn't really get the trick... Indeed it just > /dev/null the ebuild.sh calls, BUT this DOES NOT REDIRECT stderr OUTPUT! only stdout! so you DO GET the errors when compiling. Then again, in the isolated functions patch, I redirect the output of einfo, ewarn, eerror, etc to stderr: so it DOES get printed on screen. so you get the e* functions output, AND the errors printed on stderr while compiling. If you had only TESTED this you would know what it really does... From my experience using this patch for many months now, stderr output while compiling gives generally the needed information to fix a compilation crash. Anyway if you really want to know what happened I guess one is gonna try again without --quiet. BTW updates of this patch are published when I have time on http://loule.info/dev/
Comment on attachment 87767 [details, diff] isolated-functions.sh.patch for portage 2.1_rc3 Sorry, I missed that.
(In reply to comment #8) > Anyway if you really want to know what happened I guess one is gonna try again > without --quiet. Well, that's annoying. I'm hoping to add support for parallel builds sometime in the near future (bug 147516). One of the requirements for parallel build is that the bulk of the output be logged rather than going to stdout, which should make things much quieter...
I personally don't see the interest in parallel builds, considering the fact that 'make' can handle parallelizing already, does a decent job on this AFAICT, and is probably the good way to go. This looks to me like a redundant functionality for portage :/ KISS!
*** Bug 167057 has been marked as a duplicate of this bug. ***