From: Zac Medico Date: Thu, 21 Mar 2013 00:38:28 +0000 (-0700) Subject: Test portageq and etc-update for bug #462412. X-Git-Tag: v2.2.0_alpha169~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=72e7055e0f48b96dad4c6b44ee2ce711a23cad7d;p=portage.git Test portageq and etc-update for bug #462412. --- diff --git a/bin/etc-update b/bin/etc-update index 347ba1a92..1a99231b7 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -620,7 +620,7 @@ while [[ -n $1 ]] ; do done ${SET_X} && set -x -type portageq >/dev/null || die "missing portageq" +type -P portageq >/dev/null || die "missing portageq" portage_vars=( CONFIG_PROTECT{,_MASK} PORTAGE_CONFIGROOT @@ -630,7 +630,7 @@ portage_vars=( USERLAND NOCOLOR ) -eval $(portageq envvar -v ${portage_vars[@]}) +eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)" envvar -v ${portage_vars[@]}) export PORTAGE_TMPDIR SCAN_PATHS=${*:-${CONFIG_PROTECT}} diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py index 5c0d821e0..fea8b73b6 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ b/pym/portage/tests/emerge/test_simple.py @@ -7,7 +7,8 @@ import sys import portage from portage import os from portage import _unicode_decode -from portage.const import PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, USER_CONFIG_PATH +from portage.const import (BASH_BINARY, + PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, USER_CONFIG_PATH) from portage.process import find_binary from portage.tests import TestCase from portage.tests.resolver.ResolverPlayground import ResolverPlayground @@ -175,6 +176,8 @@ pkg_preinst() { os.path.join(PORTAGE_BIN_PATH, "emaint")) env_update_cmd = (portage_python, "-Wd", os.path.join(PORTAGE_BIN_PATH, "env-update")) + etc_update_cmd = (BASH_BINARY, + os.path.join(PORTAGE_BIN_PATH, "etc-update")) fixpackages_cmd = (portage_python, "-Wd", os.path.join(PORTAGE_BIN_PATH, "fixpackages")) portageq_cmd = (portage_python, "-Wd", @@ -198,6 +201,9 @@ pkg_preinst() { test_commands = ( env_update_cmd, + portageq_cmd + ("envvar", "-v", "CONFIG_PROTECT", "EROOT", + "PORTAGE_CONFIGROOT", "PORTAGE_TMPDIR", "USERLAND"), + etc_update_cmd, emerge_cmd + ("--version",), emerge_cmd + ("--info",), emerge_cmd + ("--info", "--verbose"),