[pacman-dev] [PATCH] libmakepkg: only output package file names when checking for build references

Allan McRae allan at archlinux.org
Sun Oct 8 14:22:25 UTC 2017


The leading directory is distraction from identifying the files containing
build references.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/libmakepkg/lint_package/build_references.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/libmakepkg/lint_package/build_references.sh.in b/scripts/libmakepkg/lint_package/build_references.sh.in
index 9183fce9..6b777bf1 100644
--- a/scripts/libmakepkg/lint_package/build_references.sh.in
+++ b/scripts/libmakepkg/lint_package/build_references.sh.in
@@ -34,7 +34,7 @@ warn_build_references() {
 		mapfile -t refs < <(find "$pkgdir" -type f -exec grep -l "${!var}" {} +)
 		if  (( ${#refs} > 0 )); then
 			warning "$(gettext 'Package contains reference to %s')" "\$$var"
-			printf '%s\n' "${refs[@]}" >&2
+			printf '%s\n' "${refs[@]#"$pkgdir/"}" >&2
 		fi
 	done
 	return 0
-- 
2.14.2


More information about the pacman-dev mailing list