MSYS2-packages/pacman/0010-makepkg-lint_package-Warn-on-package-files-referenci.patch
Christoph Reiter 1915a138c0 pacman: Update to 6.1.0 (v2)
Same as #4584 but with an additional backport:
https://github.com/msys2/msys2-pacman/pull/49

Old message:

See msys2/msys2-pacman#45

makepkg.conf synced with the upstream version:
https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in

Skip patches only changing CI configs
2024-05-09 09:45:39 +02:00

29 lines
1.1 KiB
Diff

From bd791d61f176bbd50f8d3a47a69c25f1d6fc34b0 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Mon, 27 Feb 2023 18:36:48 +0100
Subject: [PATCH 10/N] makepkg: lint_package: Warn on package files
referencing absolute Windows paths
---
scripts/libmakepkg/lint_package/build_references.sh.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/libmakepkg/lint_package/build_references.sh.in b/scripts/libmakepkg/lint_package/build_references.sh.in
index 5aea78f..a941e2f 100644
--- a/scripts/libmakepkg/lint_package/build_references.sh.in
+++ b/scripts/libmakepkg/lint_package/build_references.sh.in
@@ -37,5 +37,13 @@ warn_build_references() {
printf '%s\n' "${refs[@]#"$pkgdir/"}" >&2
fi
done
+
+ # Check for Windows-style MSYS2 root path
+ if find "${pkgdir}" -type f -print0 | xargs -0 grep -iFqI "$(cygpath -m /)" ; then
+ warning "$(gettext "Package contains reference to %s")" "\$(cygpath -m /)"
+ fi
+ if find "${pkgdir}" -type f -print0 | xargs -0 grep -iFqI "$(cygpath -w /)" ; then
+ warning "$(gettext "Package contains reference to %s")" "\$(cygpath -w /)"
+ fi
return 0
}