mirror of
https://github.com/systemd/systemd
synced 2024-10-14 20:17:52 +00:00
test: skip missing optional libraries in image install
Not all optional libraries might be available on developers machines, so log and skip. Also some pkg-config files are broken (eg: tss2 on Debian Stable) so skip if the required variables are missing, and improve logs.
This commit is contained in:
parent
5e8deb94c6
commit
a9d34376e6
|
@ -698,14 +698,25 @@ install_missing_libraries() {
|
||||||
# A number of dependencies is now optional via dlopen, so the install
|
# A number of dependencies is now optional via dlopen, so the install
|
||||||
# script will not pick them up, since it looks at linkage.
|
# script will not pick them up, since it looks at linkage.
|
||||||
for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu libfido2; do
|
for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu libfido2; do
|
||||||
if pkg-config --exists ${lib}; then
|
ddebug "Searching for $lib via pkg-config"
|
||||||
path=$(pkg-config --variable=libdir ${lib})
|
if pkg-config --exists ${lib}; then
|
||||||
if ! [[ ${lib} =~ ^lib ]]; then
|
path=$(pkg-config --variable=libdir ${lib})
|
||||||
lib="lib${lib}"
|
if [ -z "${path}" ]; then
|
||||||
fi
|
ddebug "$lib.pc does not contain a libdir variable, skipping"
|
||||||
inst_libs "${path}/${lib}.so"
|
continue
|
||||||
inst_library "${path}/${lib}.so"
|
fi
|
||||||
fi
|
|
||||||
|
if ! [[ ${lib} =~ ^lib ]]; then
|
||||||
|
lib="lib${lib}"
|
||||||
|
fi
|
||||||
|
# Some pkg-config files are broken and give out the wrong paths
|
||||||
|
# (eg: libcryptsetup), so just ignore them
|
||||||
|
inst_libs "${path}/${lib}.so" || true
|
||||||
|
inst_library "${path}/${lib}.so" || true
|
||||||
|
else
|
||||||
|
ddebug "$lib.pc not found, skipping"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue