mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-22 17:17:03 +02:00
hooks: verify that fuzzy patches don't leak into $DESTDIR
This commit is contained in:
parent
9a362883a5
commit
b75b703ea9
1 changed files with 22 additions and 0 deletions
22
common/hooks/post-install/11-pkglint-patch-orig.sh
Normal file
22
common/hooks/post-install/11-pkglint-patch-orig.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# This hook executes the following tasks:
|
||||
# - Looks on all packages for *.orig files generated by patch on fuzzy match
|
||||
|
||||
hook() {
|
||||
local matches mime file f prune_expr dir
|
||||
|
||||
while read -r file; do
|
||||
basename="${file%.orig}"
|
||||
if [ -f "$basename" ]; then
|
||||
if [ -z "$matches" ]; then
|
||||
matches=yes
|
||||
msg_red "Fuzzy patches generate those files:\n"
|
||||
fi
|
||||
msg_red " $file\n"
|
||||
fi
|
||||
done < <(find $PKGDESTDIR -type f -name '*.orig')
|
||||
if [ "$matches" ]; then
|
||||
msg_error "Please refresh the patches\n"
|
||||
fi
|
||||
}
|
Loading…
Add table
Reference in a new issue