eclass/bash_completion-r1: Backport the fix for paths from systemd.eclass

The paths returned by pkg-config seem to have sysroot prepended
twice. The systemd eclass has a workaround for that - use it for bash
completion files too, then.
This commit is contained in:
Krzesimir Nowak 2021-11-09 13:54:24 +01:00
parent a4780d4802
commit d67c558126

View File

@ -45,6 +45,11 @@ inherit toolchain-funcs
_bash-completion-r1_get_bashdir() {
debug-print-function ${FUNCNAME} "${@}"
# Flatcar: Take a fix for pkg-config paths from systemd.eclass.
#
# https://github.com/pkgconf/pkgconf/issues/205
local -x PKG_CONFIG_FDO_SYSROOT_RULES=1
if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
local path
path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die