[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cdebconf, frontends and namespaces



On Tue, Jul 31, 2007 at 11:03:21PM +0200, Jérémy Bobbio wrote:
> As we usually name our frontends with the name of the library they are
> built on top (newt, gtk, bogl, etc.) this last requirements means you
> end up needing something like "gtk_handler_entropy".
> 
> My personal coding tastes tell me that it's wrong, as the "gtk_"
> namespace is reserved for the GTK+ library.
> 
> Possible solutions I can see to fix this:
>  * Do nothing, as I'm just splitting hair.
>  * Rename the GTK+ frontend to "fe_gtk" or something similar.  I don't
>    like this option because it is inconsistent with other frontends
>    (DEBCONF_FRONTEND=newt vs. DEBCONF_FRONTEND=fe_gtk).
>  * Change the plugin symbol lookup to "fe_<frontend>_handler_<type>"
>    (adding "fe_" in front of the current way).  That won't be a huge
>    change, as they are not that many plugins currently.

I don't particularly like "fe_" as a prefix (not even for frontends,
actually - it's acronym disease and not obvious when you first come to
look at it). How about "cdebconf_<frontend>_handler_<type>"?

Also, there needs to be a transitional period when old plugins still
work. Plugins are deployed in production!

> This last option gets my preference.  Although, for consistency, I would
> probably like to rename any exported frontend symbols to "fe_<frontend>"
> while doing that change.

As above, "cdebconf_" seems like the proper prefix for exported symbols
in cdebconf when there's a namespace concern; otherwise you're in real
trouble should there ever be a libfe ...

-- 
Colin Watson                                       [cjwatson@debian.org]



Reply to: