makepkg: add rw permissions to /pkg directory on fail

after step failed(makepkg failed to build the package), user shouldn't need root
permissions to view/remove the directory

see: https://bugs.archlinux.org/task/50439
This commit is contained in:
Vladislav Nepogodin 2024-07-16 21:39:06 +04:00
parent c3aa1bc123
commit c892c18eb9

View file

@ -369,6 +369,10 @@ error_function() {
error "$(gettext "A failure occurred in %s().")" "$1" error "$(gettext "A failure occurred in %s().")" "$1"
plainerr "$(gettext "Aborting...")" plainerr "$(gettext "Aborting...")"
fi fi
# in case /pkg directory doesn't have rw permissions
if [[ -d "$pkgdirbase" ]]; then
chmod 755 "$pkgdirbase"
fi
exit $E_USER_FUNCTION_FAILED exit $E_USER_FUNCTION_FAILED
} }