4

Most of the directories related to D-Bus append -1 to the name: /etc/dbus-1, /usr/share/dbus-1, etc. (but not /var/lib/dbus, for some reason). What is the meaning/rationale behind -1?

1 Answer 1

5

The -1 reflects the API version, and is used in directory names to support parallel installations of a D-Bus 1 implementation and a hypothetical D-Bus 2 implementation (or any other combination).

This is hinted at by the old changelog:

  • dbus-1.pc.in, dbus-glib-1.pc.in: rename these from dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the parallel install API version, not with the D-BUS package version.

(It's not referring to dbus-1 folder names but I think the same reasoning applies there...)

It's an example of D-Bus following its own advice; from the specification:

It is also a good idea to include the major version of the interface in the name, and increment it if incompatible changes are made; this way, a single object can implement several versions of an interface in parallel, if necessary.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.