diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-01 00:26:39 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-03-01 00:27:53 -0500 |
commit | 086fdbcfb68b6cedc5dfc2c4fd35245b57c2df02 (patch) | |
tree | 2e49847b2f4c7de73d3cd09f0e27d88da4f344c2 /crossdev | |
parent | crossdev: make build log creation more bullet proof (diff) | |
download | crossdev-086fdbcfb68b6cedc5dfc2c4fd35245b57c2df02.tar.gz crossdev-086fdbcfb68b6cedc5dfc2c4fd35245b57c2df02.tar.bz2 crossdev-086fdbcfb68b6cedc5dfc2c4fd35245b57c2df02.zip |
crossdev: move custom env from bashrc to package.env
Since we only want to tweak the variables in the env and not execute
arbitrary scripts, use package.env rather than bashrc to override.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'crossdev')
-rwxr-xr-x | crossdev | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -311,7 +311,7 @@ uninstall() { [[ -d ${CROSSDEV_OVERLAY}/cross-${CTARGET} ]] \ && rm -r ${CROSSDEV_OVERLAY}/cross-${CTARGET} local f - for f in categories package.{mask,keywords,use} profile/package.use.{force,mask} ; do + for f in categories package.{env,mask,keywords,use} profile/package.use.{force,mask} ; do rm -f "${f}"/cross-${CTARGET} rmdir "${f}" 2>/dev/null done @@ -794,7 +794,7 @@ set_env() { local pkg=$1 env=$2 output shift ; shift - output="env/cross-${CTARGET}/${pkg}" + output="env/cross-${CTARGET}/${pkg}.conf" cat <<-EOF > "${output}" SYMLINK_LIB=no $(printf '%b' "${env}") @@ -805,6 +805,9 @@ set_env() { for v in ${!CFLAGS_*} ${!CHOST_*} ${!CTARGET_*} ${!LDFLAGS_*} ${!LIBDIR_*} ABI MULTILIB_ABIS DEFAULT_ABI ; do echo "${v}='${!v}'" >> "${output}" done + + output=$(_set_portage_file ${pkg} package.env) + echo "cross-${CTARGET}/${pkg} cross-${CTARGET}/${pkg}.conf" >> ${output} } set_portage() { local cat=$1 pkg=$2 ver=$3 env=$4 ovl=$5 @@ -894,7 +897,7 @@ grep -qs "^cross-${CTARGET}$" "${CONFIGROOT}"/categories \ || echo cross-${CTARGET} >> "${CONFIGROOT}"/categories mkdir -p "${CROSSDEV_OVERLAY}"/cross-${CTARGET} || exit 1 cd "${CONFIGROOT}" -for f in package.{keywords,mask,use} env/cross-${CTARGET} profile/package.use.{force,mask} ; do +for f in package.{env,keywords,mask,use} env/cross-${CTARGET} profile/package.use.{force,mask} ; do [[ -f ${f} ]] && die "please convert ${CONFIGROOT}/${f} to a directory" mkdir -p ${f} || die "wtf!?" rm -f ${f}/cross-${CTARGET} |