typo in D-Bus spec?

Simon McVittie smcv at collabora.com
Thu Feb 14 11:46:15 UTC 2019


On Wed, 13 Feb 2019 at 18:51:44 -1000, Felipe Gasper wrote:
> These two criteria for interface names appear to contradict each other:
> 
> -----
> • Interface names are composed of 1 or more elements separated by a period ('.') character.
> 
>> 
> • Interface names must contain at least one '.' (period) character (and thus at least two elements).
> -----
> 
> The first line should say “composed of 2 or more” … right?

To be completely clear about this: you are correct to think that
"oneelement" is not a syntactically valid D-Bus interface name.

Strictly speaking, your interface name must satisfy all the criteria
(pseudocode: ok_for_rule_1(iface_name) && ok_for_rule_2(iface_name)
&& ... && ok_for_rule_n(iface_name)), so they aren't contradictory,
just incomplete.

But it's unnecessarily confusing that the first criterion allows some
names that are immediately rejected by the second, and "2 or more"
would indeed be clearer. I'd be happy to review a merge request.

If a single element was a syntactically valid D-Bus interface name,
it would be unlikely to be a semantically valid D-Bus interface
name, because you probably don't own a single-label Internet domain.
D-Bus names are conventionally "below" a name that you own, so the owner
of .example.com would normally name their D-Bus interface names like
com.example.Exemplary1, not just com.example, and similarly the owner
of .google would be expected to use names like google.Searchable1 for
their D-Bus interfaces.

    smcv


More information about the dbus mailing list