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

Directories named after packages

Many of the bits of the policy manual, and informal practice, suggest
naming directories after your package.

I just wanted to make a point that perhaps hasn't been entirely clear:
when we say that you should name the directory after your package, you
should think carefully about what aspect of and/or subsection of the
package name to use.

If the directory is some piece of package innards which nothing
outside the package itself needs to care about and which the user
never sees, then probably the actual package name is a good choice -
that way if the package is renamed or forked in the future, it will be
able to coexist with its differently-named predecessors.

BUT if the directory is user-visible, or is going to be used by other
packages, or needs to be configured in the user's PATH, or something,
then it will often be better to pick the "stem" of the package name,
or something else more stable.  

Also, if the package is renamed, then normally the existing config
directory name, plugin directories, or whatever, should be retained
unless there are good reasons not to.  To change the directory name
along with the package name may provide a minor benefit in neatness,
but it causes a lot of transition aggro (for other maintainers, and of
course for users/admins).

In general, the principle should be that where to look in the
filesystem for something should not depend on how the packages have
been organised.

For example, there has been a recent trend for FOO's documentation
package FOO-doc to contain /usr/share/doc/FOO-doc/html/index.html (or
whatever).  I think this is daft.  It should be in
/usr/share/doc/FOO/html/index.html.  That way you can find the
documentation for FOO in the filesystem without knowing whether the
FOO package happens to have been split into FOO and FOO-doc, or for
that matter libFOO8.9-dev, FOO-bin, etc. etc. etc.


A footnote: I was in part prompted to write this email by
/usr/lib/git-core, the directory that some git .debs expect you to put
on your PATH if you prefer to have "git-WOMBAT" commands rather than
just "git WOMBAT".

But since git upstream think this directory should be called
$(libexec)/git-core, it's very probably right to keep that name in
Debian.  So that's not a good example after all.

Reply to: