aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2010-04-03 19:48:28 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2010-04-03 19:48:28 +0100
commit8c9bdda1b9c97715297aaba7ace1e52292a499bd (patch)
tree76c553f121871fadceacb6eb39d7802ae79645c6
parent93133425447ce927a352112c662fa43345ffc98f (diff)
downloadpaludis-8c9bdda1b9c97715297aaba7ace1e52292a499bd.tar.gz
paludis-8c9bdda1b9c97715297aaba7ace1e52292a499bd.tar.xz
Support PALUDIS_NO_XML
This should stop people from suggesting silly things like "remove dev-libs/libxml2/metadata.xml and use --dl-deps-default discard".
-rw-r--r--doc/configuration/envvars.html.part4
-rw-r--r--misc/common-makefile.am1
-rw-r--r--paludis/repositories/e/xml_things_handle.cc4
3 files changed, 9 insertions, 0 deletions
diff --git a/doc/configuration/envvars.html.part b/doc/configuration/envvars.html.part
index a962d42..760fe71 100644
--- a/doc/configuration/envvars.html.part
+++ b/doc/configuration/envvars.html.part
@@ -82,5 +82,9 @@ can be dangerous and may break things; many of these variables exist mainly for
<dt><code>PALUDIS_EXEC_PALUDIS</code></dt>
<dd>If set to <code>never</code>, Paludis will never re-exec itself when upgrading. If set to <code>always</code>,
Paludis will always re-exec itself when upgrading, even if it isn't necessary.</dd>
+
+ <dt><code>PALUDIS_NO_XML</code></dt>
+ <dd>If set to a non-empty string, Paludis will disable all XML-related functionality.
+ This can be useful if libxml2 is misbehaving.</dd>
</dl>
diff --git a/misc/common-makefile.am b/misc/common-makefile.am
index 4cb0827..89ac458 100644
--- a/misc/common-makefile.am
+++ b/misc/common-makefile.am
@@ -37,6 +37,7 @@ LOG_COMPILER = \
PALUDIS_HOOKER_DIR="$(top_srcdir)/paludis/" \
PALUDIS_NO_CHOWN="yupyup" \
PALUDIS_NO_GLOBAL_HOOKS="yes" \
+ PALUDIS_NO_XML= \
PALUDIS_NO_XTERM_TITLES="yes" \
PALUDIS_OPTIONS="" \
PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_srcdir)/paludis/environments/paludis/output_managers/`" \
diff --git a/paludis/repositories/e/xml_things_handle.cc b/paludis/repositories/e/xml_things_handle.cc
index c0a392c..1fd9501 100644
--- a/paludis/repositories/e/xml_things_handle.cc
+++ b/paludis/repositories/e/xml_things_handle.cc
@@ -23,6 +23,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/system.hh>
#include "config.h"
#include <dlfcn.h>
#include <stdint.h>
@@ -55,6 +56,9 @@ namespace paludis
cleanup(0)
{
#if ENABLE_XML
+ if (! getenv_with_default("PALUDIS_NO_XML", "").empty())
+ return;
+
handle = ::dlopen(("libpaludiserepositoryxmlthings_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
if (! handle)
{