aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-07-24 19:01:22 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-07-24 19:01:22 +0000
commite3f04350febc1e7f744e4fe886982369efdaa587 (patch)
treeb592836c616f43128a2c5c7592334a65015c9964
parent978adb459ba9e681d3368b184ff2249afea352bc (diff)
downloadpaludis-e3f04350febc1e7f744e4fe886982369efdaa587.tar.gz
paludis-e3f04350febc1e7f744e4fe886982369efdaa587.tar.xz
Look for fetchers in the source tree during tests.
-rw-r--r--paludis/environment_implementation.cc11
-rw-r--r--paludis/repositories/e/Makefile.am1
-rw-r--r--src/clients/paludis/command_line.cc1
3 files changed, 11 insertions, 2 deletions
diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc
index e84b11b..3948ccb 100644
--- a/paludis/environment_implementation.cc
+++ b/paludis/environment_implementation.cc
@@ -26,6 +26,7 @@
#include <paludis/util/save.hh>
#include <paludis/util/set.hh>
#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/system.hh>
#include <paludis/hook.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
@@ -58,8 +59,14 @@ tr1::shared_ptr<const FSEntrySequence>
EnvironmentImplementation::fetchers_dirs() const
{
tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- result->push_back(FSEntry(DATADIR "/paludis/fetchers"));
- result->push_back(FSEntry(LIBEXECDIR "/paludis/fetchers"));
+ std::string fetchers_dir(getenv_with_default("PALUDIS_FETCHERS_DIR", ""));
+ if (fetchers_dir.empty())
+ {
+ result->push_back(FSEntry(DATADIR "/paludis/fetchers"));
+ result->push_back(FSEntry(LIBEXECDIR "/paludis/fetchers"));
+ }
+ else
+ result->push_back(FSEntry(fetchers_dir));
return result;
}
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index 2d058f9..0f65e03 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -337,6 +337,7 @@ TESTS_ENVIRONMENT = env \
PALUDIS_EBUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_srcdir)/paludis/repositories/e/ebuild/`" \
PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/repositories/e/eapis/" \
PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
+ PALUDIS_FETCHERS_DIR="$(top_srcdir)/paludis/fetchers/" \
PALUDIS_SKIP_CONFIG="yes" \
TEST_SCRIPT_DIR="$(srcdir)/" \
PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \
diff --git a/src/clients/paludis/command_line.cc b/src/clients/paludis/command_line.cc
index 38637a1..64a5cfe 100644
--- a/src/clients/paludis/command_line.cc
+++ b/src/clients/paludis/command_line.cc
@@ -279,6 +279,7 @@ CommandLine::CommandLine() :
"utilities.");
add_environment_variable("PALUDIS_REPOSITORY_SO_DIR", "Where to look for repository .so "
"files.");
+ add_environment_variable("PALUDIS_FETCHERS_DIR", "Where to look for fetcher scripts.");
add_environment_variable("PALUDIS_OPTIONS", "Default command-line options.");
}