aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-09-03 21:32:21 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-09-03 21:32:21 +0100
commitb2cf5969ccb0b7a9d834f64ee6ad414d7e43f389 (patch)
treed1b2133fdb3a86b8f61b1f372232a4b95a3c2ce2
parent15ece6156080c9626cf3de209f38a6721316b27e (diff)
downloadpaludis-b2cf5969ccb0b7a9d834f64ee6ad414d7e43f389.tar.gz
paludis-b2cf5969ccb0b7a9d834f64ee6ad414d7e43f389.tar.xz
Fix dlopens for new .so suffixes
-rw-r--r--configure.ac1
-rw-r--r--paludis/about.hh.in9
-rw-r--r--paludis/environment_factory.cc3
-rw-r--r--paludis/hooker.cc5
-rw-r--r--paludis/repositories/e/e_repository.cc5
-rw-r--r--paludis/repositories/e/glsa.cc3
-rw-r--r--paludis/repository_factory.cc2
7 files changed, 17 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index e69d5d4..f372f2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,7 @@ fi
AC_MSG_CHECKING([for slot])
AC_MSG_RESULT([$PALUDIS_PC_SLOT])
+AC_SUBST([PALUDIS_PC_SLOT])
PALUDIS_PC_CFLAGS=
PALUDIS_PC_LIBS="-lpaludis_${PALUDIS_PC_SLOT} -lpaludisutil_${PALUDIS_PC_SLOT} -lpaludisargs_${PALUDIS_PC_SLOT}"
diff --git a/paludis/about.hh.in b/paludis/about.hh.in
index 3b53709..34982af 100644
--- a/paludis/about.hh.in
+++ b/paludis/about.hh.in
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008 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
@@ -62,6 +62,13 @@
#define PALUDIS_VERSION_MICRO @VERSION_MICRO@
/**
+ * The suffix used for so names (eg "0.30" or "0.31_15ece615").
+ *
+ * \ingroup g_about
+ */
+#define PALUDIS_PC_SLOT "@PALUDIS_PC_SLOT@"
+
+/**
* The version suffix (eg "_alpha1"), often an empty string.
*
* \ingroup g_about
diff --git a/paludis/environment_factory.cc b/paludis/environment_factory.cc
index f898b0a..7cf0bc7 100644
--- a/paludis/environment_factory.cc
+++ b/paludis/environment_factory.cc
@@ -116,7 +116,8 @@ EnvironmentFactory::_load_dir(const FSEntry & so_dir)
if (d->is_directory())
_load_dir(*d);
- if (! is_file_with_extension(*d, ".so." + stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR),
+ if (! is_file_with_extension(*d, "_" + stringify(PALUDIS_PC_SLOT) + ".so." +
+ stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR),
IsFileWithOptions()))
continue;
diff --git a/paludis/hooker.cc b/paludis/hooker.cc
index fab623d..d530a54 100644
--- a/paludis/hooker.cc
+++ b/paludis/hooker.cc
@@ -52,7 +52,7 @@ HookFile::~HookFile()
namespace
{
- static const std::string so_suffix("_" + stringify(PALUDIS_VERSION_MAJOR) + "." + stringify(PALUDIS_VERSION_MINOR)
+ static const std::string so_suffix("_" + stringify(PALUDIS_PC_SLOT)
+ ".so." + stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR));
class BashHookFile :
@@ -596,8 +596,7 @@ Hooker::_find_hooks(const Hook & hook) const
if (! load_try)
{
load_try = true;
- std::string soname("libpaludispythonhooks_" + stringify(PALUDIS_VERSION_MAJOR) + "."
- + stringify(PALUDIS_VERSION_MINOR) + ".so");
+ std::string soname("libpaludispythonhooks_" + stringify(PALUDIS_PC_SLOT) + ".so");
pyhookfilehandle.handle = dlopen(soname.c_str(), RTLD_NOW | RTLD_GLOBAL);
if (pyhookfilehandle.handle)
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 9f5231b..0b98499 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -1255,13 +1255,12 @@ ERepository::check_qa(
if (0 == libqahandle.handle)
libqahandle.handle = dlopen(getenv_with_default("PALUDIS_E_REPOSITORY_QA_SO",
- "libpaludiserepositoryqa_" + stringify(PALUDIS_VERSION_MAJOR) + "."
- + stringify(PALUDIS_VERSION_MINOR) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
+ "libpaludiserepositoryqa_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
if (0 == libqahandle.handle)
{
reporter.message(QAMessage(dir, qaml_severe, "check_qa", "Got error '" + stringify(dlerror()) +
"' when dlopen(" + getenv_with_default("PALUDIS_E_REPOSITORY_QA_SO",
- "libpaludiserepositoryqa.so") + ")"));
+ "libpaludiserepositoryqa_" + stringify(PALUDIS_PC_SLOT) + ".so") + ")"));
return;
}
diff --git a/paludis/repositories/e/glsa.cc b/paludis/repositories/e/glsa.cc
index 9022d6c..4b0774b 100644
--- a/paludis/repositories/e/glsa.cc
+++ b/paludis/repositories/e/glsa.cc
@@ -226,8 +226,7 @@ GLSA::create_from_xml_file(const std::string & filename)
Lock lock(libxmlhandle.mutex);
if (0 == libxmlhandle.handle)
- libxmlhandle.handle = dlopen(("libpaludiserepositoryxmlthings_" + stringify(PALUDIS_VERSION_MAJOR) + "."
- + stringify(PALUDIS_VERSION_MINOR) + ".so").c_str(),
+ libxmlhandle.handle = dlopen(("libpaludiserepositoryxmlthings_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(),
RTLD_NOW | RTLD_GLOBAL);
if (0 == libxmlhandle.handle)
throw NotAvailableError("Cannot create GLSA from XML file '" + filename + "' due to error '"
diff --git a/paludis/repository_factory.cc b/paludis/repository_factory.cc
index 3965f69..497fe19 100644
--- a/paludis/repository_factory.cc
+++ b/paludis/repository_factory.cc
@@ -107,7 +107,7 @@ RepositoryFactory::_load_dir(const FSEntry & so_dir)
if (d->is_directory())
_load_dir(*d);
- if (! is_file_with_extension(*d, ".so." + stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR),
+ if (! is_file_with_extension(*d, "_" + stringify(PALUDIS_PC_SLOT) + ".so." + stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR),
IsFileWithOptions()))
continue;