[PATCH] Provide a mechanism for platform-specific error messages for stage1 failure

Vratislav Podzimek vpodzime at redhat.com
Tue Jan 28 07:30:59 UTC 2014


On Mon, 2014-01-27 at 22:58 -0800, Adam Williamson wrote:
> On Tue, 2014-01-28 at 07:56 +0100, Vratislav Podzimek wrote:
> 
> > I think it should be "missing_errors" as it is the list of errors. Other
> > than that this looks like a nice idea to me and the patch looks okay.
> > I'll let the other guys check it and I'll push it tomorrow unless there
> > are any objections. Thanks for the patch!
> 
> BLUE, damnit, the bike shed is BLUE =)
> 
> I chose the singular from the point of view of the platform: the
> platform defines a singular "error" to be displayed when stage1
> selection fails. This singular "error" is then pulled into a plural list
> of "errors" by sanityCheck(), sure, but from the point of view of the
> bit of code that actually *defines* the "error", there is exactly one of
> it.
> 
> Strictly speaking I suppose it could be missing_error_message, but boy,
What about "missing_err_msg"? ;)

Anyway, the reason why I pointed that name out was that while reading

> +                pe =
> _platform.bootStage1ConstraintDict["missing_error"]
> +                if pe:
> +                    errors.extend(pe)
(stupid Evolution...)

I tought there is a bug and that there should be 'errors.append(pe)'.
Because when getting a "singular thing" from a dict I'd expect it to be
of a "singular type" (scalar, to call it in a Perl way).

Why is it a list with single item, anyway? Couldn't it be simply a
string? And now I've noticed a more serious issue in the patch -- the
string should be enclosed in N_() to get translated.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list