aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-06-24 18:53:51 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-06-24 18:53:51 +0100
commit38ce7c4dfcc268416853a96c754ff4a71d537a70 (patch)
tree054e1adfc8da1f71d09c4d5a03077f43a0e27c28
parent6f8e31204119fbbc6f770cf53a68a097a8ec44fc (diff)
downloadpaludis-38ce7c4dfcc268416853a96c754ff4a71d537a70.tar.gz
paludis-38ce7c4dfcc268416853a96c754ff4a71d537a70.tar.xz
hate
-rwxr-xr-xhooks/news_TEST4
-rw-r--r--paludis/util/system.cc5
2 files changed, 8 insertions, 1 deletions
diff --git a/hooks/news_TEST b/hooks/news_TEST
index 54c6098..c7d4a22 100755
--- a/hooks/news_TEST
+++ b/hooks/news_TEST
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2007, 2008 Ciaran McCreesh
+# Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
#
# This file is part of the Paludis package manager. Paludis is free software;
# you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,6 +22,7 @@ news_none_TEST()
export PALUDIS_LIVE_DESTINATION=
export HOOK=sync_all_post
export PALUDIS_HOME=`pwd`/news_TEST_dir/one
+ export PACKAGE_MANAGER="paludis" ESELECT_PACKAGE_MANAGER="paludis"
bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_BUILDDIR}/hooks/news.hook hook_run_sync_all_post >/dev/null ; test_return_code
bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_BUILDDIR}/hooks/news.hook hook_run_sync_all_post \
@@ -34,6 +35,7 @@ news_one_TEST()
export PALUDIS_LIVE_DESTINATION=
export HOOK=sync_all_post
export PALUDIS_HOME=`pwd`/news_TEST_dir/two
+ export PACKAGE_MANAGER="paludis" ESELECT_PACKAGE_MANAGER="paludis"
bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_BUILDDIR}/hooks/news.hook hook_run_sync_all_post 2>/dev/null ; test_return_code
bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_BUILDDIR}/hooks/news.hook hook_run_sync_all_post 2>&1 \
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index 9f80bd8..765411f 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -469,6 +469,11 @@ paludis::run_command(const Command & cmd)
setenv("PALUDIS_PIPE_COMMAND_READ_FD", stringify(pipe_command_response->read_fd()).c_str(), 1);
}
+ /* This is what happens when people are allowed to play with
+ * things they don't understand. Yay Gentoo! */
+ setenv("PACKAGE_MANAGER", "paludis", 1);
+ setenv("ESELECT_PACKAGE_MANAGER", "paludis", 1);
+
if (cmd.captured_stdout_stream())
{
if (-1 == dup2(captured_stdout->write_fd(), 1))