makepkg: abort on lint_package errors
Allows lint_package to prevent makepkg from creating an invalid package. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
46101bea1c
commit
5dd764eb47
4 changed files with 7 additions and 3 deletions
|
@ -40,7 +40,9 @@ lint_package() {
|
|||
cd_safe "$pkgdir"
|
||||
msg "$(gettext "Checking for packaging issue...")"
|
||||
|
||||
local ret=0
|
||||
for func in ${lint_package_functions[@]}; do
|
||||
$func
|
||||
$func || ret=1
|
||||
done
|
||||
return $ret
|
||||
}
|
||||
|
|
|
@ -37,4 +37,5 @@ warn_build_references() {
|
|||
printf '%s\n' "${refs[@]}" >&2
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -35,4 +35,5 @@ warn_missing_backup() {
|
|||
warning "$(gettext "%s entry file not in package : %s")" "backup" "$file"
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -1167,7 +1167,7 @@ run_split_packaging() {
|
|||
backup_package_variables
|
||||
run_package $pkgname
|
||||
tidy_install
|
||||
lint_package
|
||||
lint_package || exit 1
|
||||
create_package
|
||||
create_debug_package
|
||||
restore_package_variables
|
||||
|
@ -1605,7 +1605,7 @@ if (( INFAKEROOT )); then
|
|||
run_package
|
||||
fi
|
||||
tidy_install
|
||||
lint_package
|
||||
lint_package || exit 1
|
||||
create_package
|
||||
create_debug_package
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue