From c892c18eb9eaff222f413673d28d46c1de26afda Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Tue, 16 Jul 2024 21:39:06 +0400 Subject: [PATCH] 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 --- scripts/makepkg.sh.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 75df3650..22eb3206 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -369,6 +369,10 @@ error_function() { error "$(gettext "A failure occurred in %s().")" "$1" plainerr "$(gettext "Aborting...")" fi + # in case /pkg directory doesn't have rw permissions + if [[ -d "$pkgdirbase" ]]; then + chmod 755 "$pkgdirbase" + fi exit $E_USER_FUNCTION_FAILED }