forked from mirrored-repos/manjaro-tools
[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
This commit is contained in:
parent
72a1ae0722
commit
3e80462940
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue