From: Zac Medico Date: Thu, 21 Mar 2013 07:51:08 +0000 (-0700) Subject: Test dispatch-conf. X-Git-Tag: v2.2.0_alpha169~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cfbad217dea19df9966b6dc29f8f06f4f0541d65;p=portage.git Test dispatch-conf. --- diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py index fea8b73b6..c1abd52bd 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ b/pym/portage/tests/emerge/test_simple.py @@ -7,7 +7,7 @@ import sys import portage from portage import os from portage import _unicode_decode -from portage.const import (BASH_BINARY, +from portage.const import (BASH_BINARY, PORTAGE_BASE_PATH, PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, USER_CONFIG_PATH) from portage.process import find_binary from portage.tests import TestCase @@ -166,6 +166,8 @@ pkg_preinst() { cachedir_pregen = os.path.join(portdir, "metadata", "md5-cache") portage_python = portage._python_interpreter + dispatch_conf_cmd = (portage_python, "-Wd", + os.path.join(PORTAGE_BIN_PATH, "dispatch-conf")) ebuild_cmd = (portage_python, "-Wd", os.path.join(PORTAGE_BIN_PATH, "ebuild")) egencache_cmd = (portage_python, "-Wd", @@ -204,6 +206,7 @@ pkg_preinst() { portageq_cmd + ("envvar", "-v", "CONFIG_PROTECT", "EROOT", "PORTAGE_CONFIGROOT", "PORTAGE_TMPDIR", "USERLAND"), etc_update_cmd, + dispatch_conf_cmd, emerge_cmd + ("--version",), emerge_cmd + ("--info",), emerge_cmd + ("--info", "--verbose"), @@ -319,6 +322,7 @@ pkg_preinst() { dirs = [cachedir, cachedir_pregen, distdir, fake_bin, portage_tmpdir, updates_dir, user_config_dir, var_cache_edb] + etc_symlinks = ("dispatch-conf.conf", "etc-update.conf") # Override things that may be unavailable, or may have portability # issues when running tests in exotic environments. # prepstrip - bug #447810 (bash read builtin EINTR problem) @@ -331,6 +335,9 @@ pkg_preinst() { ensure_dirs(d) for x in true_symlinks: os.symlink(true_binary, os.path.join(fake_bin, x)) + for x in etc_symlinks: + os.symlink(os.path.join(PORTAGE_BASE_PATH, "cnf", x), + os.path.join(eprefix, "etc", x)) with open(os.path.join(var_cache_edb, "counter"), 'wb') as f: f.write(b"100") # non-empty system set keeps --depclean quiet