From 5db7afa3d5248873d372409d289c5a4d1257be59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bar=C4=87?= Date: Mon, 5 Jul 2021 13:54:45 +0200 Subject: [PATCH] ebuild-activate: add PORTAGE_*LOG* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maciej Barć --- src/ebuild-activate | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/ebuild-activate b/src/ebuild-activate index 9bdc787..b63ef15 100644 --- a/src/ebuild-activate +++ b/src/ebuild-activate @@ -37,6 +37,7 @@ esac # Set variables for ebuild development +_tmpdir='/tmp/edev' _toplevel="$(git rev-parse --show-toplevel || echo '/dev/null')" ACCEPT_LICENSE='*' @@ -48,9 +49,9 @@ then export BINPKG_COMPRESS fi -if mkdir -p /tmp/distdir +if mkdir -p "${_tmpdir}/dist" then - DISTDIR='/tmp/distdir' + DISTDIR="${_tmpdir}/dist" export DISTDIR fi @@ -60,6 +61,16 @@ export GENTOO_MIRRORS INSTALL_MASK='' export INSTALL_MASK +if mkdir -p "${_tmpdir}/elog" +then + PORTAGE_ELOG_CLASSES='warn error log' + export PORTAGE_ELOG_CLASSES + PORTAGE_ELOG_SYSTEM='save' + export PORTAGE_ELOG_SYSTEM + PORTAGE_LOGDIR="${_tmpdir}/elog" + export PORTAGE_LOGDIR +fi + if [ -e "${_toplevel}/profiles/repo_name" ] then PORTDIR="${_toplevel}" @@ -69,4 +80,13 @@ fi PS1="(ebuild) ${PS1}" +alias cd-edev='cd ${_tmpdir}' +alias cd-repo='cd ${_toplevel}' + +alias clean-edev='rm -r ${_tmpdir}' + +alias ls-dist='ls -ahl ${DISTDIR}' +alias ls-elog='ls -ahl ${PORTAGE_LOGDIR}' + + echo ">>> Entering Ebuild development environment"