Skip to content

makechrootpkg: fixing -U flag

Kristian Klausen requested to merge github/fork/jjjb03/patch-1 into master

Created by: jjjb03

calling makechrootpkg from root login (almost, twice sudo -s) resuls in error: ==> ERROR: Running makepkg as root is not allowed ...

prepare_chroot() guesses builduser_uid using $SUDO_UID/$UID, so -U flag isn't applied, line 171

if -U flag isn't set, it'll hold $SUDO_USER/$USER replacing line 171 with id -u makepgk_user has the same result without -U and correct result with -U

BTW: makepkg_user already validated via call to download_sources, line 410

Merge request reports

Loading