aidecoe at gentoo
Aug 21, 2012, 6:24 AM
Post #1 of 4
Useless messages (elog, ewarn, etc) in ebuilds
I'd like to call our attention to messages printed by ebuilds for users
(elog, ewarn, and so on). We all know that users rarely read them, but
this is understandable, since most of them are *completely* useless,
most of the rest are confusing, and only couple of them are useful. Who
has time to read tens of messages to find one useful sentence? I try to
skim all messages and check if there's something new, but if some
package has message which fill whole screen and requires from user to
make several checks there is almost 100% chance that this new important
message is going to be skipped.
I'd like to encourage users to fill bugs wrt useless or confusing
There are several kind of messages:
1) "If you are upgrading from X to Y, then do Z."
I see this message in some packages even I have already version Y or later
installed. We have "has_version" function to check if user has actually
updated from relevant version. Please use this to not confuse users who
installed the package first time or are upgrading from Y to another
2) "We no longer do something and do something else."
This is case similar to (1). We can check if user has upgraded between
versions bringing the changes we want call their attention to.
3) "You can install Y to have support for Z."
This actually is optional dependencies problem, but we can unify
printing the list at least. For example:
* Optional dependencies:
* category1/pkg1 - description1
* category2/pkg2 - description2
4) "If you are using baselayout-2, be sure to add Y to runlevel Z."
5) "Y has been removed. Please remove it from your runlevels."
We can easily check if user has added Y to runlevel Z. If this is
critical that user has to add Y to runlevel Z, then an ebuild should add
it itself and inform user about that. If it is not critical it should
inform user that Y could be added to runlevel Z only if installed first
time, not every upgrade. Same applies to removal - it can be done by an
6) "USE flag noY is deprecated, please use Y."
Cannot we check if user has enabled noY? At least we can check if
he/she enabled Y.
7) "If you use Y, do something."
We can check if Y flag is enabled or Y package is installed and skip the
message if it is not.
8) "Example configuration file has been installed to Y."
We can check if user has already configured a package (check
existence of a config file or its modification time).
9) "Run revdep-rebuild."
We can check if package has been upgraded at least and skip the message
if it has been installed first time or the same version has been
10) "Y config file has been moved to Z. If you have made changes to Y,
migrate them to Z."
We can check that in the ebuild and skip message if hasn't done anything
to the config file.
11) "If something happens, install Y."
We can at least check if Y is already installed.
*) Other kind of information which appears after EVERY installation.
All howtos should go to Gentoo Docs!