abuild: add warning when pc:* provider is missing

and indicate which package that should provide it and needs a rebuild.
This commit is contained in:
Natanael Copa 2015-06-05 07:18:09 +00:00
parent d4d0dc0c33
commit f5dce44bf9
1 changed files with 7 additions and 4 deletions

View File

@ -1047,13 +1047,16 @@ trace_apk_deps() {
# pkg-config depends
for i in $(sort -u "$dir"/.needs-pc 2>/dev/null); do
if grep -w "^depend = ${i%[<>=]*}$" "$dir"/.PKGINFO >/dev/null ; then
warning "You can remove '$i' from depends"
continue
fi
if subpkg_provides_pc "$i" || cross_compiling \
|| $APK info --quiet --installed "pc:$i"; then
autodeps="$autodeps pc:$i"
else
warning "Could not find any provider for pc:$i"
local pcfile=/usr/lib/pkgconfig/"${i%%[<>=]*}".pc
if [ -e "$pcfile" ]; then
local owner=$($APK info --quiet --who-owns $pcfile)
warning "${owner:-package providing $pcfile} needs to be rebuilt"
fi
fi
done