debugedit: only check for debugedit if we build a package

We only really need debugedit while building the package, while this
check would run if you tried something like `makepkg --verifysource`.
Use the same checks as we have for fakeroot to wrap debugedit so we
don't beg for dependencies we don't need.

Fixes: 3ed08f97ec

Signed-off-by: Morten Linderud <morten@linderud.pw>
This commit is contained in:
Morten Linderud 2024-03-14 23:04:59 +01:00
parent 111eed0251
commit bae9594ac1
No known key found for this signature in database
GPG key ID: 9C02FF419FECBE16

View file

@ -29,10 +29,12 @@ source "$MAKEPKG_LIBRARY/util/option.sh"
executable_functions+=('executable_debugedit') executable_functions+=('executable_debugedit')
executable_debugedit() { executable_debugedit() {
if (( SOURCEONLY || BUILDPKG )); then
if check_option "debug" "y"; then if check_option "debug" "y"; then
if ! type -p debugedit >/dev/null; then if ! type -p debugedit >/dev/null; then
error "$(gettext "Cannot find the %s binary required for including source files in debug packages.")" "debugedit" error "$(gettext "Cannot find the %s binary required for including source files in debug packages.")" "debugedit"
return 1 return 1
fi fi
fi fi
fi
} }