graysky2/clean-chroot-manager

DISTCC_HOSTS not changed in chroot makepkg.conf

rkcf opened this issue · 0 comments

rkcf commented

When running ccm cd an error pops up at the end of the initial package install:

sed: -e expression #2, char 37: unknown option to `s' 

The specific command at fault is the second expression of:

sed -i -e '/#DISTCC_HOSTS/ s,#,,' \
-i -e "/^DISTCC_HOSTS/ s,=\"\",=\"$DISTCC_HOSTS\"," \
-i -e '/^BUILDENV/ s,!distcc,distcc,' "$CHROOTPATH64"/root/etc/makepkg.conf

when DISTCC_HOSTS contains a string such as:
"somehost/5,lzo,cpp"

The issue being the use of ',' as a delimiter in the sed expression. As well as the separator for the options for distcc hosts.

This failure results in DISTCC_HOSTS not being set inside the chroot.

Upon changing the delimiter in this expression to a pipe '|' the issue is adverted, and DISTCC_HOSTS is set as expected. I'll open up a pull request to change the delimiter to a pipe.