aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-21 10:54:49 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-21 10:54:49 +0100
commit205012488815d5ee7e24df3542341d455b6b8a63 (patch)
treecf974c8853785600a22368cdb2bcccfd95ee8c0d
parent9e56c05c246a9ae917c69e370f0f4cc8077a44e1 (diff)
downloadpaludis-205012488815d5ee7e24df3542341d455b6b8a63.tar.gz
paludis-205012488815d5ee7e24df3542341d455b6b8a63.tar.xz
Force loading of symbols from libpaludis
Fixes: ticket:926
-rw-r--r--paludis/repositories/e/xml_things_handle.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/paludis/repositories/e/xml_things_handle.cc b/paludis/repositories/e/xml_things_handle.cc
index 1fd9501..cf312f5 100644
--- a/paludis/repositories/e/xml_things_handle.cc
+++ b/paludis/repositories/e/xml_things_handle.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 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
@@ -38,6 +38,7 @@ namespace paludis
template <>
struct Implementation<XMLThingsHandle>
{
+ void * paludis_handle;
void * handle;
typedef void (* InitPtr) ();
@@ -49,6 +50,7 @@ namespace paludis
CleanupPtr cleanup;
Implementation() :
+ paludis_handle(0),
handle(0),
create_glsa_from_xml_file(0),
create_metadata_xml_from_xml_file(0),
@@ -59,6 +61,14 @@ namespace paludis
if (! getenv_with_default("PALUDIS_NO_XML", "").empty())
return;
+ paludis_handle = ::dlopen(("libpaludis_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
+ if (! paludis_handle)
+ {
+ Log::get_instance()->message("e.xml_things.dlopen_failed", ll_warning, lc_context) << "Got error '"
+ << ::dlerror() << "' from dlopen libpaludis";
+ return;
+ }
+
handle = ::dlopen(("libpaludiserepositoryxmlthings_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
if (! handle)
{