Commit 3e804629 authored by Philip Müller's avatar Philip Müller

[mkchrootpkg] Upstream fixes

- makepkg 5.1 implements error codes, and 14 means that installing the
  packages after they were built has failed. We don't care about this
  error and would like makechrootpkg to succeed regardless, e.g. for split
  packages that are mutually exclusive.
- Do not assume the makechrootpkg user's groupname is the same as the username
parent 72a1ae07
......@@ -242,6 +242,12 @@ _chrootbuild() {
# cd /startdir
# sudo -u builduser makepkg "$@"
sudo -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
ret=$?
case $ret in
0|14) return 0;;
*) return $ret;;
esac
}
_chrootnamcap() {
......@@ -254,7 +260,7 @@ _chrootnamcap() {
download_sources() {
local builddir="$(mktemp -d)"
chown $SUDO_USER:$SUDO_USER "$builddir"
chown $SUDO_USER: "$builddir"
# Ensure sources are downloaded
if [[ -n $SUDO_USER ]]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment