mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
makepkg: print files with refs to $srcdir/$pkgdir
Since rewriting build_references() anyway, tweaked quoting. Implements FS#31558. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
4c4ce473d6
commit
e8c35bea2b
@ -25,14 +25,16 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
|||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
source "$LIBRARY/util/message.sh"
|
||||||
|
|
||||||
|
|
||||||
lint_package_functions+=('warn_build_references')
|
lint_package_functions+=('warn_build_references')
|
||||||
|
|
||||||
warn_build_references() {
|
warn_build_references() {
|
||||||
if find "${pkgdir}" -type f -print0 | xargs -0 grep -q -I "${srcdir}" ; then
|
local refs
|
||||||
warning "$(gettext "Package contains reference to %s")" "\$srcdir"
|
|
||||||
fi
|
for var in srcdir pkgdir; do
|
||||||
if find "${pkgdir}" -type f -print0 | xargs -0 grep -q -I "${pkgdirbase}" ; then
|
mapfile -t refs < <(find "$pkgdir" -type f -exec grep -l "${!var}" {} +)
|
||||||
warning "$(gettext "Package contains reference to %s")" "\$pkgdir"
|
if (( ${#refs} > 0 )); then
|
||||||
|
warning "$(gettext 'Package contains reference to %s')" "\$$var"
|
||||||
|
printf '%s\n' "${refs[@]}" >&2
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user