Added support to build pkgs in the chroot as normal user via capchroot.

Please read the comment in xbps-src.conf to use it. Fully tested
and working nicely, probably some pkgs will need minimal changes.

--HG--
extra : convert_revision : 820ad6d48aa74cf5b6db1871adea750acccaa82f
This commit is contained in:
Juan RP
2010-01-16 02:11:44 +01:00
parent 5d6d7b0f4e
commit e57940985e
15 changed files with 406 additions and 242 deletions

View File

@@ -39,23 +39,6 @@ run_func()
fi
}
run_rootcmd()
{
local lenv=
local usesudo="$1"
[ -n "$in_chroot" ] && unset fakeroot_cmd
lenv="XBPS_DISTRIBUTIONDIR=$XBPS_DISTRIBUTIONDIR"
shift
if [ "$usesudo" = "yes" -a -z "$in_chroot" ]; then
sudo env ${lenv} $@
else
env ${lenv} ${fakeroot_cmd} $@
fi
}
msg_error()
{
[ -z "$1" ] && return 1