aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-10-05 18:18:21 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-10-05 18:18:21 +0000
commitf354f4f17804a1b48b549646d5fdf0f9cf99ea9f (patch)
treea0f1e914be656688742c45dbb594529b0abb25e0 /paludis/repositories
parentf6be6c9c44cdc3f531c9f419e3bd3460c4964dc6 (diff)
downloadpaludis-f354f4f17804a1b48b549646d5fdf0f9cf99ea9f.tar.gz
paludis-f354f4f17804a1b48b549646d5fdf0f9cf99ea9f.tar.xz
Merge libpaludisdeplist, -digests, -environments, -merger, -repositories, -tasks into libpaludis.
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/Makefile.am18
-rw-r--r--paludis/repositories/cran/Makefile.am1
-rw-r--r--paludis/repositories/cran/cran_repository.cc2
-rw-r--r--paludis/repositories/cran/registration.cc2
-rw-r--r--paludis/repositories/e/Makefile.am3
-rw-r--r--paludis/repositories/e/check_fetched_files_visitor.cc6
-rw-r--r--paludis/repositories/e/e_repository.cc4
-rw-r--r--paludis/repositories/e/registration.cc2
-rw-r--r--paludis/repositories/e/vdb_merger.cc2
-rw-r--r--paludis/repositories/e/vdb_merger.hh2
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc2
-rw-r--r--paludis/repositories/e/vdb_unmerger.hh2
-rw-r--r--paludis/repositories/gems/Makefile.am1
-rw-r--r--paludis/repositories/gems/registration.cc2
-rw-r--r--paludis/repositories/repository_maker.cc167
-rw-r--r--paludis/repositories/repository_maker.hh114
-rw-r--r--paludis/repositories/virtuals/Makefile.am1
-rw-r--r--paludis/repositories/virtuals/registration.cc2
18 files changed, 14 insertions, 319 deletions
diff --git a/paludis/repositories/Makefile.am b/paludis/repositories/Makefile.am
index 8b7953fcc..20836690b 100644
--- a/paludis/repositories/Makefile.am
+++ b/paludis/repositories/Makefile.am
@@ -16,24 +16,6 @@ MAINTAINERCLEANFILES = Makefile.in
built-sources : $(BUILT_SOURCES)
for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-lib_LTLIBRARIES = libpaludisrepositories.la
-
-paludis_repositories_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/
-
-paludis_repositories_include_HEADERS = \
- repository_maker.hh
-
-libpaludisrepositories_la_SOURCES = \
- repository_maker.cc \
- $(paludis_repositories_include_HEADERS)
-
-libpaludisrepositories_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-libpaludisrepositories_la_LIBADD = \
- $(top_builddir)/paludis/util/libpaludisutil.la \
- $(top_builddir)/paludis/libpaludis.la \
- @DYNAMIC_LD_LIBS@
-
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
DEFS= \
-DSYSCONFDIR=\"$(sysconfdir)\" \
diff --git a/paludis/repositories/cran/Makefile.am b/paludis/repositories/cran/Makefile.am
index bbf0a7b69..de57fc299 100644
--- a/paludis/repositories/cran/Makefile.am
+++ b/paludis/repositories/cran/Makefile.am
@@ -52,7 +52,6 @@ libpaludiscranrepository_la_SOURCES = \
$(paludis_repositories_cran_include_HEADERS)
libpaludiscranrepository_la_LIBADD = \
- $(top_builddir)/paludis/repositories/libpaludisrepositories.la \
$(top_builddir)/paludis/libpaludis.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 54719c697..7d48fe364 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -26,7 +26,7 @@
#include <paludis/metadata_key.hh>
#include <paludis/repositories/cran/cran_package_id.hh>
#include <paludis/repositories/cran/cran_repository.hh>
-#include <paludis/repositories/repository_maker.hh>
+#include <paludis/repository_maker.hh>
#include <paludis/repository_info.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/repositories/cran/registration.cc b/paludis/repositories/cran/registration.cc
index 892f884c0..a4a085502 100644
--- a/paludis/repositories/cran/registration.cc
+++ b/paludis/repositories/cran/registration.cc
@@ -17,7 +17,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/repositories/repository_maker.hh>
+#include <paludis/repository_maker.hh>
#include <paludis/repositories/cran/cran_repository.hh>
#include <paludis/repositories/cran/cran_installed_repository.hh>
#include "config.h"
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index 19d6e420a..508f9dc8e 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -135,9 +135,6 @@ libpaludiserepository_la_SOURCES = \
$(paludis_repositories_e_include_HEADERS)
libpaludiserepository_la_LIBADD = \
- $(top_builddir)/paludis/repositories/libpaludisrepositories.la \
- $(top_builddir)/paludis/merger/libpaludismerger.la \
- $(top_builddir)/paludis/digests/libpaludisdigests.la \
$(top_builddir)/paludis/libpaludis.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/e/check_fetched_files_visitor.cc b/paludis/repositories/e/check_fetched_files_visitor.cc
index 69df3b453..b0c0ea368 100644
--- a/paludis/repositories/e/check_fetched_files_visitor.cc
+++ b/paludis/repositories/e/check_fetched_files_visitor.cc
@@ -36,9 +36,9 @@
#include <paludis/util/save.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/digests/rmd160.hh>
-#include <paludis/digests/sha256.hh>
-#include <paludis/digests/md5.hh>
+#include <paludis/rmd160.hh>
+#include <paludis/sha256.hh>
+#include <paludis/md5.hh>
#include <paludis/repositories/e/manifest2_reader.hh>
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 9c2376d57..b4da94c56 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -71,8 +71,8 @@
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/is_file_with_extension.hh>
-#include <paludis/digests/rmd160.hh>
-#include <paludis/digests/sha256.hh>
+#include <paludis/rmd160.hh>
+#include <paludis/sha256.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
diff --git a/paludis/repositories/e/registration.cc b/paludis/repositories/e/registration.cc
index 22539f369..34a743d89 100644
--- a/paludis/repositories/e/registration.cc
+++ b/paludis/repositories/e/registration.cc
@@ -17,7 +17,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/repositories/repository_maker.hh>
+#include <paludis/repository_maker.hh>
#include <paludis/repositories/e/make_ebuild_repository.hh>
#include <paludis/repositories/e/make_ebin_repository.hh>
#include <paludis/repositories/e/vdb_repository.hh>
diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc
index 20d14533c..e12980478 100644
--- a/paludis/repositories/e/vdb_merger.cc
+++ b/paludis/repositories/e/vdb_merger.cc
@@ -28,7 +28,7 @@
#include <paludis/util/strip.hh>
#include <paludis/hook.hh>
#include <paludis/package_id.hh>
-#include <paludis/digests/md5.hh>
+#include <paludis/md5.hh>
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
diff --git a/paludis/repositories/e/vdb_merger.hh b/paludis/repositories/e/vdb_merger.hh
index ce55ab1c2..3824a1867 100644
--- a/paludis/repositories/e/vdb_merger.hh
+++ b/paludis/repositories/e/vdb_merger.hh
@@ -20,7 +20,7 @@
#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_GENTOO_VDB_MERGER_HH
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_GENTOO_VDB_MERGER_HH 1
-#include <paludis/merger/merger.hh>
+#include <paludis/merger.hh>
#include <paludis/package_id-fwd.hh>
#include <paludis/util/private_implementation_pattern.hh>
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index 89ff8d15c..6e526859f 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -23,7 +23,7 @@
using namespace paludis;
#include <paludis/util/destringify.hh>
-#include <paludis/digests/md5.hh>
+#include <paludis/md5.hh>
#include <paludis/environment.hh>
#include <paludis/hook.hh>
#include <paludis/package_database.hh>
diff --git a/paludis/repositories/e/vdb_unmerger.hh b/paludis/repositories/e/vdb_unmerger.hh
index 85e0b4f13..68f053ef7 100644
--- a/paludis/repositories/e/vdb_unmerger.hh
+++ b/paludis/repositories/e/vdb_unmerger.hh
@@ -25,7 +25,7 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/sr.hh>
#include <paludis/util/fs_entry.hh>
-#include <paludis/merger/unmerger.hh>
+#include <paludis/unmerger.hh>
namespace paludis
{
diff --git a/paludis/repositories/gems/Makefile.am b/paludis/repositories/gems/Makefile.am
index 4a297f16a..a4265a616 100644
--- a/paludis/repositories/gems/Makefile.am
+++ b/paludis/repositories/gems/Makefile.am
@@ -39,7 +39,6 @@ libpaludisgemsrepository_la_SOURCES = \
$(paludis_repositories_gems_include_HEADERS)
libpaludisgemsrepository_la_LIBADD = \
- $(top_builddir)/paludis/repositories/libpaludisrepositories.la \
$(top_builddir)/paludis/libpaludis.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
-lsyck
diff --git a/paludis/repositories/gems/registration.cc b/paludis/repositories/gems/registration.cc
index 257a7e0d5..4ebee74e0 100644
--- a/paludis/repositories/gems/registration.cc
+++ b/paludis/repositories/gems/registration.cc
@@ -17,7 +17,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/repositories/repository_maker.hh>
+#include <paludis/repository_maker.hh>
#include <paludis/repositories/gems/gems_repository.hh>
#include <paludis/repositories/gems/installed_gems_repository.hh>
#include <paludis/repositories/gems/params.hh>
diff --git a/paludis/repositories/repository_maker.cc b/paludis/repositories/repository_maker.cc
deleted file mode 100644
index 8b9323c4e..000000000
--- a/paludis/repositories/repository_maker.cc
+++ /dev/null
@@ -1,167 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
- *
- * 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
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "repository_maker.hh"
-#include <paludis/util/fs_entry.hh>
-#include <paludis/util/dir_iterator.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/instantiation_policy-impl.hh>
-#include <paludis/util/is_file_with_extension.hh>
-#include <paludis/util/map.hh>
-#include <paludis/util/system.hh>
-#include <paludis/util/virtual_constructor-impl.hh>
-#include <paludis/about.hh>
-#include <list>
-#include <dlfcn.h>
-#include <stdint.h>
-
-#include "config.h"
-
-#ifdef MONOLITHIC
-# include <paludis/repositories/portage/make_ebuild_repository.hh>
-# include <paludis/repositories/vdb/vdb_repository.hh>
-# include <paludis/repositories/virtuals/installed_virtuals_repository.hh>
-# include <paludis/repositories/virtuals/virtuals_repository.hh>
-#endif
-
-using namespace paludis;
-
-template class VirtualConstructor<std::string,
- tr1::shared_ptr<Repository> (*) (Environment * const,
- tr1::shared_ptr<const Map<std::string, std::string> >),
- virtual_constructor_not_found::ThrowException<NoSuchRepositoryTypeError> >;
-
-template class InstantiationPolicy<RepositoryMaker, instantiation_method::SingletonTag>;
-
-NoSuchRepositoryTypeError::NoSuchRepositoryTypeError(const std::string & format) throw ():
- ConfigurationError("No available maker for repository type '" + format + "'")
-{
-}
-
-PaludisRepositorySoDirNotADirectoryError::PaludisRepositorySoDirNotADirectoryError() throw () :
- Exception("PALUDIS_REPOSITORY_SO_DIR not a directory")
-{
-}
-
-PaludisRepositorySoDirCannotDlopenError::PaludisRepositorySoDirCannotDlopenError(
- const std::string & file, const std::string & e) throw () :
- Exception("Cannot dlopen a repository. so file"),
- _file(file),
- _dlerr(e)
-{
-}
-
-PaludisRepositorySoDirCannotDlopenError::~PaludisRepositorySoDirCannotDlopenError() throw ()
-{
-}
-
-const char *
-PaludisRepositorySoDirCannotDlopenError::what() const throw ()
-{
- if (_what.empty())
- _what = std::string(Exception::what()) +
- ": Cannot dlopen repository .so file '" + _file + "': '" + _dlerr + "'";
- return _what.c_str();
-}
-
-namespace paludis
-{
- template<>
- struct Implementation<RepositoryMaker>
- {
- std::list<void *> dl_opened;
- };
-}
-
-void
-RepositoryMaker::load_dir(const FSEntry & so_dir)
-{
- for (DirIterator d(so_dir), d_end ; d != d_end ; ++d)
- {
- if (d->is_directory())
- load_dir(*d);
-
- if (! is_file_with_extension(*d, ".so." + stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR),
- IsFileWithOptions()))
- continue;
-
- /* don't use RTLD_LOCAL, g++ is over happy about template instantiations, and it
- * can lead to multiple singleton instances. */
- void * dl(dlopen(stringify(*d).c_str(), RTLD_GLOBAL | RTLD_NOW));
-
- if (dl)
- {
- _imp->dl_opened.push_back(dl);
-
- void * reg(dlsym(dl, "register_repositories"));
- if (reg)
- {
- reinterpret_cast<void (*)(RepositoryMaker *)>(
- reinterpret_cast<uintptr_t>(reg))(this);
- }
- else
- throw PaludisRepositorySoDirCannotDlopenError(stringify(*d),
- "no register_repositories function defined");
- }
- else
- throw PaludisRepositorySoDirCannotDlopenError(stringify(*d), dlerror());
- }
-
- if ((so_dir / ".libs").is_directory())
- load_dir(so_dir / ".libs");
-}
-
-RepositoryMaker::RepositoryMaker() :
- PrivateImplementationPattern<RepositoryMaker>(new Implementation<RepositoryMaker>)
-{
-#ifdef MONOLITHIC
-
- register_maker("ebuild", &make_ebuild_repository_wrapped);
- register_maker("vdb", &VDBRepository::make_vdb_repository);
- register_maker("virtuals", &VirtualsRepository::make_virtuals_repository);
- register_maker("installed_virtuals", &InstalledVirtualsRepository::make_installed_virtuals_repository);
-
-#else
- FSEntry so_dir(getenv_with_default("PALUDIS_REPOSITORY_SO_DIR", LIBDIR "/paludis/repositories"));
-
- if (! so_dir.is_directory())
- throw PaludisRepositorySoDirNotADirectoryError();
-
- load_dir(so_dir);
-
-#endif
-}
-
-RepositoryMaker::~RepositoryMaker()
-{
-}
-
-#ifndef MONOLITHIC
-
-extern "C"
-{
- void PALUDIS_VISIBLE register_repositories(RepositoryMaker * maker);
-}
-
-void register_repositories(RepositoryMaker *)
-{
-}
-
-#endif
-
diff --git a/paludis/repositories/repository_maker.hh b/paludis/repositories/repository_maker.hh
deleted file mode 100644
index a3a4de2b7..000000000
--- a/paludis/repositories/repository_maker.hh
+++ /dev/null
@@ -1,114 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
- *
- * 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
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORY_MAKER_HH
-#define PALUDIS_GUARD_PALUDIS_REPOSITORY_MAKER_HH 1
-
-#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/util/virtual_constructor.hh>
-#include <paludis/util/map-fwd.hh>
-#include <paludis/repository.hh>
-
-namespace paludis
-{
- class FSEntry;
-
- /**
- * Thrown if a repository of the specified type does not exist.
- *
- * \ingroup grpexceptions
- * \ingroup grprepository
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE NoSuchRepositoryTypeError : public ConfigurationError
- {
- public:
- /**
- * Constructor.
- */
- NoSuchRepositoryTypeError(const std::string & format) throw ();
- };
-
- /**
- * Thrown if PALUDIS_REPOSITORY_SO_DIR is not a directory.
- *
- * \ingroup grpexceptions
- * \ingroup grprepository
- */
- class PALUDIS_VISIBLE PaludisRepositorySoDirNotADirectoryError :
- public Exception
- {
- public:
- PaludisRepositorySoDirNotADirectoryError() throw ();
- };
-
- /**
- * Thrown if a repository .so cannot be used.
- *
- * \ingroup grpexceptions
- * \ingroup grprepository
- */
- class PALUDIS_VISIBLE PaludisRepositorySoDirCannotDlopenError :
- public Exception
- {
- private:
- std::string _file, _dlerr;
- mutable std::string _what;
-
- public:
- ///\name Basic operations
- ///\{
-
- PaludisRepositorySoDirCannotDlopenError(const std::string & file,
- const std::string & e) throw ();
-
- ~PaludisRepositorySoDirCannotDlopenError() throw ();
-
- ///\}
-
- const char * what() const throw ();
- };
-
- /**
- * Virtual constructor for repositories.
- *
- * \ingroup grprepository
- */
- class PALUDIS_VISIBLE RepositoryMaker :
- public VirtualConstructor<std::string,
- tr1::shared_ptr<Repository> (*) (Environment * const,
- tr1::shared_ptr<const Map<std::string, std::string> >),
- virtual_constructor_not_found::ThrowException<NoSuchRepositoryTypeError> >,
- public InstantiationPolicy<RepositoryMaker, instantiation_method::SingletonTag>,
- private PrivateImplementationPattern<RepositoryMaker>
- {
- friend class InstantiationPolicy<RepositoryMaker, instantiation_method::SingletonTag>;
-
- private:
- RepositoryMaker();
-
- void load_dir(const FSEntry &);
-
- public:
- ~RepositoryMaker();
- };
-}
-
-#endif
diff --git a/paludis/repositories/virtuals/Makefile.am b/paludis/repositories/virtuals/Makefile.am
index 3807b46fa..de31a249c 100644
--- a/paludis/repositories/virtuals/Makefile.am
+++ b/paludis/repositories/virtuals/Makefile.am
@@ -39,7 +39,6 @@ libpaludisvirtualsrepository_la_SOURCES = \
if ! MONOLITHIC
libpaludisvirtualsrepository_la_LIBADD = \
- $(top_builddir)/paludis/repositories/libpaludisrepositories.la \
$(top_builddir)/paludis/libpaludis.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/virtuals/registration.cc b/paludis/repositories/virtuals/registration.cc
index 67d0f0e79..e96487b4f 100644
--- a/paludis/repositories/virtuals/registration.cc
+++ b/paludis/repositories/virtuals/registration.cc
@@ -17,7 +17,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/repositories/repository_maker.hh>
+#include <paludis/repository_maker.hh>
#include <paludis/repositories/virtuals/installed_virtuals_repository.hh>
#include <paludis/repositories/virtuals/virtuals_repository.hh>
#include "config.h"