Skip to content

The README file contains misinformation about pkg-config for installation #1431

@vinc17fr

Description

@vinc17fr

The README file currently contains about installation:

The recommended directory is completionsdir, which you can get with pkg-config --variable=completionsdir bash-completion.

However, this is incorrect when using a different prefix from bash-completion. This can have 2 bad effects:

  • Installation failure due to insufficient permission (for instance, when the non-root end user wants to install software somewhere under his home directory). This can also be seen with make distcheck (recommended use of PKG_CHECK_VAR for bashcompdir causes 'make distcheck' failures #265).
  • As root, e.g. with the default prefix /usr/local (or a directory under /opt), whose goal is to avoid clashes with the vendor provided files, such files (e.g. from Debian) could be overwritten.

Note that pkgconf (previously pkg-config) is designed to say where things can be found for a build, not where they should be installed. It its man page: "pkgconf is a program which helps to configure compiler and linker flags for development libraries. This allows build systems to detect other dependencies and use them with the system toolchain."

What is said later in the README file, which mentions $PREFIX, should be put here as the recommended solution.

Note that if bash-completion really wants to suggest pkgconf as a way to get an installation directory, I think that this should be a directory relative to $PREFIX, e.g.

completionsdirsuffix=share/bash-completion/completions

so that $PREFIX/$completionsdirsuffix could be used by the package as the installation directory for completions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions